Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » Adafruit Feather TFT ESP32-S2

Author: mystic1
28/03/2022 15:18:08
I'm attempting to utilize TCmenu on an Adafruit Feather TFT ESP32-S2, with limited success. The "Generate Code" function does build the project, which I then open using the Arduino IDE. However, when I try to compile & upload, it fails:


Using previously compiled file: C:\Users\username\AppData\Local\Temp\arduino_build_845093\libraries\IoAbstraction\esp32\ESP32DigitalIO.cpp.o
In file included from C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:8:
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp: In member function 'uint16_t EspAnalogInputMode::getCurrentReading()':
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.h:21:31: error: 'ADC_WIDTH_BIT_12' was not declared in this scope
 #define IOA_ESP_BIT_SELECTION ADC_WIDTH_BIT_12
                               ^~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:71:69: note: in expansion of macro 'IOA_ESP_BIT_SELECTION'
         if(adc2_get_raw(static_cast(adcChannelNum), IOA_ESP_BIT_SELECTION, &adcVal) == ESP_OK) {
                                                                     ^~~~~~~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.h:21:31: note: suggested alternative: 'ADC_WIDTH_BIT_13'
 #define IOA_ESP_BIT_SELECTION ADC_WIDTH_BIT_12
                               ^~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:71:69: note: in expansion of macro 'IOA_ESP_BIT_SELECTION'
         if(adc2_get_raw(static_cast(adcChannelNum), IOA_ESP_BIT_SELECTION, &adcVal) == ESP_OK) {
                                                                     ^~~~~~~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp: In constructor 'ESP32AnalogDevice::ESP32AnalogDevice()':
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.h:21:31: error: 'ADC_WIDTH_BIT_12' was not declared in this scope
 #define IOA_ESP_BIT_SELECTION ADC_WIDTH_BIT_12
                               ^~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:110:23: note: in expansion of macro 'IOA_ESP_BIT_SELECTION'
     adc1_config_width(IOA_ESP_BIT_SELECTION);
                       ^~~~~~~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.h:21:31: note: suggested alternative: 'ADC_WIDTH_BIT_13'
 #define IOA_ESP_BIT_SELECTION ADC_WIDTH_BIT_12
                               ^~~~~~~~~~~~~~~~
C:\Users\username\Documents\Arduino\libraries\IoAbstraction\src\esp32\ESP32AnalogDevice.cpp:110:23: note: in expansion of macro 'IOA_ESP_BIT_SELECTION'
     adc1_config_width(IOA_ESP_BIT_SELECTION);
                       ^~~~~~~~~~~~~~~~~~~~~
{...}
exit status 1
Error compiling for board Adafruit Feather ESP32-S2 TFT.




Is this because the board is a "-S2" model, not just an ESP32?

Author: davetcc
29/03/2022 21:36:56
Unfortunately when I tried an s2 a few months ago many common libraries didn’t work so I abandoned the effort. However it seems a few of the dependencies now work on the s2. I’ll try and test again soon. I thought there was a recent PR in IoAbstraction to support the S2 model but I need to dig back into this to remember. I think it was for exactly this

Author: davetcc
30/03/2022 08:51:16
I’ll just add that it works really well on regular ESP32, and the major thing holding back S2 support was that last time I tried it the graphics libraries I use didn’t work with it.

However, that stumbling block seems removed. I have a device and will get it fully working soon.

Author: mystic1
30/03/2022 12:36:32
Very happy to hear that you'll be able to make progress on this item! Thank you so much!!

Author: davetcc
08/05/2022 10:33:50
Will be fixed in IoAbstraction 2.3 due very soon. It also finally sorts out the annoyance where encoders always needed pinA to be an interrupt capable pin.

See

https://github.com/davetcc/IoAbstraction/issues/152

Author: davetcc
11/05/2022 17:48:32
The fix was released earlier today, 2.3 of both IoAbstraction and tcMenu are available now, I have built and tested a menu on ESP32S2 with an OLED screen and rotary encoder.

Author: mystic1
12/05/2022 18:53:51
Confirmed! My project does now compile with no errors or warnings!
(It doesn't WORK, but that's clearly an issue on my side, not a problem with the libraries/environment)
Thank you very much for your hard work!!

Author: davetcc
01/06/2022 11:00:05
Just out of interest, did you manage to get your project working on ESP32-S2?




Register / Login  |  Desktop view  |  Jump to top of page