Wednesday, September 3, 2008

Goodbye Vex Controller, hello Mindstorms!

Today I had a chance to test out the Mindstorms that Mr. Madsen (our teacher/coach) had bought for us to try out before the full FTC kit arrives. It's a amazing improvement!

First of all, the controller has a screen so you can choose the program you wish to run right from there (with the old controller we had to preprogram it with special homemade switches). It also has a bunch of demos to try out the different sensors and get a feel of their range.

The ultrasonic sensor (a sensor to record the distance an object is from the robot) seems to capture differences up to about 2 meters before maxing out. You can sort of play the theremin with it, holding a piece of paper in front of it and waving it closer and farther away (the output in the demo program is sound/pitch).

The light sensor is also neat, with two modes, reflected light and ambient light (the difference is the reflected mode shines a beam out to bounce off objects, while the ambient mode simply captures the light coming into the sensor). I started work on a line follower simply based on this sensor (though it is not as exact as, say, a color sensor might be)--see below.

This basic kit also comes with a microphone sensor that detects the decibels (blowing into it also triggers it) and the demo responds by moving a motor. Finally, the standard pushbutton sensor is also present.

In terms of software, I got to try out the NXTG platform for coding. It's a very simple way of laying out the code, but I somehow find it more clunky than coding by hand. It's something like the difference between the command line and user interfaces--it's just faster to type in a command than to set a bunch of options manually. On the other hand, in terms of learning it is pretty simple. It will probably be an excellent way for me to get the team members who wish to program a head start instead of diving into text code.

I was able to code a simple program that kept the robot from falling off a table, using the ultrasonic sensor. The program simply checks the distance to the floor/table, and drives forward until the distance is more than 3 inches. Then, it stops, reverses, turns, and loops back to the front of the program.

Another really neat part about the robot is the output options. Our old robot could only display terminal output (through a "PRINT" command) when the robot was plugged into the computer, the software was downloaded, and the program was running. With the new kit, I was able to have it display an icon of a street "WALK" sign when it was running, then turning arrows when it was turning. But that doesn't mean it's too simple to display more than images. It can display any value you wish anywhere on the screen, at any time. In addition, sounds are supported, including many humorous recordings of various words and phrases like "Alert" and "You're good!" In the future, when we have the controller, it will be able to output through bluetooth as well (though I don't know much about that).

The program also detects if the robot is connected and displays the various values in real time in a box in the corner--a good way to figure out the optimal defaults to use.

Speaking of programming, the old robot took 40 seconds or more to download code, no matter the complexity. It also only supported one program at a time. Want to change one value? Wait another 40 seconds just to find it doesn't work. But with the new kit, you hit the "play" button in the program, wait for it to compile (2 seconds), it downloads (1.5 seconds) and the robot beeps and begins running the new code. I like that!

In any case, this new kit is already exceeding my expectations, which were very high already. My only gripe would be the flimsiness of the parts, but this is just a temporary problem because the real kit uses metal parts instead of the wiggly LEGO parts that come with this kit.

PS: I spoke with Mr. Madsen and he said the metal parts were very expensive. I hope my plan to design first, build later will help us stop wasting metal like we did last year.

PPS: I got a Wacom tablet today. Perhaps I'll be able to use it to draw out design ideas (I mainly got it for my senior project).

1 comment:

Kat said...

wow, as i read this, im kind of worried, no joke. because this year when gavin graduates, what are we going to do? we definately need to give gavin some apprentices!