Não pode escolher mais do que 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
16 linhas
417 B
C++
16 linhas
417 B
C++
#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();
|
|
}
|
|
}
|