Update IRRemoteESP8266 version to 2.5.5
factorize IR send signal function between the 2 types of receiving Add new IRRemoteESP8266 protocols replace pins on mega according schema remove unecessaries spaces
This commit is contained in:
1 parent
0180a0dbd5
commit
f0305236db
149 files changed
+20957
-7850
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* Copyright 2017 stufisher
|
||||
* An IR LED circuit *MUST* be connected to the ESP8266 on a pin
|
||||
* as specified by IR_LED below.
|
||||
* as specified by kIrLed below.
|
||||
*
|
||||
* TL;DR: The IR LED needs to be driven by a transistor for a good result.
|
||||
*
|
||||
@@ -30,11 +30,11 @@
|
||||
#include <IRsend.h>
|
||||
#include <ir_Trotec.h>
|
||||
|
||||
#define IR_LED 4 // ESP8266 GPIO pin to use. Recommended: 4 (D2).
|
||||
IRTrotecESP trotecir(IR_LED); // Set the GPIO to be used for sending messages.
|
||||
const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2).
|
||||
IRTrotecESP ac(kIrLed); // Set the GPIO to be used for sending messages.
|
||||
|
||||
void setup() {
|
||||
trotecir.begin();
|
||||
ac.begin();
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
@@ -42,14 +42,14 @@ void loop() {
|
||||
Serial.println("Sending...");
|
||||
|
||||
// Set up what we want to send. See ir_Trotec.cpp for all the options.
|
||||
trotecir.setPower(true);
|
||||
trotecir.setSpeed(TROTEC_FAN_LOW);
|
||||
trotecir.setMode(TROTEC_COOL);
|
||||
trotecir.setTemp(25);
|
||||
ac.setPower(true);
|
||||
ac.setSpeed(kTrotecFanLow);
|
||||
ac.setMode(kTrotecCool);
|
||||
ac.setTemp(25);
|
||||
|
||||
// Now send the IR signal.
|
||||
#if SEND_TROTEC
|
||||
trotecir.send();
|
||||
ac.send();
|
||||
#else // SEND_TROTEC
|
||||
Serial.println("Can't send because SEND_TROTEC has been disabled.");
|
||||
#endif // SEND_TROTEC
|
||||
|
||||
Reference in new issue
Block a user