Small Basic and the EV3. Time to go play.

I saw a couple of blogs mentioning that Small Basic now has an extension that will interface with the Lego Mindstorms EV3 robot.  Being a Small Basic fan I had to give it a try so I borrowed an EV3 from one of the students.  Five minutes after figuring out how to move the program from the computer to the robot with the proper app I had the robot running around on my floor.  Oh boy, is this going to be fun.  Draw it on the screen with a turtle then draw it on the floor.  Kids are going to have a blast.  Having what is now a dual purpose kid friendly language is going to be so cool.  I have run the Mindstorms NXT with Python and Java but they were just a bit difficult to get setup for the kids.  They were also both a bit feature short.

I have programmed the NXT in Java, Python, NXT-G, Scratch (Enchanting) and RobotC.  NXT-G is just a pain.  It has the usual problems with D&D languages; lack of room to see the program, not method friendly, and using the wires to pass variables is a mess.  NXT-G also does not seem to get users ready to transition to a more traditional language.  Not always a necessity for home users but at a school I want to be able to have a bit more structural similarity in the languages.  At least in Scratch a loop looks like a line code loop.  Enchanting uses Scratch to program the NXT robot but it was a bit of a pain to implement and was a bit buggy.  RobotC is by far the most versatile, feature rich and transitional but the price sort of takes it out of my options to use at school.  (If it ain’t free, we cannot afford it.)  Having Small Basic, by far my favorite transition language from Scratch to Python/Java/VB languages, with this extension is just frosting on the cake.

So far all I have done is a For loop in an attempt to draw a square.  It is going to take some tinkering to get the 90 degree angle right and to see if there is a motor synchronization command so the robot will go straight.  (The motors are never exact so the robot has a tendency to curve off the straight.)  I like it when kids have to tinker to get things to work.  It looks like getting the sensors to work is going to be not as simple as RobotC or NXT-G, the extension only seems to see the raw input and the programmer has to figure out what to do with it, but that can just add to the problem solving.  I will have to dig through a couple of example programs to get an idea how things work but it should be fun.  Now if I can just get kids that have EV3s to loan them to the school.  I have eight NXT kits so I just need the bricks.  I am going to have to put the word out when school starts.

Looking on line I see there are attempts to build a Scratch/EV3 interface.  The setup requires using leJos, a Java virtual machine that allows the brick to be programmed with Java.  More stuff to play with.

There is just something about a job that requires I play with Legos and robots and kids.  I love my job.  Now I need to go home and play with my robot.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: