Using a keyboard to navigate a virtual space; be it the internet, a game or some other format, is familiar to most adults and older children. The Wowwee Rovio (rover) can be driven by such keyboard controls or mouse clicks with the built-in interface. Couple of problems with this however:
- The interactive needed a custom interface so the built-in web interface (and keyboard controls) would not work.
- The interactive needed to be accessible to children as young as 3 years old.

The custom interface was built with ActionScript3 and so to move the rover, the api was used. With the api, the rover could be sent movements via http requests. These api requests needed to be mapped back to user input and so the web interface was recreated in with as3. The ASDW keys were mapped back to specific movement requests via the api. This is a specific piece of code initiated by a keypress that gets sent to the rover:
switch(e.keyCode){
//forward
case 87: //W key
drive = 1; //1 maps to forward
speed = 1;
request.data = "Cmd=nav&action=18&drive=" + drive + "&speed="+speed; //action 18 is manual drive mode
loader.load(request);
break;
}
The drive variable signals the command/direction for the rover (forward, backward, rotate right) and the speed variable is how fast the command should be executed by the rover. Sending one of these http requests would move the rover a fraction of an inch. Mapping each key to a specific movement and sending multiple commands successively reproduces the motion of the built-in interface. This does not remedy our problem of simplifying the interface for 3 year olds. This is where the custom hardware comes in.
Our custom hardware consists primarily of a joystick but also includes some auxiliary buttons for game functionality which I will describe in a following post. The hardware came from Suzo Happ and also included a UGCI board for USB interface. The UGCI board had an included key-mapping utility which was used to map the joystick and button contacts to key presses. A constant connection with the joystick in any direction sent a repeating key press rather than a key up and down.
With key presses mapped to the joystick control and to the rover’s api through actionscript, the rover could now be driven with custom joystick controls. Now if only our rover could see…







February 11th, 2010 - 3:40 pm
[...] Custom hardware controls [...]
March 3rd, 2010 - 12:10 pm
[...] that we can move the robot, we need to be able to see where we are going. To give our robot eyes within flash, I first tried a [...]
May 20th, 2010 - 1:20 pm
[...] Making the most of your toy robot (Part 1 of 4) – Custom hardware controls Making the most of your toy robot (Part 2 of 4) – Object Detection Making the most of your toy robot (Part 3 of 4) – Processing the video stream in Flash Making the most of your toy robot (Part 4 of 4) – Docks and Beacons [...]
May 22nd, 2010 - 6:57 pm
Ah, my wonderful carpentry skills on display.