Closed gazialankus closed 5 years ago
And here is the beginning of the sketch:
#include <Arduino.h>
#include <ToshibaDaiseikaiHeatpumpIR.h>
// worked fine with arduino nano
//IRSenderPWM irSender(9); // IR led on Duemilanove digital pin 3, using Arduino PWM
IRSenderBitBang irSender(0);
ToshibaDaiseikaiHeatpumpIR *heatpumpIR;
I just replaced static const char PROGMEM
with static const char
throughout the library and I was able to upload it fine. It also ran fine, turned on and off my A/C unit.
Looking at the docs here made me think one PROGMEM after the variable should be enough.
I wonder why nobody else ran into this. Could it be the Arduino IDE ESP8266 board library version?
May be, but it is more likely to be a problem with the ESP-01. They are a very difficult board to work with. You did well to get it working as well as you did. I just gave up on mine and now mostly use the Wemos D1 mini clones. Much easier starting point.
Yeah they are a pain to work with but I like the tiny form factor:)
Is there a reason for having two PROGMEM
s, though?
static const char PROGMEM model[] PROGMEM = "AIRWAY";
I haven't seen anything like that in docs here: https://arduino-esp8266.readthedocs.io/en/latest/PROGMEM.html
If modifying them to look like this below does not break anything, maybe it's worth changing them for the sake of ESP-01 compatibility. I can confirm that it works this way in ESP-01.
static const char model[] PROGMEM = "AIRWAY";
Thank you so much for this very useful library, btw.
It doesn't related to ESP-01 model, in fact I could confirm this issue related to 2.5.0 version of ESP8266 toolchain. Indeed, the double PROGMEM macro cause the issue. It works fine on 2.4.2, but causes compilation errors on 2.5.0 (including betas) and needs to be fixed. Will look into this further tomorrow. Might be related to some of these: https://github.com/esp8266/Arduino/pull/5048 https://github.com/esp8266/Arduino/pull/5049 https://github.com/esp8266/Arduino/pull/5050
@ToniA could confirm this was fixed & working in hardware. You may close this issue. :)
Thanks :)
I'm trying to make the DaiseikaiTest.ino sketch on a ESP-01 flavor of ESP8266 with no luck. I made it work on an Arduino Nano earlier, but after switching the board to "Generic ESP8266 Module" it won't compile anymore.
I first installed HeatpumpIR via the Library Manager, which was v1.0.8. Later I moved to the version in GitHub. I had the error below in both cases:
Here's the error. Why might this be happening?