IR controller shield LOLIN

From a user request @rradar I tested the following IR shield added to a wemos d1 mini and I can now confirm it works perfectly with OMG either for receiving or emitting.

Here are the specs :
https://wiki.wemos.cc/products:d1_mini_shields:ir_controller_shield
emitting range is about 2 meters with my tv.

You just have to change in config_ir.h the emitter pin to 0

#ifdef ESP8266
  #define IR_RECEIVER_PIN 2
  #define IR_EMITTER_PIN 0

2 Likes

That looks way cool think I be getting one this week

I have it now

Im getting these error

Arduino: 1.8.5 (Windows 7), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

Build options changed, rebuilding all
C:\Users\Debbie & StePhan\Documents\Arduino\OpenMQTTGateway\ZgatewayIR.ino: In function 'void MQTTtoIR(char*, char*)':

ZgatewayIR:398: error: 'GICABLE_BITS' was not declared in this scope

     if (valueBITS == 0) valueBITS = GICABLE_BITS;

                                     ^

ZgatewayIR:399: error: 'GICABLE_MIN_REPEAT' was not declared in this scope

     if (valueRPT == 0) valueRPT = std::max(valueRPT, (uint16_t) GICABLE_MIN_REPEAT);

                                                                 ^

ZgatewayIR:400: error: 'class IRsend' has no member named 'sendGICable'

     irsend.sendGICable(data, valueBITS, valueRPT);

            ^

ZgatewayIR:459: error: 'class IRsend' has no member named 'sendMitsubishi2'

     irsend.sendMitsubishi2(data, valueBITS, valueRPT);

            ^

Multiple libraries were found for "IRremoteESP8266.h"
 Used: C:\Users\Debbie & StePhan\Documents\Arduino\libraries\IRremoteESP8266
 Not used: C:\Users\Debbie & StePhan\Documents\Arduino\libraries\arduino_340847
Multiple libraries were found for "PubSubClient.h"
 Used: C:\Users\Debbie & StePhan\Documents\Arduino\libraries\PubSubClient
 Not used: C:\Users\Debbie & StePhan\Documents\Arduino\libraries\PubSubClient-2.6.09
 Not used: C:\Users\Debbie & StePhan\Documents\Arduino\libraries\AzureIoTHubMQTTClient
exit status 1
'GICABLE_BITS' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

could / have you made a the BIN file for it
have no idea what im doing

Wing it here

down to these error

Arduino: 1.8.5 (Windows 7), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

C:\Users\Debbie & StePhan\Documents\Arduino\OpenMQTTGateway\ZgatewayIR.ino: In function 'void MQTTtoIR(char*, char*)':

ZgatewayIR:398: error: 'GICABLE_BITS' was not declared in this scope

     if (valueBITS == 0) valueBITS = GICABLE_BITS;

                                     ^

ZgatewayIR:399: error: 'GICABLE_MIN_REPEAT' was not declared in this scope

     if (valueRPT == 0) valueRPT = std::max(valueRPT, (uint16_t) GICABLE_MIN_REPEAT);

                                                                 ^

ZgatewayIR:400: error: 'class IRsend' has no member named 'sendGICable'

     irsend.sendGICable(data, valueBITS, valueRPT);

            ^

ZgatewayIR:459: error: 'class IRsend' has no member named 'sendMitsubishi2'

     irsend.sendMitsubishi2(data, valueBITS, valueRPT);

            ^

exit status 1
'GICABLE_BITS' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

ill keep playing

Just tryed 0.7 and that works

so ME A HAPPY HAPPY CAMPER

the BIN files is available on the github here:

thanks will keep you updated

Insert the following before #include <IRremoteESP8266.h>

#define GICABLE_BITS 16U
#define GICABLE_MIN_REPEAT 1U
#define SHERWOOD_BITS NEC_BITS
#define SHERWOOD_MIN_REPEAT 1U
#define MITSUBISHI_BITS 16U
#define MITSUBISHI_MIN_REPEAT 1U // Based on marcosamarinho’s code.
#define AIWA_RC_T501_BITS 15U
#define AIWA_RC_T501_MIN_REPEAT 1U

and you can use newver versions of IRremote8266

2 Likes

sovled…

Can someone help me to edit the OMG 0.95 in platform IO to flash successfully for the the WEMOs D1 and Lolin Shield?

Here is my definition:

[env:nodemcuv2-ir-test]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.irremoteesp}
  ${libraries.esp8266_mdns}
build_flags = 
  ${com-esp.build_flags}
  '-DZgatewayIR="IR"'
  '-DTRIGGER_GPIO=0'
  '-DGateway_Name="OpenMQTTGateway_ESP8266_IR_TEST"'

And the test setup:

Thank you.
I could not compile without errors.
Do I need to make any other changes in the other parts of the platformio.ini, or in other files?

Using visual studio code platform IO to compile

Could you post these errors?

Yes I will do so very shortly. Thank you

I am still not able to get the IR sensor working for the lolin shield. can someone post all the files that they needed to edit for OMG 0.95 for this to work?
Physically, all I did was placed the shield over the wemos d1 mini. is there other wiring I need to do?

Could you give us the errors that you have?

Do i just flash the nodemcuv2-ir-firmware.bin file from https://github.com/1technophile/OpenMQTTGateway/releases?

Yes exactly, and follow the pinout above

Sorry, if i flash the firmware.bin file, how do I make changes to the pinout to it? I thought I have to compile (in my case VSC and Platform i/o) in order to make changes to the firmware.

Yes you have to do the change in platformio.ini file and add the pins, here is an example:

[env:nodemcuv2-ir-test]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.irremoteesp}
  ${libraries.esp8266_mdns}
build_flags = 
  ${com-esp.build_flags}
  '-DZgatewayIR="IR"'
  '-DIR_RECEIVER_GPIO=2'
  '-DIR_EMITTER_GPIO=0'
  '-DGateway_Name="OpenMQTTGateway_ESP8266_IR_TEST"'