Closed jwktje closed 2 years ago
I am afraid the only way right now is to comment out line #28 in the tm1650.h file Sorry - this was developed and used on AVR boards only
I'm getting additional errors after doing this. Would it be hard to make this library compatible with ESP32? Could I do this myself? I don't have much experience with porting libraries.
I would really love to use the TM1650 however. What would be my best bet? Make a branch for this in a fork?
This is very weird: I just compiled TM1650 Example 1 on ESP32 without any modifications to the library. Let's get a few data points: Are you using Arduino IDE or something else (I use 1.8.5 Windows)? Which versions? Which Board option (ESP32 Dev Module. ESP32 board option v1.0.1)? https://dl.espressif.com/dl/package_esp32_index.json
Could you please send me your ESP32 board name/description, the sketch and error messages to arkhipenko@hotmail.com?
I'm using the ESP-WROOM-32 module on my own pcb. So it is very much like a Lolin32 from Wemos for example. But I flash it using the ESP32 Dev Module setting. I was on 1.0.2-rc1. I'll test more on 1.0.1 and retry.
I just read somewhere that on ESP32 it should load it as such;
#include <pgmspace.h>
This works but after this it creates the following errors (when trying to compile the example).
TM1650_test:3: error: 'TM1650' does not name a type
TM1650 d;
^
/Users/jwktje/Documents/Arduino/TM1650_test/TM1650_test.ino: In function 'void setup()':
TM1650_test:12: error: 'd' was not declared in this scope
d.init();
^
/Users/jwktje/Documents/Arduino/TM1650_test/TM1650_test.ino: In function 'void loop()':
TM1650_test:18: error: 'd' was not declared in this scope
d.displayOff();
^
TM1650_test:20: error: 'TM1650_MIN_BRIGHT' was not declared in this scope
d.setBrightness(TM1650_MIN_BRIGHT);
^
TM1650_test:26: error: 'TM1650_MAX_BRIGHT' was not declared in this scope
d.setBrightnessGradually(TM1650_MAX_BRIGHT);
^
exit status 1
'TM1650' does not name a type
Update: Just tested with 1.0.1 but the same errors occurred.
TM1650_test:3: error: 'TM1650' does not name a type
TM1650 d;
^
This is strange - it almost looks like you have not included the library or did not install it properly (which sounds silly, but still).
Do you have the TM1650 library folder in your Arduino/libraries
subfolder?
Do you have #include <TM1650.h>
statement in your sketch?
Or let's start with: can you compile example 1 from the library - because that worked for me and I cannot explain why it does not work for you.
I tried that. But now redownloading everything and commenting out the define, it compiles.
//#define TM1650_USE_PROGMEM
When I don't uncomment that line, it fails however. You said you can compile without changing the lib?
When I don't uncomment that line, it fails however. You said you can compile without changing the lib?
Yes. I just installed support for ESP32 into the Arduino IDE and compiled example 1 as described earlier.
Strange. I can't compile unless I remove that define. But anyway, doing that makes it work. So the issue can be closed. It must be something strange on my machine that causes this.
Found a fix. Preparing a PR now
The library doesn't compile for my ESP32.
I need to set the flag TM1650_USE_PROGMEM to not include PROGMEM. How do I do that without modifying the library itself?