-
I have a lolin s2 mini, I read values from a touch sensitive pin using micropython. I can see the values going up and down when I touch the pin directly in the board. I'm trying to do something similar with moddable but failed. I saw this module called touchpad and thought it would be what I need but I get this error:
Here is my code: import TouchPad from "touchpad"
const Digital = device.io.Digital;
const led = new Digital({
pin: 15,
mode: Digital.Output,
});
led.write(0);
touch = new TouchPad({
pin: 7
});
baseValue = touch.read() Just for reference, the micropython code to set and read the touch sensitive pin is touch_pin = TouchPad(Pin(3, mode=Pin.IN))
x = touch_pin.read() |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I should be possible using the TouchPad. However, it appeared that the TouchPad driver build was broken in the ESP-IDF 5 upgrade. I think @mkellner can help. |
Beta Was this translation helpful? Give feedback.
-
Adding a few include paths to
This change (and the related |
Beta Was this translation helpful? Give feedback.
-
The Lins you quote are the debugging protocol starting up on the ESP32. It sends the login message and waits briefly for a response from xsbug. It isn't getting one, so it continues running without debugging. Normally you don't see those lines because If the receive pin on your board wasn't properly connected to your computer, that would give this behavior too. But that's a rare mistake. As an alternative, you can have traces and no debugging, using an instrumented build. |
Beta Was this translation helpful? Give feedback.
Adding a few include paths to
tools/mcconfig/make.esp32.mk
allows the touch component to be built. If you have additional problems, please include themanifest.json
file for the app so we can ensure you have the right includes and configuration.