Posts

Showing posts from 2025

Xiao ESP32S3 display on 240*240 ST7789 SPI LCD using TFT_eSPI in Arduino Framework.

Image
This video show steps how Xiao ESP32S3 display on 240*240 ST7789 SPI LCD using TFT_eSPI in Arduino Framework. Connection: ST7789V2 Xiao ESP32S3 ---------------------------- GND GND VCC 3V3 SCL GPIO7 SDA GPIO9 RES GPIO1 DC GPIO2 CS GPIO3 BLK GPIO4 Library used: TFT_eSPI  https://github.com/Bodmer/TFT_eSPI To setup, scroll down to "Tips" section: Create a new folder in your Arduino library folder called "TFT_eSPI_Setups". You then place your custom setup.h files in there. Edit the User_Setup_Select.h file to point to your custom setup file. Create my custom setup file, Setup_ST7789_XIAOESP32S3.h , under TFT_eSPI_Setups folder. // Setup_ST7789_XIAOESP32S3.h in // ..\Arduino\libraries\TFT_eSPI_Setups\ // // Modify // ..\Arduino\libraries\TFT_eSPI\User_Setup_Select.h to load it. // #include <../TFT_eSPI_Setups/Setup_ST7789_XIAOESP32S3.h> #define ST7789_DRIVER #define TFT_WIDTH 240 #define TFT_HEIGHT 240 // TFT_MOSI/TFT_SCLK for default SPI pin ...

Local-host DeepSeek-R1 on Android Phone, Poco F7 Pro, using Termux+Ollama.

Image
This video show steps to host DeepSeek-R1 on Android Phone locally, using Termux+Ollama. Tested on Poco F7 Pro. Basic steps: Download and install F-Droid, an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. https://f-droid.org/ Install Termux (a Terminal emulator with packages) in F-Droid. Run Termux To grant right to Termux to access storage. termux-setup-storage Change repo, it will improve download greatly. termux-change-repo Update and upgrade. pkg update -y && pkg upgrade -y Install necessary software: pkg install git cmake golang proot-distro -y Install Ubuntu: proot-distro install ubuntu Login Ubuntu: proot-distro login ubuntu Install Ollama: curl -fsSL https://ollama.com/install.sh | sh Run Ollama server in background, you have to press [ENTER] to return to command line: ollama serve & Pull deepseek-r1:1.5b to local: ollama pull deepseek-r1:1.5b Once deepseek-r1:1.5b pulle...

ESP32S3 (Arduino framework) decode jpg and display on ST7789 SPI Display.

Image
Base on former exercise of " 240x240 ST7789V2 SPI IPS with FT6236 cap touch on XIAO ESP32S3 using GFX Library for Arduino ", this exercise run on XIAO ESP32S3 Sense in Arduino framework, load jpg from SD, decode the jpg using JPEGDEC library, and display on  1.54 inch 240x240 ST7789V2 SPI IPS with FT6236 cap touch using GFX Library for Arduino (Arduino_GFX_Library). Connection follow the former exercise . Install the following libraries in Arduino IDE's Library Manager. - GFX Library for Arduino (Arduino_GFX_Library) for display on ST7789 - JPEGDEC for jpg decoding Exercise code: XiaoS3_ST7789_SD_jpg_scale.ino /******************************************************************************* Xiao ESP32S3 Sense exercise Display jpg on 240x240 ST7789 SPI IPS - Display jpg in various scale. Libraries needed (available in Arduino IDE Library Manager): - GFX Library for Arduino (Arduino_GFX_Library) for display on ST7789 - JPEGDEC for jp...

ESP32-P4-EYE

Image
  ESP32-P4-EYE ~ ESP32-P4-EYE User Guide

Xiao ESP32S3 Sense read MicroSD

Image
Exercise run on  Xiao ESP32S3 Sense in Arduino framework, read SD Card. Base on the exercise " 240x240 ST7789V2 SPI IPS with FT6236 cap touch on XIAO ESP32S3 using GFX Library for Arduino ", display ST7789 LCD. XiaoS3_ST7789_SD.ino , read and display SD info and hello.txt content. /******************************************************************************* Xiao ESP32S3 Sense exercise ******************************************************************************/ /******************************************************************************* * Start of Arduino_GFX setting ******************************************************************************/ #include <Arduino_GFX_Library.h> //=== Custom to match my connection =========================================== #define PIN_BLK 4 #define PIN_CS 3 #define PIN_DC 2 #define PIN_RES 1 #define PIN_SDA 9 #define PIN_SCL 7 #define GFX_BL PIN_BLK #define CTP_INT 43 #define CTP_RST 44 #define FT6236_AD...

Arduino_GFX_Library + LVGL on ESP32S3 + ST7789 SPI IPS with FT6236 cap touch, create button to toggle onboard LED

Image
Last exercise on Xiao ESP32S3 Sense, to display on 240x240 ST7789V2 SPI IPS using Arduino_GFX_Library, and interface FT6236 cap touch using Wire I2C, in Arduino framework . This exercise add function of LVGL. Connection , following in last exercise . Preparation: - Install GFX Library for Arduino in Arduino IDE Library Manager,   follow last exercise , make sure both ST7789 and FT6236 works. - Install LVGL library in Arduino IDE Library Manager.   Using LVGL with Arduino requires some extra steps:   *Be sure to read the docs here: https://docs.lvgl.io/master/get-started/platforms/arduino.html   Copy lv_conf_template.h in lvgl library directory, rename as lv_conf.h and save into the Arduino Libraries directory. To enable the content of the file, change the first #if 0 to #if 1. #if 1 //0 /*Set it to "1" to enable content*/ Exercise code: XIAOS3_ST7789_FT6236_LVGL_Arduino_v9.ino , my exercise to create a button to toggle the ...

240x240 ST7789V2 SPI IPS with FT6236 cap touch on XIAO ESP32S3 using GFX Library for Arduino

Image
My exercise on  Seeed Studio XIAO ESP32S3 Sense (Arduino framework) to display on  1.54 inch 240x240 ST7789V2 SPI IPS with FT6236 cap touch . ST7789 Display part using GFX Library for Arduino FT6236 Cap touch part read via I2C (Wire) Connection: ST7789V2 -------- GND GND VCC 3V3 SCL GPIO7 SDA GPIO9 RES GPIO1 DC GPIO2 CS GPIO3 BLK GPIO4 FT6236 ------ SCL GPIO6 SDA GPIO5 INT GPIO43 (Not used) RST GPIO44 Exercise Code: XS3_ST7789_GFX_color_touch.ino /* XIAO ESP32S3 display on 240x240 ST7789 SPI IPS with FT6236 cap touch using GFX Library for Arduino - Color and Touch Test Arduino_GFX https://github.com/moononournation/Arduino_GFX Connection: ST7789V2 -------- GND GND VCC 3V3 SCL GPIO7 SDA GPIO9 RES GPIO1 DC GPIO2 CS GPIO3 BLK GPIO4 FT6236 ------ SCL GPIO6 SDA GPIO5 INT Not use RST GPIO44 */ #include <Arduino_GFX_Library.h> #include <Wire.h> /...

1.54 inch 240x240 ST7789V2 SPI IPS with FT6236 cap touch

Image
1.54 inch 240x240 ST7789V2 SPI IPS with FT6236 cap touch Exercise: ~  240x240 ST7789V2 SPI IPS with FT6236 cap touch on XIAO ESP32S3 using GFX Library for Arduino ~  Arduino_GFX_Library + LVGL on ESP32S3 + ST7789 SPI IPS with FT6236 cap touch, create button to toggle onboard LED ~  ESP32S3 (Arduino framework) decode jpg and display on ST7789 SPI Display .

LVGL on Raspberry Pi Pico 2 (Arduino framework/arduino-pico) with 320x480 TFT SPI ST7796 + FT6336U Capacitive Touch

Image
LVGL (Light and Versatile Graphics Library) is a popular free and open-source embedded graphics library to create beautiful UIs for any MCU, MPU and display type, supports working with the TFT_eSPI library. Following previous exercise " Raspberry Pi Pico 2 drive 4.0" 320x480 TFT SPI ST7796 with FT6336U Capacitive Touch + SD, in Arduino framework ", this exercise show steps to add LVGL on top of TFT_eSPI, on Raspberry Pi Pico 2. Install lvgl library in Arduino IDE's Library Manager. Using LVGL with Arduino requires some extra steps: Be sure to read the docs here: https://docs.lvgl.io/master/integration/framework/arduino.html Follow these configuration steps: - Go to the directory of the installed Arduino libraries - Go to lvgl and copy lv_conf_template.h as lv_conf.h into the Arduino Libraries directory next to the lvgl library folder. - Open lv_conf.h and change:   To enable the content of the file:   change the first #if 0 to #if 1   To use T...

Raspberry Pi Pico 2 drive 4.0" 320x480 TFT SPI ST7796 with FT6336U Capacitive Touch + SD, in Arduino framework

Image
Exercise of Raspberry Pi Pico 2 (in Arduino framework) to drive  4.0" 320x480 TFT SPI ST7796 with FT6336U Capacitive Touch + SD . The Raspberry Pi Pico 2 are programmed in Arduino framework using board of  Raspberry Pi Pico/RP2040/RP2350 by Earle F. Philhower, III (arduino-pico) , load bmp images from SD card, display on ST7796 using  TFT_eSPI , and touch screen to switching among images. Connection: ST7796 Module Raspberry Pi Pico 2 --------------------------------------- SD_CS GP15 CTP_INT not used CTP_SDA GP4 CTP_RST GP14 (optional, or 3V3) CTP_SCL GP5 SDO(MISO) GP16 LED GP22 SCK GP18 SDI(MOSI) GP19 LCD_RS GP21 LCD_RST GP20 LCD_CS GP17 GND GND VCC VBUS (5V) This ST7796 display module have on board level conversion circuit, compatible with 5V and 3.3V MCU. According LCDWiKi 4.0inch Capacitive SPI Module ST7796 , VCC is recommended to connect to 5V. When connected to 3.3V, the backlight brightness will be s...