Professor Michael Littman of Rutgers is using Scratch (the MIT graphical programming language for teaching programming to kids) to teach people to program household appliances. Littman teaches two courses “Great Insights in Computer Science” for nonmajors and “Programming for the Masses,” which apparently tries to develop the tools needed for the other course.
I’ve read several puff pieces about the work:
http://computinged.wordpress.com/2010/12/20/using-scratch-to-control-household-devices/
http://www.dailytargum.com/news/program-makes-gadget-control-user-friendly-1.2427386
http://www.rutgers.edu/about-rutgers/demystifying-comp-sci
but none of them discuss how the Scratch programs are interfaced to the hardware. [Note: Jens Mönig pointed me to a student paper about the project which does discuss many of the things mising from the puff pieces. See the comments below.] Most of the hardware they discuss (coffeemaker, a lamp, an alarm clock, a fan and holiday lights) does not have built-in computer interfaces. For the coffeemaker, the fan, and the holiday lights, they may have had simple on-off controllers (which one can buy or make fairly easily). But other things one might want to program (like running a coffee grinder until the appropriate amount of coffee is ground or closing drapes when there is more light in the room than outside) are not amenable to simple on-off control without sensors or feedback loops.
I don’t see how turning a fan on and off will be more motivating to beginning students than making simple video games (which Scratch was designed to do). That said, I was very disappointed that the initial Scratchboards that MIT came up with for interfacing to the outside world had only sensors and no outputs. (I bought one anyway, but my son and I did not use it much.) I wonder whether they are using standard off-the-shelf control hardware, like the PowerSwitch Tail or Phidgets, or whether they wasted a lot of student time re-inventing the controllers. I like the packaging of the PowerSwitch Tail, but it is designed to interface with microcontrollers (like the Arduino), not directly with a USB bus. An Arduino, an enclosure, and a half-dozen PowerSwitch Tails would provide all the USB-interfaced on-off control the students could handle for a cost of about $150 (a minimal system with one Arduino and one PowerSwitch Tail would be under $50). A Phidgets relay board might be a bit cheaper for controlling multiple outlets, but would require wiring up power cords and using an enclosure to hide the 120v wires.
Since the non-majors course seems to get about as far in programming as I got teaching Scratch to 5th graders, I’m not sure that including real-world sensors would be within student capabilities. The Rutgers article claims that the students learn about recursion, but Scratch does not support recursive programming, so it must be a fairly shallow understanding that does not include writing a recursive program. (The course sounds to me more like a middle-school or freshman high school course than a college course, but colleges are teaching a lot of things at that level, including algebra and composition.) [Again, the student paper points out my mistaken assumption. They used BYOB, not Scratch, and BYOB does have recursion, so the students could have been given more programming than I was assuming.]
What I’d really like to see would be a way to translate Scratch programs into programs that would run on the Lego NXT bricks, as I’ve never been very fond of the Lego graphical programming languages.
Filed under: Scratch Tagged: Arduino, computer science, education, Lego, programming, Scratch
