Smart Home Automation Forum

Full Version: [arduino source code for KC868-Uair-8] RF 433MHz wireless remoter decode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(13));
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}


download arduino IDE source code file: 
[attachment=461]
Note: install "rcswitch" library online firstly.
[attachment=462]