:: The Background ::
Many of the WowWee robots are ideal for hacking. The RoboSapien Version 1.0 is very complex inside and simple at the same time. Doing a simple motor and switch count though yeilds 9 Motors and 8 Switches. Assuming you want both forward and reverse on each motor you would need on the order or 26 digital/analog IO pins. The Arduino barebones from Modern Device has 13 digital and 6 analog but that is not enough to replace all this functionality.
So a "Wedge" implementation seemed the best choice. The concept of the software "Wedge" has been around for a while. Basically it is a program that does nothing most of the time but then can be activated on a special sequence. Wedges have other names like hooks (as in Kernel Hooks), Terminate and Stay Resident, or call back. This approach allows me to still use the RoboSapien as normal but also take complete control.
Location of the head connector.
Basically I powered the Barebones Arduino board off the VCC of the RoboSapien. This makes it so the Arduino goes on and off with the Robosapien itself. VCC is the Red and the Black is ground on the head connector. The White wire is the IR from the IR module to the RoboSapien controller and is shunted through the Arduino.
:: The Wiring ::
I am working on some diagrams. Here is a verbal description.
That is it. Four wires and basically you can command the RoboSapien V1.0 to do anything it normally can do and more.
:: The Software ::
The heavy lifting is done by the RSReadCommand subroutine. This is the interrupt handler for when pin 2 rises. When it rises we wait 1 and 1/4 bit times and then check to see if the pin is high or low. We shift that bit into the RSCommand.
RSSendCommand simply sends the entire command to the Microcontroller in the RoboSapien.
In the loop function when two RSStop commands are seen from the IR the wedge is activated and the RoboSapien microcontroller receives a number of commands in quick succession. They basically make him put his arms out and walk straight.
If two RSStop bytes are received again normal remote control is restored. Wedge mode is a little sticky because the rapid succession of command after receiving the first stop have to take place before the second RSStop will be noticed.
One thing I noticed about my RoboSapien is that the left and right seemed to be confused. Or maybe WowWee assumed you were in front of the robot and I tend to stand in the back. So you could use this Stop-Stop wedge to flip right and left and then it would seem natural when following the robot.
The new Arduino backpack for the RoboSapien V1.0
:: What is next ::
All this is a lead up to an upgrade on a new RoboQuad. But this basic platform (even with breadboard) will allow me to experiment with different ways of sensing the environment and then have the RoboSapien autonomously navigate a house. I plan to try navigating to the brightest/darkest, noisiest/quitest, or warmest/coldest place with a single RoboSapien remote key press (after the two stop presses).
Will add diagrams soon. (Ok. Not so soon.)
Karl http://www.coloradomesa.edu/~kcastlet
See also
http://blog.makezine.com/projects/tweetosapien-hack-a-robosapien-with-arduino-to-react-to-tweets/