From 1301947c7a007cb76ea1716228b9565ad5da4aa1 Mon Sep 17 00:00:00 2001 From: Ronald Schaten Date: Thu, 21 Apr 2016 09:31:34 +0200 Subject: [PATCH] let the library handle initialization --- things/DeviceIrRx.h | 2 +- things/DeviceIrTx.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/things/DeviceIrRx.h b/things/DeviceIrRx.h index f2d6192..0eb845e 100644 --- a/things/DeviceIrRx.h +++ b/things/DeviceIrRx.h @@ -23,7 +23,7 @@ class DeviceIrRx : public Device { }; void DeviceIrRx::deviceSetup() { - //pinMode(pin_irrx, INPUT); + // pinMode(pin_irrx, INPUT); // this is done by enableIRIn() irrecv.enableIRIn(); pinMode(pin_power, OUTPUT); digitalWrite(pin_power, HIGH); diff --git a/things/DeviceIrTx.h b/things/DeviceIrTx.h index 14fd82e..ae5a6d4 100644 --- a/things/DeviceIrTx.h +++ b/things/DeviceIrTx.h @@ -21,7 +21,8 @@ class DeviceIrTx : public Device { }; void DeviceIrTx::deviceSetup() { - pinMode(pin_irtx, OUTPUT); + // pinMode(pin_irtx, OUTPUT); // this is done by begin() + irsend.begin(); } bool DeviceIrTx::irTxHandler(String message) {