Plug it and Remote Control Arduino by RF !
Among so many remote control methods, Radio Frequency should be the cheapest solution for simple remote control projects like home automation, remote control car etc.
There are two parts in this shield: transmitter and receiver. There are 4 channels for switch signal, that means when you use it for controlling car, just enough for its forward, backward, left and right.
Building interactive work is as easy as piling bricks, just plug it to our Sensor Shield with a buckled cable, and make it looks professional and neat.
Two free buckled cables is included.
The demonstration below shows a LED being switched on & off remotely by a button module with this RF shield.
Code for Receiver side:
int ledPin = 3; // pin for the LED
int RFinPin = 8; // pin for the RF receiver
int val = 0; // variable for reading the pin status
void setup() <{br>
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(RFinPin, INPUT); // declare RF receiver as input
}
void loop()<{br>
val = digitalRead(RFinPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, LOW); // turn LED OFF
} else <{br>
digitalWrite(ledPin, HIGH); // turn LED ON
}
}
Code for Transmitter side:
int RFoutPin = 8; // pin for RF transmitter
int buttonPin = 2; // pin for pushbutton
int val = 0; // variable for reading the pin status
void setup() <{br>
pinMode(RFoutPin, OUTPUT); // declare transmitter as output
pinMode(buttonPin, INPUT); // declare pushbutton as input
}
void loop()<{br>
val = digitalRead(buttonPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(RFoutPin, LOW); // transmit LOW signal
} else <{br>
digitalWrite(RFoutPin, HIGH); // transmit HIGH signal
}
}
ข้อมูลเพิ่มเติม www.warf.com