I know this might be a dumb question, but I am trying to get two arduinos to communicate using radios. I need it to transmit > 50 ft. Remember, I would like two way communication. I like to follow tutorials so I know what I am doing. I have seen Xbee, but it seems very complicated, a transceiver (I think) would be the best bet.
Can anyone point me in the right direction with tutorials or radios to use?
I have seen Xbee, but it seems very complicated, a transceiver (I think) would be the best bet.
Buy the right modules (series 1). Configure them, to set PAN ID, MY and DL. Plug them in. Send using Serial.print. Receive using Serial.available and Serial.read. How complicated is that?
This is exactly what I want to do:
I know the circuit, but I am wondering about the code and how to configure the xbee's.
See reply #2. I've done something similar, except with 4 switches and 4 LEDs and batteries. Press one switch on either device, the corresponding LED on that device, and other device come on, and stay on until another switch is pressed, on either device.
You can use a pair of transmitters and receivers. Sparkfun sells a cheap RF transmitter/receiver pair for less than $10 bucks. You could get one pair in 315Mhz and the other in 433Mhz. Each Ardiuno would have a transmitter and receiver of different frequencies. Virutal Wire will hook them right up. Its up to you to create the protocol on how they exchange info ack/reply etc.
I did not think of that idea. Does it really work? Also, Is there a way to get rid of all the garbage that the radio pairs get. I want a clear connection, no garbage. How would I do this?
Also, Is there a way to get rid of all the garbage that the radio pairs get. I want a clear connection, no garbage. How would I do this?
Use a pair of XBees. You get what you pay for.
They work for me. Virtual wire is pretty aggressive on getting clear packets through. If your concern is lost packets, then your protocol design is important. Also the data transfer is slower (low frequency), so the size of the information you need to exchange also becomes a factor. Another issue is how often an exchange of info needs to be done? Will there be more than two Arduinos involved? Do you need a "mesh" of Arduinos talking to one another (or master) and any random time?
If all you are doing is a single point to point, small data packets, a not so noisy environment, I'd see XBee as overkill. The cost of a pair of RF units compared to a pair of XBees and shields is quite a bit of difference. If you find the $15-20 investment on cheap RFs work, that's a chunk of change you can spend on something else.
Don't get me wrong, XBees look cool (I haven't used them). I suspect the protocol they implement handles a bunch of the issues you'd have to handle on your own via your protocol. It appears they operate at a fairly high frequency, so their data rate should be a lot more.
Go read the comments on Sparkfun on their usage for both the RFs and XBees. They are what made my decision to use the RF units for my projects.
Xbee's are easy to use and simple if you just need to receive data from sensors. That's what I usually use them for. I have used Xbee's with remote sensors and newsoftserial library. No real need for Xbee libraries for my use, I just count data packets to get my A/D conversion data. For details see http://tropicarduino.blogspot.com/
as Fatboy suggested, use the cheap transmitter/receivers and the Virtual Wire library, which you can read about in http://www.open.com.au/mikem/arduino/VirtualWire.pdf, and you can download the software at http://www.open.com.au/mikem/arduino/VirtualWire-1.5.zip