Skip to content

Commit

Permalink
simple.ino example to support both Arduino's & ESP8266 without any co…
Browse files Browse the repository at this point in the history
…de changes
  • Loading branch information
ToniA committed Feb 9, 2016
1 parent d34dfc6 commit 0224301
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/simple/simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
#include <HyundaiHeatpumpIR.h>


IRSenderPWM irSender(3); // IR led on Duemilanove digital pin 3, using Arduino PWM
//IRSenderBlaster irSender(3); // IR led on Duemilanove digital pin 3, using IR Blaster (generates the 38 kHz carrier)
//IRSenderBitBang irSender(1); // IR led on ESP8266 digital pin 1
#ifndef ESP8266
IRSenderPWM irSender(3); // IR led on Arduino digital pin 3, using Arduino PWM
//IRSenderBlaster irSender(3); // IR led on Arduino digital pin 3, using IR Blaster (generates the 38 kHz carrier)
#else
IRSenderBitBang irSender(1); // IR led on ESP8266 GPIO pin 1
#endif


// Array with all supported heatpumps
Expand Down Expand Up @@ -67,4 +70,4 @@ void loop()
while (heatpumpIR[++i] != NULL);

delay(2000);
}
}

0 comments on commit 0224301

Please sign in to comment.