IR receiver code compiles for Uno but not for WeMos D1 R1

This is my first post so apologies for any breach of etiquette, I hope I have got it right.

The offending board is “NEW WeMos D1 CH340 WiFi OTA Development Board ESP8266 ESP-12E Arduino IDE UNO R3” from NEW WeMos D1 CH340 WiFi OTA Development Board ESP8266 ESP-12E Arduino IDE UNO R3 | eBay.

The code that I am using to read from the IR receiver is:

#include <IRremote.h>


int RECV_PIN = 13;


IRrecv irrecv(RECV_PIN);
decode_results results;


void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}


void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}

I get no errror messages when interfacing to the Uno, however I get the attached error when compiling for the WeMos:

I have successfully loaded other programs to the WeMos with no issues.
Any advice would be greatly appreciated.
Thanks

WeMos IR error.txt (6.39 KB)

Maybe the work around mentioned here works for you:

Thanks, I tried all versions but it seems that IRremote.h is incompatible with ESP boards.
I have found another library (IRremoteESP8266.h) that might work.

howardsones:
Thanks, I tried all versions but it seems that IRremote.h is incompatible with ESP boards.
I have found another library (IRremoteESP8266.h) that might work.

That could well work.
I've just had a more detailed look. It is not the same as the other recent IR library problems. It is that there is an odd gap in the coverage of the IR Library GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols in that it supports miscellaneous AVr type boards (Arduino Uno, Nano etc.) and ESP32. However, for ESP8266 support. you are referred to : GitHub - crankyoldgit/IRremoteESP8266: Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/ . I have now checked and it appears to be available in the Arduino Library Manager (ver 2.7.14)

6v6gt:
That could well work.
I've just had a more detailed look. It is not the same as the other recent IR library problems. It is that there is an odd gap in the coverage of the IR Library GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols wobble man in that it supports miscellaneous AVr type boards (Arduino Uno, Nano etc.) and ESP32. However, for ESP8266 support. you are referred to : GitHub - crankyoldgit/IRremoteESP8266: Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/ . I have now checked and it appears to be available in the Arduino Library Manager (ver 2.7.14)

I did everything, thanks for help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.