You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
417 B
Arduino
16 lines
417 B
Arduino
2 weeks ago
|
#include <RCSwitch.h>
|
||
|
|
||
|
RCSwitch mySwitch = RCSwitch();
|
||
|
|
||
|
void setup() {
|
||
|
Serial.begin(9600);
|
||
|
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
if (mySwitch.available()) {
|
||
|
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
|
||
|
mySwitch.resetAvailable();
|
||
|
}
|
||
|
}
|