05-17-2022, 01:07 AM
(This post was last modified: 05-17-2022, 01:12 AM by KinCony Support.)
[Arduino IDE demo source code for KC868-E16S]--#01-KC868-E16S-433-decode
Code:
/*www.kinocny.com */
/*KC868-E16S CODE OF 433MHz decode*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(digitalPinToInterrupt(4));
}
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();
}
}