Simple Arduino Serial Communication.

Introduction: Simple Arduino Serial Communication.

About: 18 | Music | LEDs | Deep Bass | Light Shows | Ramen | Computers | Sound Systems | Radioshack | Outdoors Thats pretty much my life!

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.

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:

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 @

Hack It! Challenge

Participated in the
Hack It! Challenge

The Mad Science Fair

Participated in the
The Mad Science Fair

4th Epilog Challenge

Participated in the
4th Epilog Challenge

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    2 Discussions

    0
    Ice2monkey
    Ice2monkey

    8 years ago on Introduction

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

    0
    hightekrednek2396
    hightekrednek2396

    Reply 8 years ago on Introduction

    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.