Fun with LEGO Mindstorms Programming 183
I've developed pbForth, a port of a rather archaic programming language, for the LEGO Mindstorms brick. The cool thing about it is that with a dumb terminal emulator that does ASCII uploads and can handle XMODEM (checksum) transfers, you can compile applications right on the brick! Yes, on the brick! When you are done, you blast S records back to your PC using XMODEM and then you can reload the app anytime using one of the standard firmware uploaders.
Check out pbForth for LEGO Mindstorms
pbForth got a whole chapter in the O'Reilly book, and it is getting more and more momentum as replacement firmware that busts the 32 variable barrier, and allows total cross-platform development without screwing around with building ecgs.
OK, I'm biased - I wrote it - but I think it's cool. Maybe some of you LEGO gearheads out there would like to try programming in something other than the native tongue. Learning Forth can make you a better C programmer. No, I'm not a Forth evangelist - I write embedded systems in C all day long.
Hmmm. (Score:1)
Just Forth? (Score:3)
I for one would love to see Perl for LEG0. Do any such extensions for Perl exist, or are they in the works? Could other languages be adapted for LEGO? Forth is admittedly rather archaic, and few people program in it any more. Might open the appeal of the Mindstorm to a greater community.
Oh. Who am I kidding. Every geek wants LEGO. :^)
Hmmm... (Score:2)
NQC (Score:1)
Give your old bricks new life (Score:1)
After all, I'me glad I started programming C, but lego still has a 'special place in my heart'. This slashdot article brought the entire feeling back. It makes me want to run to the nearest toy-store and buy that Mindstorms set. (too bad it's sunday and 0:34 Am
Can anyone tell me how far this Mindstorms-programming thing goes? Might it actually be possible to create your own Aibo??
question(slightly OT) (Score:1)
i would gladly spend a hundred bucks for something that can retrieve the remote control for me.
Perl for Legos? (Score:2)
Variables (Score:2)
I think I'm going to try and convince him to use pbForth for future classes, anyone know of other schools (highschools in particular) doing such a thing now? Our problem is that the classes primarily contain normal students with no programming knowledge, so this might sharply increase the learning curve. Any ideas on how to make programming simpler to the non-geek/techie?
LEGO programming languages (Score:1)
Forth! (Score:1)
NQC (Not Quite C) (Score:1)
I would like to know just what the capabilities of this little compiler are. Has anyone used it? Does it come with a fully functional set of libraries? If so, this might be a rather useful (or at least fun).
Re:Hmmm. (Score:2)
You can also set your output to base 3, or 9, or 37!
(You can even set it to base 1, but don't expect to get an answer real soon...)
Re:NQC (Score:1)
(offtopic: what about all those new product lines
where there's one 'house'/ 'clan' / whatever fighting against the vile Bogons over some mineral ?)
Anyway, isn't there some limitation on that brick thing? I can't remember ever seeing it do more than one thing at a time...
Perl is *LIKE* Legos (Score:2)
No perl (Score:4)
Perl is best suited to larger systems, as a good method of tying together the extensive resources available on such a machine. It's just not suited to a tiny system.
Not Quite C (Score:2)
If you use windows try Mark Overmar's RCX control center [cs.uu.nl]. It's a keen IDE with a bunch of other kewl features like remote control, var watches, and more!
Your Lucky... (Score:1)
Mindstorms (Score:1)
Legos just doesn't seem right to me. Can anyone
(Who owns them) tell me if they are worth $100?
What can you do with them? If they would go down
in price I would buy them right now. I fell anyone
that spends over $100 for legos, needs to check
their priorities. Sure they are neat but you could
get stuf for your computerwith that money. For
that much money you could get more RAM, a burner,
speakers, zip drive...etc..
Re:Hmmm. (Score:2)
Yes, but that's a feature, remember. They designed it so that all programs could be forwards compatible if the value of 4 ever changes (which is good, since the ISO is now working on the Number89 standard, which is characteristically several years late (C9X, anyone?))
~~~~~~~~~
auntfloyd
WebCam mount, NQC, legOS (Score:5)
NQC uses the standard firmware I believe, and is a bit more solidified. You write programs in a pseudo-C language and compile/upload it using the NQC utility. It also has some good IR message passing abilities.
Information about both of these can be found at LUGNET [lugnet.com] in the robotics section.
I experimented with LegOS a while back but ended up using NQC and a bunch of server-side Perl to build myself a telerobotic camera [fastolfe.net] mount for my webcam.
There are definitely tools available out there for some extremely flexible Mindstorms programming.
Re:Give your old bricks new life (Score:4)
As with any great toy, there are limitations, but here is the low down for thoes who dont know about this little toy yet...
Out of the box its a PLC type system with three in's and three out's... It comes with two motors, two on/off "touch" sensors and one ir sensor... It also has (but not talked about) its own built in IR sensor which it can use but requires using some slightly more advanced programming languages than the one included.
There are all types of Visual Basic programs available, but thats all I have seen so far. The lego site talks briefly about it I belive.
There are also add ons available for it... a heat sensor, a rotational sensor and of course more motors.
The toy is pretty nice, but really requires some patience engineering the remaining bricks to do what you want, and as always, if you dont have some legos already, you will want to go and get a few kits, because you will be limited despite the large quantity of bricks included.
Hope this helps clear some stuff up.
Re:Mindstorms (Score:2)
The Robotics Constructor Set (Score:1)
Re:Same old same old. (Score:1)
Re:Hmmm. (Score:1)
Re:Same old same old. (Score:1)
Or perhaps you could look at it the other way - that by creating things, we're honoring the Creator (imitation being the sincerest form of flattery and all that).
PRC (Score:5)
Programming for the Mindstorms robots isn't very hard. However there are many other problems with them.
For one you are only allowed to have three engines on a given mindstorms robot. I guess i should more accuratly say that you are only given 3 power terminals to plug your engines into, you may plug in more than three engines, but then two of them must go in the same direction.
Another problem with the mindstorms robots is that they don't allow much room for a "smart" robot, as you are only given 3 sensors (like the engines above you can plug in more than three sensors but then two of them must respond to the same stimulus).
Also the strength of legos in general is much worse when you try to put legos and a moving vehicle into one. Your building style will have to be entirely reformed if you plan on keeping your mindstorm alive for more than 10 minutes. The technic legos help with this a little, because they are longer and contain those neat axle shafts which we used liberally. But overall if you decide to change anything on the robot it will have to be entirely rebuilt for strengh/durability reasons.
The last major problem with mindstorms robots is that they cost way too much. For a kit including three engines, a bunch of legos, and one cpu unit(basically the bare minimum you can get by on if you want a robot that moves), it was > 500$.
Linux distro for Lego (Score:1)
Re:Same old same old. (Score:1)
And yet here you are, using a computer and posting (Score:1)
Re:PRC (Score:2)
The standard system costs $200 in the US, with over 700 pieces including the CPU (RCX). Only two motors are in the kit, another motor costs about $20.
Robotics are expensive, Legos are expensive, but this isn't that bad a deal.
Re:PRC (Score:1)
Re:Hmmm. (Score:1)
Whatever happened to TC-LOGO for Lego? (Score:1)
Re:WebCam mount, NQC, legOS (Score:4)
The assembly is built solely from the parts that I received in my Mindstorms kit a year ago (no add-ons, no extra sets). One motor runs the manages the rotation in the horizontal direction (spin) and the other manages rotation in the vertical direction (tilt). The whole thing sits about 8 inches high and the RCX unit does not form part of the base (we have it slightly separated since the IR signal comes from another computer across the room).
The program keeps track of spin and tilt so that users can't spin it all the way around (tangling up the cord in the process) nor can they tilt more than 90 degrees in any one direction. The program also allows a certain point to 'marked' as the initial starting point for the tracking, and there's a handy reset feature (not available outside the internal network). He also wrote the telecam daemon that resides on my Linux box that handles the actual control of the webcam (the web stuff is on a different server).
Streaming is handled by (*gasp*) a Windows program, Webcam32, that actually came with the Java code necessary to the streaming. It was a nice little package. Fastolfe is currently in the process of writing his own program for Linux that will use bttv or something similar to do the same thing, but for right now, it's working pretty dandy.
Setting this thing up isn't very difficult. Of course, with the post to Slashdot, it's getting hit pretty hard, but the great thing is, that we've gotten more feedback about potential problems (as Fastolfe said, "Finally, someone who knows how to open their Java console") in the past five minutes than we've received since we put the thing up.
I prefer NQC... (Score:2)
I got my mindstorms kit a while back but i havent played with it a lot recently. I know 300 bucks (canadian ;) is a lot to spend but i think it was completely worth it since i have quite an investment in a lot of other technics lego kits. Now i am able to use all those pieces to make tonnes of stuff!
I tried using the RCX software which came with it (under emulation on my mac) but it was deplorable.. not just slow, i found it icky to use. I tried using RoboLab (the software used in the educational market from Dacta) but that was graphical too! I finally chose NQC and so far have found it the most useful. Theres just something about whipping out a bunch of code and compiling it ;) rather than dragging a bunch of icons together and hitting 'SEND' (imho).
the last thing i remember making is a garbage dump truck which used sensors to pickup and empty a garbage container, then drive away.. (wasnt my idea, i saw it on the web) but it was my implementation. The next thing i want to make is a wicked sports car with a rack & pinion steering and a gear box. Check out Ben's Lego Creations [staticip.cx] for ideas. He has some really neat designs.
i also recommend the new david baum book (he made NQC) for general programming and lego design issues. I love this book. Check out his site [enteract.com].
cheers,
nitin
Re:No perl (Score:2)
pbFORTH, mindstorms, and alternatives. (Score:2)
to be a great alternative to the Lego firmware
in providing more granular control of the RCX and
in its functionality. I especially enjoyed the
ability to try out commands on the fly via a terminal (without having to compile or write a
whole program first).
At this time, however, I find I'm spending more of
my time in NQC. It's a fantastic tool -- very C
like and feature-rich. I find I haven't really
run into a situation yet where pbFORTH's extra
functionality has been required (and consequently
the installation of a firmware different from that
which came with the RIS).
Ultimately, I'm not sure I need to spend the time learning FORTH, just to play with legos.
Last, I have no opinion of legOS, since I haven't
tried it yet. It looks very cool, though.
It's probably worth mentioning that most of these
alternatives are due to the reverse engineering
of the RCX done by Kekoa Proudfoot:
http://graphics.stanford.edu/~kekoa/rcx/
Re:Your Lucky... (Score:1)
Daniel
Re:Java console? (Score:2)
robotics (Score:1)
I wanted to buy the mindstorms kit for prototyping purposes but there were too little acutator an sensors that could be fixed on the RCX.
I was thinking a system in which multiple sensors/motors were linked via a bus would be more useful - I wonder if the RCX can be programmed to do that.
By the way, has anyone managed to build a lego based laser guided bomb yet?
Re:anyone who thinks he's serious.(someone had to) (Score:1)
Fun Fun (Score:1)
Re:Mindstorms (Score:2)
Mindstorms is sort of limiting (Score:4)
At first I thought, oh, that's OK. That still involves problem solving and working with constraints, yes?
But what constraints! Forget any notion of building Rodney Brooks [amazon.com]-like robots: You get three sensor inputs. Even if you were willing to spring for lots of extra-cost sensors, and used some clever multiplexing schemes, you'd be hard pressed to build an insect that could even know whether its legs were up or down, forward or back.
And seemingly simple robots have a way of using up the parts that come in the standard set. Once you've built a track following robot, what do you do with it? You've used up both motors. Similarly, once you've built an arm that can raise/lower open/close its claw, you've used both motors, both touch sensors, and most of the gears and structural pieces.
I'm afraid that I lost interest pretty quickly.
Yes Perl! (Score:1)
How about Assembly? (Score:1)
Forth is tiny, but assembly can be even more tinier, be made even more compact, and reach a higher benchmark in execution than Forth or any other language.
Is there a LEGO-assembler? Any geek out here want to invent one if there isn't one already?
Legos. Yum (Score:3)
Mark Miller has made modifications to allow each sensor input on the RCX to handle four different sensors per input (for a total of twelve sensors per RCX unit). He has also provided example code in NQC to show how to handle the situation. Here's the link: http://www.eagle-software.com/MindFest.h tm [eagle-software.com]. This is a great solution for those of you who would like to use more than 3 input devices on a single brick.
What am I doing with mine? Currently I'm trying (honest!) to create an ATV that can map out its immediate surroundings (using proximity detection [http://www.mop.no/~simen/legoproxi.htm [www.mop.no]], and input from touch sensors) so that if it gets stuck it can quickly figure out how to leave the area. I just purchased my second set and a myriad of sensors too. Joy! =)
--
My coolest thing (in NQC) (Score:2)
The Public 8-Ball [federated.com] is a robotic magic 8-ball driven by Lego bricks, RCX, and a radioshack motor (it's burnt up all my lego motors and they are just too expensive.) Hit it with Netscape and see your destiny in real time.
And please, if anyone has a Java applet to display a stream of JPEG frames let me know, then IE users can see the 8 ball too.
I may be slashdot resistant now. After a dozen or so people are queued for 8 ball shaking I start deflecting.
Re:PRC (Score:1)
Re:Mindstorms (Score:3)
I don't know just how cool it is yet, though. I got a set for my son for Christmas and he hasn't yet let me near it.
--
Re:Perl for Legos? (Score:1)
By the same logic, no one should use the cyrillic alphabet because I don't know it.
I'm rather sick of hearing "perl is a write-only blah blah blah." Is my annoyance apparent yet?
"Moderation is good, in theory."
-Larry Wall
Re:NQC (Not Quite C) (Score:1)
It actually seems to be very capable and easy to use. It lets you use the multitasking capabilities of the RCX in a simple fashion (although I can't find semaphores or mutexes anywhere
It also has variables, as an above poster lamented about the provided programming tools.
Re:Mindstorms is sort of limiting (Score:3)
For less verbosity, I'll call the motor controls A, B, and C, and sensors 1, 2, and 3.
Additionally, I'm assuming the motor outputs are tri-state (forward, off, reverse), but sensors are binary (shorted, open).
[Method 1]
Leave A for motor control, and multiplex it via a serial output from say, B. Leave sensors 1, 2 for direct use, and make 3 a multiplexed one. Contol the sensor multiplexor from C.
[Method 2]
Use A, B for motor control. Use C to control multiplexors for both motors and sensors. Again, sensor input 3 is multiplexed.
[Method 2.1]
Control motors by using a positive-going multiplexing scheme, and sensors by a negative going (reverse) scheme.
[Method 3]
Again, A is for multiplexed motor control.
Again, 3 is for multiplexed sensor control, 1, 2 are regular sensor inputs.
Use B as a clock, and C as data to control a shift-register, whose outputs connect A or 3 (as appropriate) to inputs.
I'm not saying that the constraints aren't limiting, just be imaginative and try to think of something. I don't know if these ideas work or not, but they're ideas for people to try, perhaps mess around with, which can lead to more ideas. Perhaps try various constrained microcontrollers (very little RAM (from bytes to countable kbytes), low clock, constrained instruction set, low program memory count [there are processors that separate program instructions from RAM]), like Basic STAMPs, PICs, to more "expansive" processors like a HC11.
The challenge is to make things work given a constraint (usually cost) >G. Perhaps you'll make an "MindStorm Expansion Brick" that hooks up to the RCX unit and offers a lot of sensors/motor control, at the expense of software complexity.
Mindstorms + X10 = useful? (Score:1)
One way to do it would be to use the X10 serial port dongle which is a remote transmitter for any X10 device, and rig up a 9-pin port on the Lego brick, perhaps with its own power supply.
Re:wootchu talkin' 'bout willis? (Score:1)
I wonder if Hemos has read it?
~~~~~~~~~
auntfloyd
Re:How about Assembly? (Score:2)
I still think NQC is great for quick hacks, though
Re:No perl (Score:2)
I think the current processor architecture of assembler->C/Forth->Pascal/Lisp/Perl is an effective one, which suggests that mindstorms should exec an assembler variant.
On the other hand, it is worth noting that as stated, Forth lends itself heavily to small interpretor size. Stack languages are trivial to implement, and one can always compile from another language down to the forth interpretor.
Personally, I'd go for asm if possible, multiple registers and all that. But if that isn't an option for some reason, Forth plus a good compile-down language would be fine
librcx (Score:1)
I haven't done anything cool yet because I don't have enough sensors. Having a second brick would be nice too. Hmm
Re:Same old same old. (Score:1)
IMNSHO, it is impossible to take the Bible literally. It would take a stunning amount of ignorance in the face of all we know about it do so. If you are going to use the Bible as a religious text, maybe study it's history and much of the pre-israelite matieral behind much of it.
Re:PRC (Score:2)
for two complete kits. Now my Partner and I can build our own machines and not have to fight over the RCX or other parts. Also, get one of the big Plano fishing tackleboxes, lots of nice little compartments for little Lego bits, and room in the bottom for your robot and the IR box.
Pitsco has extra prats and the Robolab (LabView) software for $25, that makes 5 different environments for programming the RCX.
Lego's RIS 1.5 graphical
National Instruments RoboLab graphical
NQC C to RCX firmware bytecode compiler
PbForth to Forth bytecode firmware interpreter
LegOS H8 RealTimeOS
Not bad for a 'toy' , if only all consumer electronics could be programmed by the end user,
I'd love to change the onscreen menu's on a lot of my A/V equipment... I'd go out of my way to buy 'open' electronics, manufacturer's are you listening?
I really hope someone will moderate this up. (Score:4)
The whole system was programmed in a LOGO (Remember that one, geeks?) environment called LEGO TC LOGO. It ran under DOS. I have been unable to find any control programs for this thing except for the stupid worthless DOS based LOGO.
Is anyone else still using this system? Is there anything for it under Linux?
~GoRK
Forth for the PalmPilot (Score:1)
I'd like to see an app for the Palm -- written using Quartus Forth for the Palm of course -- that would let you control and program the Lego brick directly from the Palm infrared port. [quartus.net]
Neal Bridges
Quartus Handheld Software! [quartus.net]
Re: Write-only Perl (Off-Topic) (Score:1)
TIMTOWTDI is opposed to orthagonality. It makes it easy to learn how to do new things, but makes things harder to maintain.
This isn't anything that can't be overcome with good comments and uniform coding style (ie: everyone in a group using the same methods), but it is a definite tendency in any language that gives you more than one way to do common tasks (this is true of C++ also).
IMHO.
YMMV.
ps: my email address isn't real.
You're Lucky (Score:1)
NQC at high school (Score:2)
--
UML models running on Lego Brick (Score:1)
I have built UML models and translated them into ANSI C, compiled with gcc (using rcx-tools) on Linux and run them on the Lego brick. [The UML modeling tool suite is BridgePoint/MC-3020 from Project Technology [projtech.com].]
Actually, the H8 micro (inside the brick) is a pretty hot little micro. $200 is pretty cheap for an engineering prototyping system.
Forth? hmm. (Score:1)
I am of course talking out of my ass here, but i wonder if you could adapt this pbForth thing to run under Open Firmware.. and use the macintosh as a kind of replacement brain for the lego mindstorms.
This would bring the number of things a macintosh can do without any kind of operating system to two-- the first being play Pong [machack.com].
Meaning we're two uses ahead of all you PC users. Ha! You think you're so great, with your "linux operating system".. but without Lilo, you're NOTHING!! MWAHAHAA!!
-mcc-baka
i got my head but my head is unravelling
can't keep control, can't keep track of where it's travelling
programming vs. robotics (Score:2)
That said, you're right that the lack of IO is constraining. You can use multiple RCXs linked via an infrared network, but that of course doubles your cost. It'd be nice if Lego would release an "RCX Pro", with something like eight inputs and eight outputs.
(While I'm wishing, I'd also like to see a MiniRCX, about 1"x1"x2". It'd be supercool if that had a large number of IO ports, but I'd be happy as long as they were made to talk to each other easily -- you could fit quite a few in the space taken by a regular RCX, after all.)
--
Re:I prefer NQC... (Forth info) (Score:1)
I'm getting off topic, I suppose, but Legos aren't the only platform where FORTH is available and you are not going to waste your time learning it.
Versions, free and commercial, exist for any Unix with GCC [gnu.org], DOS, OS/2, Macintosh [taygeta.com], Windows [forth.com], the Palm Pilot [quartus.net], and dozens of microcontrollers. Did you know that FORTH is part of the Open Firmware [ieee.org] provided in the Sun and the PowerMac boot proms? (Note IEEE requires a subscription, so check out Sun's OpenFirmware [sun.com] page)
The experience on one platform transfers well to another and there is lots to like about FORTH, especially when dealing with an environment with exceedingly limited resources in comparison to a PC.
This list of FORTH implementations by platform [forth.org.uk] is a little dated but should point in the right direction.
Overcoming the limitations... (Score:1)
Re:NQC (Score:1)
Joystick sensor for Mindstorms (Score:3)
Briefly, with any switch-based joystick, you can use different resistors between each direction wire and ground so that unique sensor values result which can be read by the RCX.
When it's done, you have a 10-position switch that's very useful -- discrete values for joystick in the center, all 8 positions, and fire button pressed. (trigger RCX-mounted weaponry? Mmmm...)
Complete info is available at http://xidus.xidus.net/joystick.html [xidus.net]
Have fun, and let me know if you do anything interesting with this sensor, or even if you manage to build one correctly.
-
$ more ~/.sig
********
Re:PRC *More than 3 motors* (Score:1)
Logo (Score:2)
--
My lego accomplishment (Score:1)
I finally solved a problem I've been working on for several years: a Technic four-speed transmission done my way. Sure, the SuperCar(the coolest Technic set ever) 8880 has it, but no reverse. Last friday I was really bored at work, so I laid out my (flawed) plan that has been sitting on graph paper for years, and finally ironed out the kinks. Now I just need to get drawing again and put the plans on my website, and look for a place on it(so the gears don't get in the way of each other) to implement reverse. It's tricky, but can be done.
And after I finished that, I found an alternate way using universal joints to make odd, but nicely spaced gear combinations.
How about PBasic? (Score:1)
I've read alot of hype about the Lego Mindstorm and while it looks fun I have found the Basic Stamp to be much more interesting. For those of you who don't know the Basic Stamp is a small microcontroller with a built in interpreter, and memory unit. The interpreter understands a version of Basic called PBasic (stands for Parallax Basic), and it's very simple to program. For those of you interested in Electronics and Embedded computing this is a great way to get started at a fraction of the cost (the stamp unit only costs around 35 bucks). I highly recommend these two books for starters:
"Getting Started in Electronics" By Forest M. Mims III (Published by Radio Shack).
"Programming, and Customizing the Basic Stamp Computer" By Scott Edwards.
also Nuts and Volts magazine has a monthly column dedicated to the Basic Stamp. This is the ultimate in hacker toys =).
www.parallaxinc.com has more info. Enjoy.
Good points, but... (Score:1)
About Money__ -- people should be punished for not bothering to read articles (ie, the "-1 Redundant" moderation for posts that ask questions answered in the article), not rewarded for exploiting the lazy.
Also, the Whores to the Karma Whores do serve ONE purpose: we OCCASIONALLY remind moderators that the post we are mocking were either off-topic nonsense or information simply filtered from the original article. This IMPROVES the signal/noise ratio (for people who sort by score; 0-5, which I believe is most of the slashdot community) because Singal11 and Money__'s mostly useless posts won't get their knee-jerk score of 5.
Of course, some people are probably just doing it to be assholes. I apologize for those wankers.
Check out Lego Robots Galore (Score:2)
Re:Mindstorms (Score:2)
Ralph Hempel is a pretty cool guy... (Score:1)
If you want to (possibly) meet Ralph, and see some cool LEGO bots in a competition, *and* you'll be in the Toronto area this weekend, check out the 4th Annual Toronto Lego Robotics Event [utoronto.ca], and look at my team's entry from last year [utoronto.ca]. It's been totally redesigned, so watch out for it...
Re:My lego accomplishment (Score:2)
They did? OH great. They just launched the Sputnik of Lego transmissions. Now I gotta catch up with a 6 speed transmission. You see, that's my dream job, to actually design new Technic sets for a living. If there was a part I needed to have made, I could of just had a custom one(like filling in the gap of technic gears they have) made and introduced into the lego part family.
Re:Hmmm. (Score:1)
LegOS for Linux!! (Score:1)
Re:You're Lucky (Score:1)
Re:PRC (Score:2)
Actually, you've got 3 bits there. With some (very) clever cam design, you can get up to 8 different locomotion modes going. Don't think about motors - think about shafts and cams.
Re:Just Forth? (Score:1)
"Structure and Interpretation of Computer Programs" and "Scheme and the Art of Programming" for example.
The biggest problem would be the garbage collector, but that problem is not a huge one as incremental real time garbage collectors exist, and the interrupt handlers would all be written in something lower level anyway.
Anyone want to take a stab at making "Mindthtorm" (lego LISP)??
Re:Variables (Score:1)
Languages of the `(pure) functional' class do not have variables of any kind. They are still very complete and useful work can easily be performed with them. See for example HUGS [haskell.org] although IIRC HUGS (and Haskell) is not a strict/pure functional language.
Re:Hmmm. (Score:1)
Tom
Aweswome! FORTH!!!!!! (Score:1)
ttyl
Farrell
...with memories of GraForth on the APPLE ][...
Re:Just Forth? (Score:1)
Re:Perl for Legos? (Score:1)
Re:How about PBasic? (Score:1)
The $35 version has 256 bytes of EEPROM (program memory), 7 word registers (data memory) and 8 I/O lines that can drive a LED (barely). The $59 version has 16K of EEPROM, 16 registers and 63 bytes scratchpad RAM. In order to drive a motor, you need extra circuitry. It is programmable with, well, BASIC.
Mindstorms RCX brick has 16K EEPROM, 32K RAM, 3 outputs that can drive Lego motors directly, 3 I/O lines that can read sensors (some of them are active sensors, so there are I/O lines rather than just input lines), a built-in IR port, an LCD, a buzzer, and a couple of buttons. (And of course a Lego-compatible case.) It costs around $100. (The complete Mindstorms kit is about $200). RCX is programmable with any number of languages, including regular C and C++.
The Handy Board [mit.edu] has 32K RAM (upgradeable to 64K, and of course one can build a serially addressable memory too), 4 outputs that can drive DC motors, two servo outputs, 16x2 character LCD, two user-programmable buttons, one knob, piezo beeper, 7 analog and 9 digital sensor inputs, and an IR port. And, above and beyond everything, an open, documented design. It costs $200 to $300 built and tested, and is available from any number of manufacturers. PCBs are available too, cheaply. It runs Interactive C (a bytecode-interpreted C variant) and some varianto of Java.
There is an expansion board for Handy Board too (10 analog inputs, 4 inputs for active Lego sensors, 9 digital outputs, 6 servo outputs, and general prototyping area).
Moderate this down (-1, Obssessive)
--
Re:Mindstorms is sort of limiting (Score:2)
Multiplex everything via sensor output. (Yes, you can program the sensor port to do output). And you can still use this port for passive input I believe.
[Method 5]
Just add another RCX, make 'em talk via built-in IR.
Moderate this down (-1, Silly)
--
Re:Mindstorms is sort of limiting (Score:2)
Well, as Markus Noga, author of legOS said during our "Extreme Mindstoms" panel discussion at MindFest 1999 [hempeldesigngroup.com], "Form is liberating"
What he meant was that within the bounds of a fixed set of parts and capabilities, the challenge is to do some thing useful with the exisiting parts, not to wish for parts to build bigger things.
Just about every LEGO enthusiast goes through a bulk acquisition mode, where the goal is to get as many parts as possible. The resulting time spent sorting severely limits building time :-)
Check out my pbForth MazeWalker [hempeldesigngroup.com] for a bot you can build with just the parts in RIS 1.0 - well I added two rotation sensors and two micromotors, but you could also use touch sensors as shown in Mario Ferrari's TicTacToe Robot [geocities.com]
Have fun...
pbForth MazeWalker (Score:1)
I've got a number of comments ranging from "what a stupid idea it is to eliminate cross-platform issues by compiling right on the brick" to "what a great idea it is to eliminate cross-platform issues by compiling right on the brick" Now I don't know what to think anymore...
Here's a real pbForth application. It's a robot that navigates mazes drawn on paper. No, it's not on wheels, it's really a gantry crane, but it's something that the standard Mindstorms firmware can't do...
pbForth MazeWalker [hempeldesigngroup.com]
Have fun...
LegoBUS (Score:1)
Re:No perl (Score:2)
Pictures and Documentation (Score:2)
http://fastolfe.net/features/telecam/ [fastolfe.net]
Re:No perl (Score:2)