Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
slight
 
Posts: 120
Joined: Wed Sep 12, 2012 2:23 am

Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

Post by slight »

hello community :-)
i read at
https://learn.adafruit.com/adafruit-qt- ... ns-3119700
that there are 5 touchio capable pins.
in the visual pinout
Image
they are marked `T5` - `T9`

in the guide for the Adafruit ESP32-S3 Reverse TFT Feather
https://learn.adafruit.com/esp32-s3-rev ... er/pinouts
touch is never mentioned.
in the visual pinout there are a bunch of pins mentioned with `T*`:
Image


i tried with this code

Code: Select all

import time
import board
import touchio

import touchio

print("")
print("touchio_test.py")

while True:
    touch_pin = touchio.TouchIn(board.D3)
    print(touch_pin.value)
    time.sleep(0.1)
    
but this code crashes in a way that i just get no output from the console.
i think it somehow interacts with the I2C functionality of the port??

sunny greetings
stefan

User avatar
danhalbert
 
Posts: 4651
Joined: Tue Aug 08, 2017 12:37 pm

Re: Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

Post by danhalbert »

board.D3 is the same as board.SDA, as you note. It is connected to the battery monitor I2C sensor on the board. So you can't use this pin for touch in any case. I don't have the same board to try to reproduce the problem, but in any case you'll need to choose a different. pin.

User avatar
slight
 
Posts: 120
Joined: Wed Sep 12, 2012 2:23 am

Re: Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

Post by slight »

thanks danhalbert for your reply and heads up!
i forgot that there is a battery monitor IC connected....

D5 is working fine..

just out of curiosity: is the battery-monitor IC initialized in the build itself?
or are the pullups just messing up the touchio initializing request?

checked back and additional found a bug in my code:
i initialized the pin in the loop..
but even with the correct version:

Code: Select all

import time
import board
import touchio

import touchio

# wait a little till the computer / serial-terminal is ready...
time.sleep(1)
print("")
print("touchio_minimal_test.py")

touch_pin = touchio.TouchIn(board.D3)

print("print touch_pin value in an endless loop:")
while True:
    print(touch_pin.value)
    time.sleep(0.1)
i get no output at all after the initializiation:
0;🐍Wi-Fi: off | Done | 8.0.5
Code stopped by auto-reload. Reloading soon.
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
main.py output:
0;🐍Wi-Fi: off | main.py | 8.0.5
touchio_minimal_test.py
the reple / serial terminal is dead - no Ctr+C or Ctrl+D is doing anything,..
and the auto-reload on code change does not work too -
i have to bush the reset button...

i would at least find it helpful if there is some kind of error message... ;-)

sunny greetings
stefan

User avatar
danhalbert
 
Posts: 4651
Joined: Tue Aug 08, 2017 12:37 pm

Re: Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

Post by danhalbert »

I agree it should not just hang; that is a bug.

There is no setup of the MAX I2C battery sensor in CircuitPython itself. So something is causing a bug when initializing the TouchIn, and I'll open an issue about this (or you can if you'd like).

EDIT: https://github.com/adafruit/circuitpython/issues/8049

User avatar
slight
 
Posts: 120
Joined: Wed Sep 12, 2012 2:23 am

Re: Adafruit ESP32-S3 Reverse TFT Feather - touchio?!

Post by slight »

thanks Dan for creating the bugreport.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”