Introduction: Simple Arduino Serial Communication.

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.

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 @

Comments

Ice2monkey (author)2012-03-12

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.
.

Im sorry Ive been working on other things lately and havent gotten around to it yet. But its simple just add a

Serial.print('U');

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

About This Instructable

4,857views

10favorites

License:

Bio: 18 | Music | LEDs | Deep Bass | Light Shows | Ramen | Computers | Sound Systems | Radioshack | Outdoors Thats pretty much my life! More »
More by hightekrednek2396:Simple Arduino serial communication.Easy Virus PrankESD Containment Unit (ECU)
Add instructable to: