let the library handle initialization

This commit is contained in:
Ronald Schaten 2016-04-21 09:31:34 +02:00
parent f595ac746f
commit 1301947c7a
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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) {