So after researching a bit, I found the easiest way to interface an Arduino is to issue it commands through infrared, similar to how the remote works. With a carrier frequency of about 39.5kHz, you would send a 12 bit signal (with 1200 bits per second) through an IR LED to be received by the robot. Alternatively I would imagine you could bypass the infrared all together and hardwire a serial connection between the Arduino and the receiving ports of the CPU. (IE soldering a direct connection from the Serial Out to the negative pole of the LED, I assume. To make sure this works I'll try on some old DVD player or something first just in case I'm wrong and mess something up by accident)
The remote for the Roboquad has 19 buttons, however it has 4 shift levels, Unshifted, Green shift, Yellow Shift, and Red Shift. When a shift mode is active, it will change what each button does. Thus this allows for 72 different operations. (18 keys not including shift, times 4 functions per key)
The structure of the signal works like this:
- A 4 bit prefix denoting the model of the target robot is sent (If you have one remote to distinguish between different Wowwee robots). For the Roboquad its 0110 (0x600 in hex).
- An 8 bit instruction that contains information about what shift is active as well as what key was pressed. For example, the walk forward command is 0x601 (Prefix [0x600] + D-PAD-FORWARD UNSHIFT Instruction [0x001]).
- No end bit, so there needs to be about 500ms between commands.
If I wanted to send a walk forward command through my Arduino, here is what I think I'll have to do:
- Hook an IR LED to serial out
- In setup() use Serial.begin(1200); //to denote the Bits per Second as 1200
- Call Serial.write(0x601); or Serial.write(011000000001); or Serial.write(1537);. Not sure which will work, though all of them are equivalent.
This will be my first test. That is... after I salvage a new IR LED after blowing out my only one a while back :)
A really nice table of the commands (and my source for this information) is available here.
It is 1am and I have to be up again in 5 hours so I'm out for now.
No comments:
Post a Comment