mongoose-os-libs / esp32-touchpad

JS bindings for ESP32 touch pad sensor
Other
6 stars 0 forks source link

Touch sensor isr bitmap value returned is incorrect #1

Closed nccchirag closed 5 years ago

nccchirag commented 5 years ago

TouchPad.isrRegister(function(st) { .... }, null);

Problem - st (which is number representing which pads are "touched".) returned is always the same for touch and non touch events for eg. when setting GPIO 2 & 15 as touch sensors the value (st) returned is 12 when touching either touch pins/pads but the sensor counter value seems to change as per which pad is touched!

Board - ESP32-PICO-D4 R1 Mongoose OS - latest Desktop OS - Windows 10

Please guide

nccchirag commented 5 years ago

changing voltage configuration seems to fix the issue!

Here's what worked for me TouchPad.setVoltage( TouchPad.HVOLT_2V7, TouchPad.LVOLT_0V5, TouchPad.HVOLT_ATTEN_1V );

bblanke commented 4 years ago

Thanks for posting this! I'm having the same problem and tried your fix, but it didn't work for me. I'll see if I can dig something else up!