So I am working on making my own custom hexapod. I will be using 3 DOF legs and the Arduino Mega2560. After I have it up and running I want to write different walking sequences (i.e. walk forward, walk backward, etc....) as well as some positioning/stance codes ( high stance, low stance, rotation, etc.....). I know this is feasibile and prohaps simple to some of you guys. My question is would it be possible to make a controller for it. Something like a handheld board with push buttons. I have attached a rough sketch. I know this would be a pretty easy to make but how would I have it send the button inputs to the arduino mega on board the bot so that it could respond to the commands? Thanks. Or maybe even hack a game console wireless controller.

Thank you for the diagram is is very helpful. Do you know where I can find an example code. I am just not sure how to differentiate between the different buttons using the single I/O pin that goes to the Transmitter to be sent to the on board MEGA. thanks again!

Okay, so I have read through the keypad library. Now I am just confused on the transmitter/receiver combo. I was wondering if someone could help me out. So I would map a keypad that would have 12 keys. Similar to the one shown in your schematic. Now I know which button I want to do what and how to code the mega onboard to execute the commands. The part I am confused about is if the transmitter only has one data pin how to I code the 12 different outputs since the arduino mini digital pins only have a high/low output? If this is wrong please correct me. Here is what I am thinking

The keypad gets wired to 3 column inputs and 4 row inputs, 7 keys only.When the keypad library is running, it reads the buttons and reports back when a key is pressed, and gives a value for it.You then pass that value to virtualwire and it sends it to the RF transmitter using D12 (as the default pin, I think).

On the receive side, the code is looking for data coming in on D11 (default I think) and is read out similar to reading a byte from the serial port, and then you act on it.

Take it in steps - get the keypad library working so you get the value you want when you press a button.Then add the virtual wire code so you can send that button value out.