Send data from raspberry pi / banana pi to arduino

for Raspberry pi
git clone git://
cd wiringPi
chmod +x build

for banana pi
git clone
cd WiringBPi
chmod +x build

Edit source before build for change pin

both pi
git clone --recursive git://
make codesend

Download and install library rc-switch from

usage from shell
./codesend 12345

arduino wrote in serial monitor (sketch ReceiveDemo_Simple from rc-switch example)
Received 12345 / 24bit Protocol: 1

for antenna look this

execute code for a specified time in Arduino

const int ledPin =  13; // the number of the LED pin
int ledState = 0; // ledState used to set the LED
unsigned long previousMillis = 0; //will store last time LED was updated
unsigned long interval = 1000; //interval at which to blink (milliseconds)
void setup() {
  pinMode(ledPin, OUTPUT); //set the digital pin as output:

void loop() {
  unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval) {
    previousMillis = currentMillis; //save the last time you blinked the LED
    //if the LED is off turn it on and vice-versa:
    ledState ^= 1;
    digitalWrite(ledPin, ledState);