05-06-2023, 01:13 AM
[Arduino source code for KC868-A32M]-05_433_RECEIVE
Code:
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(115200);
mySwitch.enableReceive(digitalPinToInterrupt(14)); //IO19
Serial.print("begin test");
}
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();
}
}