Need a little help with communicating wirelessly.
Here is the setup: I have 2 Arduinos for this project.
Arduino #1 has 2 motor controllers attached to it. One motor controller controls 2 DC motors attached to it. This allows the vehicle that Im using to move forward, backward, turn left, and turn right. I can do all of this through the serial port monitor by pressing 'w', 's', 'a', and 'd' respectfully.
The other motor controller controls an actuator that raises and lowers 2 solar panel cells. It is also controlled through the serial port monitor by pressing 'u' and 'n' respectfully. The solar panel cells are used to charge the rechargeable batteries connected to the motor controllers to keep them at 9V+.
Got it so far? LOL I will attach code as soon as I can, cause it truly does work. The thing is that all of the code is done using the USB port and the 5V it supplies to the Arduino.
What I want to do is to take this project and go wireless with it! This is where Arduino #2 comes into play.
Here is what I want to try to do.
Arduino #1 will be converted to a "trasmitter" of sorts that as I type in my different commands into the serial port monitor, Arduino #2 will "receive" those commands and control what needs to be controlled ie... going forward, going backward, moving the actuator up, etc.
I was lucky enough to get some [u]great[/u] information from CrOsh that allowed me to get a transmitter/receiver combination to work.
What Im asking from the readers and Arduino gurus is this: how do I connect this thing up? Im having a hard time understanding how the TX and RX lines work so that I can make my project wireless.
The link for the transmitter/receiver is as follows: http://www.seeedstudio.com/depot/2km-long-range-rf-link-kits-w-encoder-and-decoder-p-321.html IT IS ONLY FOR REFERENCE!
I have both the transmitter and receiver bits soldered to LOW, which doing the initial setup, I can get an LED to turn on (if you can unzip the RAR file associated with the above link, youll know what Im talking about) wirelessly.
I know that all I need is 1 data line to do this, because all Im doing is sending 1 character wirelessly. Maybe even 2 because of the ASCII format.
So, to sum this all up since Ive given all the information that I have (minus the original code for the motor controllers)... can I use the TX and RX lines to interface the transmitter/receiver link? If you can show me an example code of what you would try, that would be excellent too.
This is something that Ive looked at to get a general idea of where to start. Take a peek at it and see if you believe the same thing. http://www.glacialwanderer.com/hobbyrobotics/?p=291
It uses the TX and RX lines just as I would need, but as Ive stated before, Im having trouble with how the code should be.
How would you do it if it was your project? I cant use anything else because Im limited to what Ive stated above.
Anything at all will help me reach my FINAL goal which is getting this ROBOT of sorts to work wirelessly.
Thanks a BUNCH to anyone that read this or posted suggestions. CrOsh... youre the man!