Lately, I’ve acquired a Sphero, a little ball described as “The Ball. Evolved”.
Sphero can be controlled by Bluetooth. SDKs are available for Android and iOS, as well as many applications and games.
The ball can also work with Cylon.js, a javascript library for robotics, GoBot (for the Go langage) or Artoo (for Ruby).
Let’s see is a very simple example running with Cylon.js over node.js.
In this example we will ask Sphero to roll and to make a u-turn if there is a collision (e.g. a wall).
We will also change the color at each collision.
We can improve the script to make the ball run, do a u-turn, change the direction or the speed using the keyboard.
Finally, we can add a function to ask Sphero to change its drirection automatically.
In conclusion, I would say that Sphero is a very fun toy (touch controls on smartphone are really amusing). But it is also very good tool to learn programing, in particular for children.
In fact it could be renamed “Turtle graphics. Evolved.” :)