Posts

Showing posts with the label display ILI9341 SPI

ESP32S3/MicroPython display bmp on ili9341 LCD

Image
Last post introduced setup and basic of ESP32-S3-DevKitC-1 running MicroPython v1.24.1 using 3.2" 320x240 IPS LCD (ILI9341 SPI) with Cap. Touch (FT6336U) and Micro SD Slot . This post further exercise to load 240x240 RGB888/RGB565 bmp from device/SD, display on ILI9341 LCD. Remark for ESP32-S3-DevKitC-1: For ESP32-S3-DevKitC-1 with Octal SPI flash/PSRAM memory, use the "spiram-oct" variant such as ESP32_GENERIC_S3-SPIRAM_OCT-20241129-v1.24.1.bin (ref:  https://micropython.org/download/ESP32_GENERIC_S3/ ). If use a in-correct firmware such as ESP32_GENERIC_S3-20241129-v1.24.1.bin, "MemoryError: memory allocation failed" will be raised. For boards with Octal SPI flash/PSRAM memory embedded ESP32-S3-WROOM-1/1U modules, and boards with ESP32-S3-WROOM-2 modules, the pins GPIO35, GPIO36 and GPIO37 are used for the internal communication between ESP32-S3 and SPI flash/PSRAM memory, thus not available for external use. (ref:  https://docs.espressif.c...

ILI9341/FT6336U/SD on ESP32S3/MicroPython

Image
Exercise of MicroPython v1.24.1 running on  ESP32-S3-DevKitC-1 , display on  3.2" 320x240 IPS LCD (ILI9341 SPI) with Cap. Touch (FT6336U) and Micro SD Slot . In the exercises, all the three parts of the display module have been tested: ILI9341 SPI LCD, FT6336U cap. touch, and MicroSD card slot. Connection: ESP32-S3-DevKitC-1 ILI9341 SPI display module +-----USB--UART-----+ |GND           GND | GND |GND           5V0 | |IO19 IO14| LCD_CS |IO20 IO13| LCD_RST |IO21 IO12| LCD_RS |IO47 IO11| SDI(MOSI) |IO48 IO10| SCK |IO45 IO9 | LED |IO0 IO46| |IO35 IO3 | |IO36 IO8 | SDO(MISO) |IO37 IO18| SD_CS |IO38 IO17| |IO39 IO16| |IO40 IO15| |IO41 IO7 | CTP_SCL |IO42 IO6 | CTP_RST |IO2 IO5 | CTP_SDA |IO1 IO4 | CTP_INT |IO44 RST | |IO43 3V3 | |GND 3V3 | VCC +-------------------+ Libraries: In the exercise...

CircuitPython Exercise: Touch buttons on ILI9341 SPI LCD with FT6336 Cap. Touch

Image
My former post show ESP32-S3/CircuitPython exercises for Capacitive Touch Screen, to display on 3.2" 320x240 IPS LCD (ILI9341 SPI) and read capacitive touch (FT6336) . This post I list further exercises to implement a useful Touch Button on the Capacitive Touch Screen, using  Adafruit Display_Button Library . For the connection, read the former post . Remark for using irq_pin in Adafruit_FocalTouch (CircuitPython driver for common low-cost FocalTech capacitive touch chips. Currently supports FT6206 & FT6236): In case you create Adafruit_FocalTouch object using a Bus I2C port and using an interrupt pin (IRQ) like below: ft = adafruit_focaltouch.Adafruit_FocalTouch(i2c, debug=False, irq_pin=irq) The interrupt pin (irq_pin) is used to prevent read errors from the FocalTouch chip. In my test with irq_pin=touch_irq, reading ft.touched will not return if not touched; such that the program will be blocked untill touched. As...

ESP-NOW on CircuitPython 9.0.3, tested on ESP32-S3/ESP32-C3.

Image
ESP-NOW is a kind of connectionless Wi-Fi communication protocol that is defined by Espressif. In ESP-NOW, application data is encapsulated in a vendor-specific action frame and then transmitted from one Wi-Fi device to another without connection. CircuitPython espnow module provides an interface to the ESP-NOW protocol. It's exercises of CircuitPython espnow to communicate between sender ( Waveshare ESP32-S3-Zero / Seeed Studio XIAO ESP32C3 ) and receiver ( Espressif ESP32-S3-DevKitC-1 ). In the receiver side, the receiver message are display on ILI9341 SPI LCD. For the setting of using ILI9341 SPI LCD, read  3.2" 320x240 IPS LCD (ILI9341 SPI) with Cap. Touch (FT6336) and Micro SD Slot on ESP32-S3/CircuitPython 9.0.3 . Exercise Code: cpyS3_ili9341_espnow_receiver.py , run on Espressif ESP32-S3-DevKitC-1 and display on ILI9341 SPI LCD. """ CircuitPython exercise of espnow Act as ESP-NOW receiver, display received msg/mac-ad...

CircuitPython to download bmp images from web, and display on ILI9341 SPI TFT.

Image
Last post show ESP32-S3 running CircuitPython 9.0.3 to display on ILI9341 SPI LCD, detect FT6336 Cap. Touch, and load bmp from SD card using adafruit_imageload . The post show exercise to download bmp images from internet and display on ILI9341 SPI LCD. Basically, the network part follow the CircuitPython  adafruit_imageload example imageload_from_web.py . In the original example, bmp file is downloaded from https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_ImageLoad/main/examples/images/4bit.bmp . In this exercise, my own Python http server was setup on Raspberry Pi 5/64-bit Raspberry Pi OS (bookworm), to store my bmp images. Enter the command in Terminal: python3 -m http.server Or save it in a executable shell script as shown in the video. Exercise code: cpyS3_ili9341_imageload_from_web.py """ CircuitPython exercise run on ESP32-S3, to load image from web and display on ILI9341 SPI LCD. ref: https://github.com/adafruit/...

3.2" 320x240 IPS LCD (ILI9341 SPI) with Cap. Touch (FT6336) and Micro SD Slot on ESP32-S3/CircuitPython 9.0.3

Image
Exercise to work with 3.2" 320x240 IPS LCD (ILI9341 SPI) with Cap. Touch (FT6336) and Micro SD Slot , on Espressif ESP32-S3-DevKitC-1 running CircuitPython 9.0.3. Connection: ESP32-S3-DevKitC-1 +---USB-----USB---+ |GND      GND | |GND      5V0 | |GPIO19      GPIO14| |GPIO20      GPIO13| |GPIO21      GPIO12| |GPIO47      GPIO11| |GPIO48      GPIO10| |GPIO45      GPIO9 | |GPIO0      GPIO46| |GPIO35      GPIO3 | |GPIO36      GPIO8 | |GPIO37      GPIO18| |GPIO38      GPIO17| LCD_CS |GPIO39      GPIO16| LCD_RST |GPIO40      GPIO15| LCD_RS |GPIO41      GPIO7 | SDI (MOSI) CTP_SCL |GPIO42      GPIO6 | SCK CTP_RST |GPIO2     ...