初始化提交
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Example for receiving
|
||||
|
||||
https://github.com/sui77/rc-switch/
|
||||
|
||||
If you want to visualize a telegram copy the raw data and
|
||||
paste it into http://test.sui.li/oszi/
|
||||
*/
|
||||
|
||||
#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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user