Picture of Simple Arduino serial communication.
I've wanted to make a wireless robot for a while by using x bees or other types of wireless communication. This isn't a complete i'ble as to where i show you how to make a robot this is more of a template. I'll show you the code i made and a couple pictures of what the setup would look like.

(please excuse the picture quality my camera is at my friends so i had to use an iPad)

ok i just realized that i didn't finish the transmit code ill get that up soon.
Remove these adsRemove these ads by Signing Up

Step 1: The code.

Picture of The code.
Here's my simple code i wrote(its made using the Arduino 1.0 beta so its an .ino file but ill get a .pde soon.)

-there made for the mega just so u can have many functions
-one is a receive and the other is a send
-it just uses a switch and case function depending on the char or int it receives

Step 2:

Picture of
The first picture is a simple schematic of how to wire an xb to ur arduino

TX-> goes to RX<-
Rx<- goes to TX->

then power pos and neg got to there respective pins.

Step 3: Working with the code.

The code is simple it gives u a basic outline of what it does when it receives a character U,D,L,R or integer 0-10.
Then you just put ur code with what you want it to do when that case is called.
The send code is a little more than that you have to setup how you want it to talk to the arduino either buttons or switches or sensors.
Then u should be able to wire it up and begin with simple wireless communication.

For questions Please either comment or email me @ jonstowe@live.com @
Ice2monkey3 years ago
Hey there. This looks like jut the starting point I need for sending step & direction signals fom one arduino mega to another using xbees. Any progress on the rest of the send code so I can figure out how o modify it or my application? I'm pretty new to the whole arduino c+ stuff so learning as I go.
hightekrednek2396 (author)  Ice2monkey3 years ago
Im sorry Ive been working on other things lately and havent gotten around to it yet. But its simple just add a


or another command and youll be good. Ill try and get it as soon as I get my computer back up and running.