Posts

Showing posts from 2025

my dev.board: YD-ESP32-S3 N16R8

Image
YD-ESP32-S3 N16R8 by VCC-GND Studio  ~ GitHub link: vcc-gnd/YD-ESP32-S3 Exercise: ~  RGB NeoPixel on CircuitPython: adafruit_led_animation and rainbowio.colorwheel(), on YD-ESP32-S3 N16R8 (by VCC-GND Studio) running CircuitPython 10.1.0-beta.1 .

my dev.board: CH32V003/CH32V203 development set

Image
CH32V003/CH32V203 development set: - CH32V003F4P6 - CH32V203C8T6 - WCH-LinkE WCH web sire: wch-ic.com

RGB NeoPixel on CircuitPython: adafruit_led_animation and rainbowio.colorwheel()

Image
YD-ESP32-S3 N16R8 (by VCC-GND Studio) running CircuitPython 10.1.0-beta.1, to control onboard/external 8x RGB LED, using adafruit_led_animation . cpyS3_led_animation_blink.py """ YD-ESP32-S3 N16R8 (by VCC-GND Studio) running CircuitPython 10.1.0-beta.1 , to control onboard/external 8x RGB LED using adafruit_led_animation. https://coxxect.blogspot.com/2025/12/circuitpython-adafruitledanimation.html """ import board import neopixel from adafruit_led_animation.animation.blink import Blink from adafruit_led_animation.color import RED, GREEN, BLUE # Update to match the pin connected to your NeoPixels pixel_pin = board.NEOPIXEL ext_pixel_pin = board.GPIO4 # Update to match the number of NeoPixels you have connected pixel_num = 1 ext_pixel_num = 8 pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.1, auto_write=False) ext_pixels = neopixel.NeoPixel(ext_pixel_pin, ext_pixel_num, brightness=0.1, auto_write=True) blink = Blink(pixels, ...

my display module: 1.54" 320x320 ST7796 SPI IPS (TK015F4000)

Image
1.54" 320x320 ST7796 SPI IPS (TK015F4000) CircuitPython exercise: ~  1.54" 320x320 ST7796 SPI IPS on Waveshare ESP32-H2-Zero/CircuitPython 10.0.3

Python/DOS scripts to copy, sort and rename files.

Image
This script clears the  folder, sorts all  files from the  folder, and copies them into  with sequential names like , , etc. Python Script • The Python script scans the sub‑folder named "images". • It collects all files ending with ".jpg", sorts them alphabetically by filename, and then processes them one by one. • Before copying, it deletes the existing "new_images" folder (if present) to ensure no old files remain. • It creates a fresh "new_images" folder. • Each ".jpg" file is copied into this new folder and renamed sequentially as "image_001.jpg", "image_002.jpg", …. • The numbering uses three digits with leading zeros for consistency. rename.py import os import shutil src_folder = "images" dst_folder = "new_images" cwd = os.getcwd() print("Current Working Directory:", cwd) # If the target folder exists, clear it first. if...

install the gcc make perl packages from your distribution.

Image
When install Guest Additions CD image, the following error reported: This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution. To fix it, install the necessary software package in terminal: $ sudo apt update $ sudo apt install build-essential linux-headers-$(uname -r) -y

LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch).

Image
LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch) Basic setup and connection, refer to last exercise:  Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, using Arduino_GFX_Library in Arduino Framework . To add LVGL function: - Install LVGL library in Arduino IDE Library Manager. - Go to lvgl library directory.   Copy lv_conf_template.h as lv_conf.h into the Arduino Libraries directory. - To enable the content of the file:     change the first #if 0 to #if 1 /* clang-format off */ #if 1 //0 /* Set this to "1" to enable content */ Exercise Code: rpPico2_ST7789_CST816_lvgl_button.ino , Create a button to control onboard LED. /* LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch). Create a button to control onboard LED. https://coxxect.blogspot.com/2025/12/lvgl-v9-exer...

First try VS Code/PlatformIO to program ESP32-S3 in Arduino Framework, to blink RGB LED.

Image
First try VS Code/PlatformIO to program YD-ESP32-S3 (N16R8) in Arduino Framework, to blink RGB LED. main.cpp #include <Arduino.h> #include <Adafruit_NeoPixel.h> #define LED_PIN 48 // YD-ESP32-S3 onboard WS2812 (IO48) #define NUMPIXELS 1 // One RGB LED only Adafruit_NeoPixel pixels(NUMPIXELS, LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { Serial.begin(115200); pixels.begin(); pixels.setBrightness(10); // Brightness (0~255) Serial.println("Rainbow demo start with brightness 100"); } uint32_t Wheel(byte pos) { pos = 255 - pos; if(pos < 85) { return pixels.Color(255 - pos * 3, 0, pos * 3); } else if(pos < 170) { pos -= 85; return pixels.Color(0, pos * 3, 255 - pos * 3); } else { pos -= 170; return pixels.Color(pos * 3, 255 - pos * 3, 0); } } void loop() { for(int i = 0; i < 256; i++) { pixels.setPixelColor(0, Wheel(i)); pixels.show(); delay(20); } } platformio.ini [env:e...

Install VS Code/PlatformIO in Windows 11

Image
  To download VS Code, visit  https://code.visualstudio.com/ . To install PlatformIO in VS Code, click on the Extensions icon on left. Search and install PlatformIO. Next: ~  First try VS Code/PlatformIO to program ESP32-S3 in Arduino Framework, to blink RGB LED .

my new PC: MOREFINE M11 Mini PC with 7" Touch IPS Screen, Intel N305 running Windows 11 Pro

Image
my new PC: MOREFINE M11 Mini PC with 7" Touch IPS Screen, Intel N305 running Windows 11 Pro, 16GB + 2T NVME SSD.

Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, using Arduino_GFX_Library in Arduino Framework.

Image
Raspberry Pi Pico 2 +  Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch) in Arduino Framework, interface with ST7789 using Arduino_GFX_Library (GFX Library for Arduino by Moon On Our Nation), and reading register from CST816 via I2C. Connection: Code: rpPico2_Arduino_GFX.ino , setup for Arduino_GFX_Library, color test. /* Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, 170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch. Using Arduino_GFX_Library (GFX Library for Arduino by Moon On Our Nation) Details: https://coxxect.blogspot.com/2025/12/raspberry-pi-pico-2-waveshare-19inch.html Using board of Raspberry Pi Pico/RP2040/RP2350 by Earle F. Philhower III in Boards Manager. https://github.com/earlephilhower/arduino-pico Install Earle Philhower Raspberry Pi Pico Arduino core in Arduino IDE https://coxxect.blogspot.com/2023/08/install-earle-philhower-raspberry-pi.html */ /*********************...

Check if VT-x enabled in Windows 11

Image
To check if VT-x enabled in Windows 11: - Right click on Task Bar to open Task Manager. - Click to view Performance option. - Check the Virtualization option, Enabled in the screenshot below.

My dev.Board: ESP32-S3 dev board

Image
My dev.Board: ESP32-S3 dev board

Waveshare 1.9inch Touch LCD

Image
Waveshare 1.9inch Touch LCD 170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch Product Page: Waveshare 1.9inch Touch LCD Arduino Exercises: ~  Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD, using Arduino_GFX_Library in Arduino Framework . ~  LVGL v9 exercise run on Raspberry Pi Pico 2 + Waveshare 1.9inch Touch LCD (170x320 ST7789V2 SPI LCD and CST816 I2C capacitive touch) .

CircuitPython key detection

Image
Base on the previous exercise of " ESP32-H2-DevKitM-1-N4/CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI ", implement key detection using digitalio + debounce and keypad. cpyH2_ST7789_BUTTON.py , key detection using digitalio + debounce. """ ESP32-H2-DevKitM-1-N4/CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI. ~ BUTTON detection: digitalio + debounce. Connection: LCD ESP32-H2-DevKitM-1-N4 ----------------------------- GND G VCC 3V3 SCL GPIO5 SDA GPIO4 RES GPIO3 DC GPIO2 CS GPIO1 BLK GPIO0 Libraries need: adafruit_st7789.mpy adafruit_display_text folder adafruit_display_shapes folder """ import os, sys import time import board import displayio import busio import fourwire import adafruit_st7789 from adafruit_display_text import label import terminalio import digitalio spi_sclk = board.IO5 spi_mosi = board.IO4 lcd_rst = board.IO3 lcd_dc = board.IO2 lcd_cs = board.I...

my display module: 1.9" IPS LCD Module, 170x320 ST7789 SPI.

Image
my display module: 1.9" IPS LCD Module, 170x320 ST7789 SPI. Product page: LCD WiKi - 1.9inch IPS Module Related Exercise: ~  ESP32-H2-DevKitM-1-N4/CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI .

ESP32-H2-DevKitM-1-N4/CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI.

Image
ESP32-H2-DevKitM-1-N4 /CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI . Exercise Code: cpyH2_ST7789.py , color test. """ ESP32-H2-DevKitM-1-N4/CircuitPython display on 1.9" IPS LCD Module, 170x320 ST7789 SPI. ~ Color test. https://coxxect.blogspot.com/2025/11/esp32-h2-devkitm-1-n4circuitpython_21.html Connection: LCD ESP32-H2-DevKitM-1-N4 ----------------------------- GND G VCC 3V3 SCL GPIO5 SDA GPIO4 RES GPIO3 DC GPIO2 CS GPIO1 BLK GPIO0 Libraries need: adafruit_st7789.mpy adafruit_display_text folder """ import os, sys import time import board import displayio import busio import fourwire import adafruit_st7789 from adafruit_display_text import label import terminalio spi_sclk = board.IO5 spi_mosi = board.IO4 lcd_rst = board.IO3 lcd_dc = board.IO2 lcd_cs = board.IO1 lcd_bl = board.IO0 # 1.9" IPS LCD Module, 170x320 ST7789 SPI. DISPLAY_width = 320 DISPLAY_height = 170 DISPLAY_ROT...