xbee help

I want to connect 2 arduino megas with xbee shield so if I press a button on one of them it wirelessly turns on a LED on the other.

Permission granted.

do yo know how one would do this?

I'm guessing here, but probably by studying a few tutorials and examples.

Follow the tutorials to get serial communication working between the two boards, then you need to invent a protocol to pass information. It could be really simple...if one Arduino receives an "A" then turn on the LED, if it receives a "B" then turn it off.

do yo know how one would do this?

Yes, but "this" comprises several distinct activities, and you haven't told us which one(s) you have problems with.

You need to have/acquire two Arduinos. Have you done this? You need to have/acquire two XBee shields. Have you done this? If so, which ones? You need to have/acquire two XBees. Have you done this? Is so, which ones? You need to attach the XBees to the shields. Have you done this? You need to attach the XBee shields to the Arduinos. Have you done this? You need to configure the two XBees to talk to each other. Have you done this? You need to write code for the sender to send data, via the serial port, that the sending XBee can broadcast. Have you done this? You need to write code for the receiver to read data, via the serial port, that the receiving XBee received over-the-air. Have you done this?

None of the steps is hard (except for parting with all the money). Once you have the parts in hand, connecting the hardware is trivial. 2 minutes, tops. Configuring the XBees (if you get/have the right ones) takes about 5 minutes or less.

Writing the code takes the longest, but is easily accomplished in less than a day. I had mine talking in less than an hour, but I have lots of experience developing protocols and communicating serially. Debugging will be the hardest part, but, if iRagDoll can get XBees to work, you can too.

Let us know what you need help with (except the money part; you're on your own there).

well I havent got/done anything yet right now its just in a theoretical stage to see if its possible before I anything. So since you are seeming to be giving me some good ideas I might go ahead and order the parts.

Before you order the XBees, note that there are two different kinds - point-to-point (Series 1) and mesh (Series 2.5). For what you want to do, get the Series 1 modules.

They come in regular and Pro versions. The Pro version has higher range, and eats batteries.

The range is also affected by type of antenna - chip, wire, or external. I get 75 feet or better with the wire antennas on the regular version.

I have mine set up with 4 LEDs - Green, Yellow, Red, and Blue, and 4 push buttons. They are used by an ambulance crew to quietly communicate patient status between the back and front of the rig. Yelling at the driver to hit the lights and sirens scares the hell out of patients being transported, so some quiet means of communication was needed.

I was looking at this model

is it a series 1?

Yes, but unless you really need the range that the Pro versions have, and can afford the current requirements, the regular versions are a lot cheaper.

i have 7 amp/hour and 2.2 amp/hour SLA’s do you thing these could handle the current draw of the arduino and xbee?

You can look at Digi.com to find that the regular XBee normally uses 35mA while transmitting. The Arduino will use less than that.

Even if it used an equal amount, the total is only 70mA. A 7A/h battery would power the combination for 1000 hours, theoretically.

If the XBee is not actively transmitting, it uses 50mA, according to digi's documentation. Huh? Start transmitting to lower your power consumption. Doesn't make sense.

From personal experience, the Arduino/XBees will run several hours on 4 AA batteries.

You haven't said anything about your requirements, so I don't know if a 7A/H or 2.2A/h battery will suffice.

I'm designing a wireless model rocket controller mainly for fun and to learn about the Arduino programming across multiple fields like LCD's wireless data transmission. I like to be ambitious so i thought this could be allot of fun so my main requirements would be

-reasonable battery life (2 or 3 hours)

-long range, hence my xbee pro choice

-LCD display

-and finally to have fun building and programming it