Pages: [1]   Go Down
Author Topic: Wireless Radio Communication  (Read 97 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey I am trying to set up a wireless link between this transmitter: https://www.sparkfun.com/products/10534 and this receiver:
 https://www.sparkfun.com/products/10532

I followed this tutorial: https://www.sparkfun.com/datasheets/RF/KLP_Walkthrough.pdf to get the link established and working however I can't seem to get it to work. I have the transmitter hooked up to an arduino uno on a 9v power supply and the receiver on a duemilnavo powered by my computer. When I tune it I get two instances where the serial line displays zero. I am really confused and could use help thanks for your time.
Logged

Offline Offline
Edison Member
*
Karma: 41
Posts: 1394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The tutorial is for testing, using the serial TX and RX is not very practical. Actually, it is wrong.

This is better:
Connect both the transmitter and receiver to your computer, and start the Arduino IDE twice. Select different usb-serial ports, so each Arduino IDE is talking to its own board.
Now you can develop both the code for transmitter and receiver, and can have Serial.println() on both, because you can also open two serial monitors.
Don't use pin RX and TX for the transmitter or receiver, use those only for the usb-serial port to the computer.

The only good software is VirtualWire or RadioHead.
http://www.airspayce.com/mikem/arduino/VirtualWire/
http://www.airspayce.com/mikem/arduino/RadioHead/

Connect a wire to the antenna pin. Any wire is better than nothing.

Check the wiring of the receiver careful, some receivers have other output levels or use a different pin order.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help, but how would I wire the receiver and transmitters if not to the TX and RX pins? Would I set them up with a digital pin and use the radio head library? Which library should I use?
Logged

Offline Offline
Edison Member
*
Karma: 41
Posts: 1394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The VirtualWire can use any digital pin.

The VirtualWire works very well, you can use it. It has become a part of the RadioHead library.
The RadioHead is a combination of libraries for many transmitters and receivers.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am looking at the virtual wire library specifically the transmitter and receiver examples and I cant find what pin I need to hook up the transmitter and receiver to, respectively.
Logged

Offline Offline
Edison Member
*
Karma: 41
Posts: 1394
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The documentation is not very clear.
The ptt is almost never used, but there is still a pin defined for it.
These are the library default:
vw_ptt_pin = 10
vw_rx_pin = 11
vw_tx_pin = 12
You can use other pins with : vw_set_ptt_pin(), vw_set_tx_pin(), vw_set_rx_pin().
Logged

Pages: [1]   Go Up
Jump to: