M5stickC Touch Sensing
-
Hello,
I need to read the values from a touch sensing pin.
GPIO33 is touch8 so with arduino code one can use touchread(8)
How can I do this using UIFlow?
Thank you. -
Hi @xls
try something like this in an
Advanced - Execute - Execute code:
block:from machine import Pin, TouchPad t8 = 0 touch8 = TouchPad(Pin(33)) t8 = touch8.read()
Cheers
Felix -
Using @felmue's example, here is how I did it. For some reason I could only use the pins on the Grove port (32 or 33) of the M5StickC for capacitive touch. The GPIO pins at the top header (0, 23, 36) didn't work for me. I understand why 23 and 36 don't work (they are not one of the capacitive touch pins on the ESP32), but pin 0 should have worked according to the MicroPython docs.
http://docs.micropython.org/en/v1.11/esp32/quickref.html#capacitive-touch
-
Thank you!