Go Down

Topic: Control Feasibility (Read 866 times) previous topic - next topic

Hey guys,

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.

CrossRoads

Make yourself an RF remote control.
Something like this
http://www.robotshop.com/433mhz-transmitter-receiver-pair.html
with 12/16/20 button keypad.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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!

CrossRoads

Search for the keypad.h library. That's what I used.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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

keypad (12 keys) ---wires to mini 12 pins -----mini (1pin) wires to tranmitter (1pin) (what data does it send) ----- receiver gets data----wires to mega (1pin)----mega wires to servo and executes command based on button pushed.

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy