Sunday, November 11, 2012

Less Whining, More Trying

Less whining, more trying

I do not want to be one of those people who whines about something that they know nothing about so I bought an Arduino Pro Mini 328 - 5V/16MHz  and a Pro Micro 5V / 16MHz Arduino Compatible Microcontroller on-board USB made by Sparkfun and mounted them on my board, the RAM-B II for a break-out board that I can plug in my sensors and servo motors directly. It turns out that the Pro Micro is pin-for-pin compatible with our motherboard, originally made for the BX-24 which is nice since I manufacture the RAMB II.
Arduino Pro Mini based on theATmega168

As predicted, there are some housekeeping chores that need to be done to get a PC to talk to this thing and I found myself recalling dos commands to get the bootloader working.  It now recognizes the device but I am still getting an error when I try to download a program.  I am confident that I will be resolve my problem later tonight after I post this blog entry so I guess it wasn’t that difficult to get up and running.

 Arduino has some very cool features.  There are lots of ‘Shields’ available that allow users to assemble an Arduino to meet their specific needs.  So far, I am only interested in using it to control the robots that I use to teach my program and I do like the 'DFRobot Nano I / O Shield' (break-out board) - with the Arduino Nano USB Microcontroller.  I do not yet know if Arduino has any advantage over either PIC16F876A or Netmedia’s Atmel based BX-24, the other two platforms I am currently using to teach the kids.  I suspect that I will be able accomplish most, if not all of the tasks Arduino can tackle with either one of those controllers.  Of course we have written the books for PIC Programming for the Impatient and "Basic-X and Robotics - The Art of Making Machines Think and I know these books well but I have been looking at tutorials on Arduino’s home page and on Limor Fried's (Lady Ada's) page .  My student’s learning comes first and I am looking at Arduino with an open mind.

Writing subroutines has been renamed, ‘Hacking’: Please correct me if I am wrong but it seems like the Arduine-ites have added slick subroutines that do cool things and then explain how, but not so much why and call that level of programming ‘Hacking’.  I thought that writing sub-routines was the next logical step after kids learn how to program events to occur line-by-line.  I guess it’s just semantics and marketing – kids want to be ‘Hackers’ so we’ll tell them that ‘Hacking’ means learning to write code.  When I think of ‘Hackers,’ I think of JohnnyPneumonic  or Count Zero,  – but maybe that’s just me.

Simpler is a better way to start out. Arduino can most likely do everything BX-24 can do but in a C-like language – that is the good news for people already know C but for me, teaching 10-12 year old kids, or anyone new to programming for that matter, Basic is, well, basic, more intuitive and easier to make the transition from B(asic) to ‘C’.  I think that giving complex solutions and explaining why they work is backwards.  I prefer to lead my students to what I want them to discover and I am frequently surprised by new solutions they come up with that I hadn’t thought of.   It is better to accept a new, possibly less efficient solution that a student has discovered than to take away the sense of accomplishment and wonder by showing them an elegant solution and explaining why it works.  My criteria are, how well do my students understand the language and how rapidly can they learn to write code to cause their robots to do what they want them to do.

Dueling Platforms: I will continue to program my new Arduino Pro Mini until I can accomplish all of the tasks I currently do with the PIC and the BX-24.  Then I will have the non-destructive robot battles, line following, Sumo and Table-top navigation, between platforms.   It’s kind of like the difference between boomerangs and Frisbees – I can challenge myself to a robot battle, moving each platform ahead as each one gains an advantage over the other .  I will update you on my progress.