Add IR emitter inverter (#738)

#611 for m5stickc
This commit is contained in:
Florian authored and GitHub committed 2020-08-22 20:45:59 -05:00
1 parent 9d22f242e8
commit 1d7b569c6a
3 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ IRrecv irrecv(IR_RECEIVER_GPIO, 1024, 15U, true);
# else # else
IRrecv irrecv(IR_RECEIVER_GPIO); IRrecv irrecv(IR_RECEIVER_GPIO);
# endif # endif
IRsend irsend(IR_EMITTER_GPIO); IRsend irsend(IR_EMITTER_GPIO, IR_EMITTER_INVERTED);
# else # else
# include <IRremote.h> # include <IRremote.h>
IRrecv irrecv(IR_RECEIVER_GPIO); IRrecv irrecv(IR_RECEIVER_GPIO);
+6
View File
@@ -156,6 +156,12 @@ extern void MQTTtoIR(char* topicOri, JsonObject& RFdata);
//#define IR_PANASONIC //#define IR_PANASONIC
#endif #endif
#ifndef IR_EMITTER_INVERTED
# if defined(ESP8266) || defined(ESP32)
# define IR_EMITTER_INVERTED false //set to true if yuou want to reverse the LED signal for the emitter
# endif
#endif
/*-------------------PIN DEFINITIONS----------------------*/ /*-------------------PIN DEFINITIONS----------------------*/
#ifndef IR_RECEIVER_GPIO #ifndef IR_RECEIVER_GPIO
# ifdef ESP8266 # ifdef ESP8266
+1
View File
@@ -348,6 +348,7 @@ build_flags =
'-DLOW_POWER_LED_OFF=1' '-DLOW_POWER_LED_OFF=1'
'-DSLEEP_BUTTON=39' '-DSLEEP_BUTTON=39'
'-DTRIGGER_GPIO=39' '-DTRIGGER_GPIO=39'
'-DIR_EMITTER_INVERTED=true'
'-DIR_EMITTER_GPIO=9' '-DIR_EMITTER_GPIO=9'
'-DGateway_Name="OpenMQTTGateway_ESP32_M5STICK_C_BLE_IR"' '-DGateway_Name="OpenMQTTGateway_ESP32_M5STICK_C_BLE_IR"'
board_upload.speed = 1500000 board_upload.speed = 1500000