Created
January 20, 2018 09:21
-
-
Save IOT-123/5d52d352e16cb8360f64fb15232fc733 to your computer and use it in GitHub Desktop.
One of https://github.com/sui77/rc-switch/ demos with pins included for D1M RFTXRX BLOCK.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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/ | |
modified fo D1M RFTXRX BLOCK pins | |
*/ | |
#include <RCSwitch.h> | |
RCSwitch mySwitch = RCSwitch(); | |
void setup() { | |
Serial.begin(9600); | |
mySwitch.enableReceive(D4); // D1 or D2 or D3 or D4 | |
} | |
void loop() { | |
if (mySwitch.available()) { | |
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol()); | |
mySwitch.resetAvailable(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment