I am using Platformio with an ESP32 D1 MINI in Arduino framework:
platform = espressif32
board = wemos_d1_mini32
framework = arduino
adafruit/Adafruit GFX Library@^1.11.9
Works beautifully so far
I build a capacitive fluid level sensor using the touch API. Espressif provides a pretty good description how that capacity measurement works incl. API:
This in general works good for, let’s say human body touch detection. However I want to modify the voltage thresholds, measurement time and filter settings to tune the measurement quality of my design.
However Arduino framework encapsulates most of that:
If I, for example, try to call “touch_pad_get_voltage()” I get an error:
src/main.cpp:60:2: error: ‘touch_pad_get_voltage’ was not declared in this scope
(Yes I know I don’t call the function correctly with pointers etc, but it should complain then about the arguments and not say “not found”…)
I tried to locate the library source code in the Arduino framework, but only found layers of layers of .h files, but wasn’t able to figure out how to access the “lower levels”. Well there are actually comments in the header files not to do so, but what shall I do? Quite confusing to me and clearly out of my C++ capabilities
So I guess my question sums up to: How do I bypass the Arduino HAL and access the ESP HW directly from main.cpp? Is there simply an “#include…” missing to make the EspressIF API available on top level?? Also EspressIF uses Python, when I understand correctly? I have no idea how that actually relates, but that may also be a different story…
Anybody able to help?