set pin to INPUT
This commit is contained in:
parent
f9b8797951
commit
8569cb45c1
@ -18,6 +18,7 @@ public:
|
||||
mySwitch.enableTransmit(SEND_PIN);
|
||||
rcDevice.send(rcSwitch["value"]);
|
||||
mySwitch.disableTransmit();
|
||||
pinMode(SEND_PIN, INPUT);
|
||||
}
|
||||
|
||||
virtual void toJson(unsigned long value, JsonDocument& jsonDoc) {
|
||||
|
||||
@ -17,6 +17,7 @@ public:
|
||||
mySwitch.enableTransmit(SEND_PIN);
|
||||
rcSwitch["state"] ? rcDevice.switchOn(group, channel) : rcDevice.switchOff(group, channel);
|
||||
mySwitch.disableTransmit();
|
||||
pinMode(SEND_PIN, INPUT);
|
||||
}
|
||||
|
||||
void toJson(unsigned long value, JsonDocument& jsonDoc) override {
|
||||
|
||||
@ -11,5 +11,6 @@ namespace RC {
|
||||
void setup() {
|
||||
mySwitch.enableReceive(digitalPinToInterrupt(RECEIVE_PIN));
|
||||
mySwitch.setRepeatTransmit(10);
|
||||
pinMode(SEND_PIN, INPUT);
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,6 @@
|
||||
#define RECEIVE_PIN 2
|
||||
|
||||
|
||||
RCSwitch mySwitch;
|
||||
SerialReader<200> serialReader;
|
||||
|
||||
void setup() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user