Arduino radio link – part 2

Part 1 has detailed instructions for setting up 2-way 2.4ghz radio communication between 2 Arduinos. In this post, I connect a button to the sender, and an LED to the receiver. The LED lights when the button is pushed. Once you have this working,  you can change it to any digital input and output.

Software:    Download sketch

Use the Arduino software to upload the sketch to the first device, which will have the button, then change the radioNumber variable to 0 and upload to the second device, which will be the receiver with the LED.

Hardware:

The radio module connections are the same as in part 1.

For the sender, connect a switch between D4 and +3.3V, and a resistor between D4 and GND. You can also optionally connect an LED to D2 on the sender which will light up when the button is pushed.

Wiring diagram for sender

Wiring diagram for sender

For the receiver, connect an LED in series with a resistor between D2 and GND. You can also optionally connect an LED to D3, which will on when D2 is off.

Wiring diagram for receiver

 

Sender and receiver

Sender and receiver

Testing:

Power up both circuits, and push the button. The D2 LED on the receiver should light up for as long as you have the button held down. If not, use the serial monitor to troubleshoot.

Once you have the LED lighting up, you can use the D2 output to control anything that can be switched with a digital output. If you need an active-low output, use D3.

Sender and receiver - on

Sender and receiver – on

Author: Paul

Share This Post On

Leave a comment