Page 1 of 1

TouchPad ValueError

Posted: Fri Dec 10, 2021 10:37 pm
by moefear85
I'm running the following code to test TouchPad functionality:

Code: Select all

from machine import TouchPad,Pin
from time import sleep

touchPins=[0, 2, 4, 12, 13,14, 15, 27, 32, 33]
t=[]

for pin in touchPins:
    t.append(TouchPad(Pin(pin)))

while True:
    for i in t:
        try: print(i.read())
        except Exception as e: print(type(e),e.args)
    sleep(0.1)
The output is simply "ValueError: Touch pad error", for all the pins, all the time, even after resetting. I'm using an esp32-wrover and a self-built micropython version to support spiram (commit 06ada5c). Am I doing something wrong?

Re: TouchPad ValueError

Posted: Sat Dec 11, 2021 7:51 am
by Roberthh
I never tried that, but I found a note, that you have to connect a capacitor of 10nF between GPIO36, GPIO37 and 10 nF between GPIO37, GPIO39 to enable the touch function.