Usage Example for Arduino UNO-Reading GPIO Output
SC2272-L4 is a latch decoder, the LED will light on when it receive corrsponding signal. In this tutorial, we use Arduino UNO to read the GPIO output.
RF modules need a corresponding remote controller to work together. Make sure the receiver and the remote control address are consistent before using.
Hardware Preparation
- DFRduino UNO + Gravity: IO Expansion Board (or similar) x 1
- Gravity 315MHZ RF Receiver Module x1
- Gravity 4 Pin Cable
Software Preparation
- Arduino IDE, Click to Download Arduino IDE from Arduino®
Wiring Diagram

Sample Code
Do you need to install any additional libraries? Explain it here
How to install Libraries in Arduino IDE (If there is no need to install any libraries, please delete this link)
/***************************************************
*Gravity 315MHZ RF Receiver Module(V1.0)
* ****************************************************
* The data received from the serial print module
*
* @author Dongzi([email protected])
* @version V1.0
* @date 2017-01-03
* All above must be included in any redistribution
* ****************************************************/
char mou_D0=8;// define pin 8 for receive module D0
char mou_S=13;// What is received with LED display
void setup() {
pinMode(mou_D0, INPUT);
pinMode( mou_S, OUTPUT);
}
void loop() {
char mou_S0=digitalRead(mou_D0);
if(mou_S0==HIGH)
digitalWrite(mou_S,HIGH);
else
digitalWrite(mou_S,LOW);
}
Running Results
The light will be on until you press the other button.
Was this article helpful?
