LEGO programming

Does anyone know where to find a guide on how to program LEGOs? I found the Coach’s guide, but that doesn’t tell you how to write out the programming, just how to supervise it.

Personally, I would suggest using a different prgramming language than the LEGO one. Not Quite C (NQC) is a very versital language that is a lot more powerful than the standard one. Plus, it is sort of a C derivitive, so if you already know C that great.

http://bricxcc.sourceforge.net/nqc/

Which version of Lego programming are you interested in? The Mindstorms version is in the RIS kits available in retail stores and the Robolab version is in the educational market version of the robotics kits.

I personally like the Robolab version. If you have a background in programming, a Robolab program looks a lot like the old flowcharts they used to teach.

Either way take a look at this website. I believe they have tutorials for both versions www.hightechkids.org

If you have any other needs, please contact me directly and I will be glad to help.

Ditto. RIS sucks. NQC is good. I don’t have much (any) expieriance in Robolab.

The Mindstorms SDK is worth checking out. Specifically MindScript, which is like C.

If you want, you can also try the Spirit control. You can use it in VB and VC++. PM/e-mail me for that, as it is no longer available.

LUGNET is also a very good resource.

What is the target PBrick? RCX, Scout, CyberMaster, Spybot, what?

IM me if you have problems.

Um, and if you are using the default environment, what version is it?

1.0 and 1.5 aren’t the greatest.
2.0 is better. :slight_smile:

If you are planning on coaching/mentoring a Lego League team, by the rules, you can only use the RIS or Robolab “programming languages”. If you are doing it for your own education, NQC or some of the other languages are probably much better.

Not to sound too far out of the loop :slight_smile: Is there, will there be a JAVA based version for interfacing with the RCX brick via the IR tower? I am becoming fluent in the robolab icon based programming as I work with middle school students in class. Our programming mentor and a professor from an area univerisity worked with NQC this last fall with our HS team members.

JAVA is about to become the first language that students in Texas HS learn now instead of C++. Don’t ask me why or what for, Showing my age, my first language was FORTRAN using a shop built minimainframe with three terminal stations and a single 8" floppy drive. The next year they threw that monster out and bought four new Apple 2Es…

So fill me in on JAVA and lego robots yes or no way…

Thanks,

APS :rolleyes:

You’re a youngster yet. :wink: The first computer I worked on used punch cards, had no non-volatile memory, and needed it’s clutch adjusted so the card reader could work. It was an IBM 402 and many years obsolete even before my school got hold of it. I learned BASIC and FORTRAN on a DEC (heard of them lately?) PDP-11 and a Xerox Sigma 7 respectively. Commercially available personal computers weren’t even around for another couple of years.

You think I’m kidding, don’t you, :rolleyes:

ChrisH

http://www.workshop3d.com/rcx/index.htm << That has a bit of step-by-step work for RIS and RoboLab. Hope that helps at all.

(By the way… Why does it seem like no one likes RIS? I certainly like working with it :o… In other words, what do the other methods have that RIS doesn’t?)

I love RIS. well, i just cant program in any other language that is… RIS 1.0 sucks though. that was just impossible to use. you cant stack any “ifs”
i use RIS 1.5. never tried 2.0… there is a 2.0 right?
RIS is so easy to learn…
oh, and by the way, what does a POWERFUL language mean?
and a little off topic… anyone have a spare usb type ir tower? all i have is a 9 pin type, and i cant use that with my laptop… or anyone know where to get one cheap??

You can use JAVA on the RCX if you load custom firmware. leJOS. Again, I reference you to LUGNET. And if you’re using the RCX, the IR tower is all you can use.

RIS sucks like MS Bob sucks. Or a brand new install of WinXP.
Translation: No power. You may think that’s good, until you use something else.

2.0 can basically do anything that NQC can do, only graphically. I’d recommend it if you don’t want to go text. :slight_smile:

Powerful as in, you can do what you want. :smiley:

Look on Ebay. Or the Lego Shop-At-Home site. :slight_smile:

I’ve only used Lejos once. That worked.

Or, if you know C/C++, you could use BrickOS. :slight_smile:

ive never had an instance where RIS1.5 cant do what i want it to do…except when it comes out as an error the program is too big for the RCX to download… does using a text language make it any lighter? well, RIS1.5 you can only split the ifs in twos. as in only true/false… so if i wanted suppose a simple 2 motor skid steer robot to be fully functional in every direction in 2 levels of speed, id need a stack of 19 T/F bricks. which gets very boring and confusing while creating the program.
in text, will that be easier?

Programming with the Spirit adds some odd functionality. Spedifically, compiling loops.

If you have 3 identical tasks that work on every motor, your can use a For loop and type it up once.

If you use RIS 2.0 software, then moving to NQC doesn’t really do much for you, unless you like programming…

The main limiting factor on the programming of the RCX is the firmware on it. To really be able to get the full power of the RCX, you need to replace that firmware with something else, for instance BrickOS or Lejos.

With either of those, you get all the control stuctures of their respective languages. Also, you get the full memory to work with, not just a “slot”. So, your programs can be the full 32k. :slight_smile:

nope. really dont like programming…
anyone know where i can download RIS2.0 for free? or does anyone have a spare one? please pm me or mail me if you do…

ahh. now that sounds interesting… taking some programming classes in school next year… hope it helps me get used to text… so i can actually use all 32k

That really is only true if you don’t want to modify the legos at all, and use them only for their intended purposes. If you really want to go all out and built accurately controlled prototypes, then you need to modify the hardware, and the software. For instance when prototyping one one my designs I had to interface a joystick made with two Potentiometer to the RCX and use it to control skid steering. And for that application I had to use NQC.

there is ALWAYS a way to do things with pure lego… might not be as small or easy, but its possible. a rotation sens. a light sens… a couple touch sensors can replace a pot.

I am using Interactive C to code my RCX. It is quite useful and easy to use; at least for someone that does not know C yet. Just thought I would throw in my two cents worth.

Nathan Pell

I’ll second Interactive C (which you can get from http://www.kipr.org/ic/). If you go to any of the Mindstorms based competitions (such as RoboCupJr or BotBall), you will find that all the winning robots use either Interactive C or Java.