Help Xbee Rc controle

Hey all i need some help for a robot project i have 2 x xbee 2.5mW and a xbee explore i an working on make it so i can controle my robot on the <^> arrow keys but i dont know how can somone please help me thx and sorry for my english :wink:

Well, there are all kinds of things here that you might need help with.

Configuring the XBees. Connecting the hardware. Getting key press information. Sending that key press information to the serial port. Reading the serial data on the Arduino. Interpreting the serial data on the Arduino. Making the appropriate motor(s) spin.

Tell us what hardware you have (with links) and which of these things you don't know how to do.

Tell us a bit more about why you are trying to do this. Is it a school assignment? If so, what grade/level/major/field of study.

Hello

it all the stuff i am new on arduino and xbee so idont know that mutch.

yes its a school assignment for a robot project i am working on i will post a link in here when i am done.

My hardware is:

1x xbee explorer http://www.sparkfun.com/commerce/product_info.php?products_id=8687 2x Xbee 2mW Series 2.5 Wire Antenna http://www.sparkfun.com/commerce/product_info.php?products_id=8695 1x Arduino Main Board http://www.sparkfun.com/commerce/product_info.php?products_id=666

thats the hardware then i need it so i can controle it from my computer like Right, Left, Forward, Backward and some more like turn on light on (x) or somthing

THX For Helping M8 :D

The XBees you got were not the best choice. The series 2/2.5 radios are for forming meshes. The series 1 radios are for point-to-point work (i.e. two radios talking to each other).

You will need some application on the PC to send data to the serial port. That data will go (automatically) to the XBee Explorer to the XBee and will be broadcast (once the XBee is configured).

On the Arduino, you'll need for your sketch to read serial data, and respond to it. This will require that you define a protocol - what commands will be sent, with what data, at what speed (baud rate), etc., that both sides can implement.

You didn't tell us anything about the robot, and what other parts you have. Do you have a motor driver? You'll need one if the motors draw any serious amount of current. If they don't, you can connect them directly to a pair of digital pins. Set one high and the other low to go one way. Reverse which pin is high to go the other way.

Of course, if the motors are low enough current to power directly, they won't have the torque to move a robot, so you probably want a motor driver.

You didn't tell us what field of study this is for. If it's a programming class, you'll get less help on the programming, since that is what you are supposed to be learning.

Hello Agen!

1. i can buy another one if i need another xbee mondule.

2. i have X-Ctu

3. hmm ?

4. The robot hardware is: 2 motors (12v. 3A.) i need it to turn like a tank i have light, horn, and 1 servo that press a button for a wather canon

5. 12v. 3A.

6. i am in a normal schole were we have 4 weeks schedule free to make a project or go do some internship.

Thx Agen :D !

1) I'd suggest getting a pair of series 1 XBees. They are much easier to get talking to each other.

2) X-CTU is for configuring the XBees. It can not read your keyboard input and send that to the serial port. You could use the Serial Monitor window, but after each key press, you'd need to press the Send button.

A C++ or C# windows forms application would let you control the robot using key or the mouse.

http://www.Processing.org has a free application that lets you interface with the serial port and Arduino. It doesn't care that there are a pair of XBees in between.

3) Not as hard as it sounds. You want commands like L, R, F, and B to control direction. You could have more complex commands like P,3,0 to turn the LED on pin 3 off, or P,8,1 to turn the LED on pin 8 on. The same commands could be used to control the water cannon. Something like S,6,90 to move the servo on pin 6... You could include buttons on the form to control the cannon, and a slider to control the servo. You could capture the mouse position within a window to control direction (and speed).

4) You definitely need a motor driver for motors like that.

As long as you are not expecting us to write all the code for you for a computer science class, we'll be willing to help.

There are plenty of examples provided with the Arduino IDE for moving servos, reading switches, etc. There are examples provided with all (at least most) of the libraries.

Processing, if you go that route, provides examples of how to do serial communication. Even of you decide to write your serial data sending application, the examples are useful to see what to send.

Except for Grumpy Mike, most everyone here is friendly. Even he is useful, though, as he knows tons more about the hardware side of things than I do. :)

Keep us posted on your progress.

1.) Can i use http://www.let-elektronik.dk/shield_xbee.htm ??

2.) ehhm okay cool.

3.) okay i need 2 x light and the 2 x servers for the wather canon and the i need 1 x to the horn but if i just have the firs one i can easy code the rest of them i think.

4.) can i use http://www.let-elektronik.dk/motor_l298_dual_h_bridge_motor_driver.htm ??

There are plenty of examples provided with the Arduino IDE for moving servos, reading switches, etc. There are examples provided with all (at least most) of the libraries.

Can you post some ?

Thx agen mate :smiley:

  1. Yes.

  2. Probably. Link is formatted incorrectly, so it doesn’t work. But, the name implies that it should work.

Can you post some ?

No. First, I don’t know which ones would be helpful to you. Second, you already have them if you have installed the Arduino IDE. If you haven’t, you should, even of you don’t have the Arduino yet. You could look at the examples and the reference documentation, and begin learning about programming while you wait for the hardware.

Okay i found a betther way to do it now i just need some help. i have 2 Arduinos and 2 xbees

i need so when i press a button connected to one of the arduino it sends through the xbee to the other arduino so a led turns on.

Thx For the help :D

On the sender, use Serial.print, just like you were sending data to a PC. The XBee will see the data on the serial port, and broadcast it, too.

On the receiver, use Serial.read, just like you were reading data from a PC. The XBee will collect broadcast data, and place it in the serial port, just like it had arrived on the serial port from the PC.

Okay but can i use the xbee i have and how do i config then so they working and what wire do i have to connect and were?

what wire do i have to connect and were?

Plug the XBee into the shield (match the XBee shape to that drawn on the shield) and plug the shield into the Arduino (it only fits one way).

As for configuring them for two way communication, I don't know. I was not able to get two series 2.5 radios to talk to each other. One would talk to the other, but never got a response.