LilyGo T-Display S3 Clock with DS18B20 and PIR — lessons learned

After hours of working with Claude.ai and lots of debugging, hopefully this will help someone else avoid these pitfalls:

  • GPIO 43 and 44 on ESP32-S3 are blocked by UART0 in Arduino IDE even when using Hardware CDC — can't be used for OneWire or digital input

  • ledcSetup and ledcAttachPin are deprecated in ESP32 Arduino core 3.x — use ledcAttach and ledcDetach instead

  • nonlocal in MicroPython nested functions doesn't reliably update outer scope variables

  • TFT_eSPI fonts use .WIDTH and .HEIGHT attributes not array indexing

  • LilyGo T-Display S3 needs both GPIO 15 (LCD power) and GPIO 38 (backlight) set HIGH

  • 5GHz WiFi doesn't work on ESP32-S3 — must use 2.4GHz

  • AM312 PIR needs consecutive read filtering to avoid false triggers from component heat

I like the Lilygo T display S3, I remember loading the Micropython firmware then struggling to find a driver for the display. I created an 8 bit parallel driver using hints from a driver created by Russ Hughes russhughes (Russ Hughes) · GitHub

I used the viper Decorator and got a fairly good driver, since then Russ Hughes has come out with a Micropython port that has a ST7789 c driver that is really fast and much better than the Micropython driver even with viper.

Started out this project using Micropython. But ran into a bug that wouldn't let the display wake up after and extended period of time. Gave up and went to Arduino. I love the quick iterations possible with micropython. But Arduino IDE seems better supported on the ESP32.

I am not familiar with the part but thanks for sharing!