touchPad on Pin 2 (ESP32)

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
testetst
Posts: 1
Joined: Thu Apr 02, 2020 8:41 am

touchPad on Pin 2 (ESP32)

Post by testetst » Thu Apr 02, 2020 9:11 am

I have downloaded the actual version of Micropython for the ESP32 and i wanted to use Pin 2 as a touchPin. I can decelerate it as a touchpin like this

Code: Select all

touchPad = TouchPad(Pin(2))
But I cannot read from that:

Code: Select all

touchPad.read()
Than I get an error:

Code: Select all

ValueError: Touch pad error
Have anyone an idea?

I have already posted this as an issue on GitHub, but they say, I should ask here...
https://github.com/micropython/micropython/issues/5854

djelau
Posts: 4
Joined: Thu Mar 25, 2021 10:09 am

Re: touchPad on Pin 2 (ESP32)

Post by djelau » Mon May 03, 2021 9:31 pm

Hello,

Pin pulled up or pulled down may be the cause. Your signal must be floating.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: touchPad on Pin 2 (ESP32)

Post by pythoncoder » Thu May 06, 2021 7:41 am

Yes, as I understand it the reference board has an external pull-down resistor on pin2.
Peter Hinch
Index to my micropython libraries.

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: touchPad on Pin 2 (ESP32)

Post by SpotlightKid » Sat May 22, 2021 2:38 pm

The GH issue should be closed then.

Post Reply