emartee company |
|
| ||||
This 315MHz RF Module Kit including one 315MHz RF Receiver Module
and one 315MHz RF Transmitter Module.
This is the update version of this module kit, and the useage is
the same as old versin as below :
int ledPin = 13;
int switchPin = 2;
int sendPin = 7;
int recvPin = 8;
int value = 0;
void setup() {
pinMode(switchPin, INPUT);
pinMode(recvPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(sendPin, OUTPUT);
}
void loop() {
value = digitalRead(switchPin);
if (HIGH == value) {
digitalWrite(sendPin, HIGH);
} else {
digitalWrite(sendPin, LOW);
}
value = digitalRead(recvPin);
if (HIGH == value) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
}
Once push one button, RF transmitter module send the signal, and
receiver module receive the signal, at last light the LED of pin
13.
Click to download the schematic diagram and test code