Posts

Showing posts from 2026

Prepare HelloWorld for Waveshare ESP32-S3-Touch-AMOLED-2.16, in Arduino framework.

Image
Prepare libraries to run HelloWorld on Waveshare ESP32-S3-Touch-AMOLED-2.16 , in Arduino framework. Following the steps in Waveshare docs, ESP32-S3-Touch-AMOLED-2.16 > Working with Arduino Notice: About display resolution: currently, both LCD_WIDTH and LCD_HEIGHT in libraries//Mylibrary/pin_config.h are set 466, have to set it 480 to match the actual resolution.

Install Arduino IDE 2.3.8 and ESP32 Arduino Core on Linux Mint 22.3 (Over VirtualBox 7.2.8)

Image
To install the Arduino IDE 2.3.8 on Linux Mint using the AppImage format, tested on Linux Mint 22.3 Xfce over VirtualBox on Windows 11. Step 1: Download the AppImage - Go to the official Arduino Software page . - Look for Arduino IDE 2.3.8 (or the latest version). - Click on the "Linux AppImage 64 bits" link to download the file. - You can move the downloaded file to other folder you want. Step 2: Grant Execution Permission By default, Linux treats downloaded AppImages as non-executable files for security. You must enable execution rights. Option A: Using the Terminal (Recommended) Open your terminal and navigate to the folder contain the downloaded file: chmod +x arduino-ide_2.3.8_Linux_64bit.AppImage Option B: Using the GUI - Right-click the downloaded .AppImage file. - Select Properties. - Go to the Permissions tab. - Check the box that says "Allow executing file as program". Step 3: Configure Serial Port Permissions (dialout) In Linux, your user accou...

VirtualBox how to: automatically capture USB devices for use in a virtual machine

Image
A USB filter in VirtualBox allows you to automatically capture USB devices for use in a virtual machine (VM). This ensures that the device is passed directly to the guest OS when connected, bypassing the host system. Steps to Add a USB Filter 1. Install VirtualBox Extension Pack      Ensure the Extension Pack is installed on the host. It adds support for USB 2.0/3.0. Download and install it from the VirtualBox website . 2. Enable USB Controller in VM Settings      Open VirtualBox and select your VM. Go to Settings > USB. Enable USB 2.0 (EHCI) or USB 3.0 (xHCI) depending on your guest OS support. 3. Create a USB Filter      While the USB device is connected to the host, click Add Filter (+) in the USB settings of your VM. A new filter will be created with details like Vendor ID, Product ID, etc., pre-filled for the connected device. You can edit these fields if needed (e.g., leave fields blank for broader matching). 4....

Downloading and Displaying JPG Images via WiFi on ESP32-C5 with ST7789 SPI TFT LCD

Image
In this exercise, I demonstrate how to download a JPG image over Wi-Fi, decode it using the JPEGDEC library, and display it on a 3.2-inch 240×320 ST7789 TFT LCD (4-wire SPI) . The project uses the Arduino_GFX_Library together with the Waveshare ESP32-C5-WIFI6-KIT-N16R8 , running in the Arduino framework. Connection: 3.2" 240x320 ST7789 TFT LCD Waveshare (4-Wire SPI) ESP32-C5-WIFI6-KIT-N16R8 BL --------------------------- GPIO26 CS --------------------------- GPIO23 DC --------------------------- GPIO24 RES --------------------------- GPIO25 SDA --------------------------- GPIO8 SCL --------------------------- GPIO10 VCC --------------------------- 3V3 GND --------------------------- GND Libraries: Arduino_GFX_Library and  JPEGDEC libraries are needed to be installed in Arduino IDE Library Manager. Basic Test: ESP32C5_ST7789_SPI.ino /* Exercise run on Waveshare ESP32-C5-WIFI6-KIT-N16R8 Work with 3.2" 240x320 ST7789 SP...

3.2" 240x320 ST7789 TFT LCD (4-Wire SPI/8-Bit Parallel/16-Bit Parallel)

Image
3.2" 240x320 ST7789 TFT LCD (4-Wire SPI/8-Bit Parallel/16-Bit Parallel) T320H8-C40-11 Exercise: ~  Downloading and Displaying JPG Images via WiFi on ESP32-C5 with ST7789 SPI TFT LCD

my dev.board: Waveshare ESP32-S3-Touch-AMOLED-2.16

Image
Waveshare ESP32-S3-Touch-AMOLED-2.16 Product Pages: ~ https://docs.waveshare.com/ESP32-S3-Touch-AMOLED-2.16 (English) ~ https://docs.waveshare.net/ESP32-S3-Touch-AMOLED-2.16 (Chinese) ~ https://github.com/waveshareteam/ESP32-S3-Touch-AMOLED-2.16/ Arduino Framework: ~  Prepare HelloWorld for Waveshare ESP32-S3-Touch-AMOLED-2.16, in Arduino framework .

ESP32-xx to use 16MB Flash with LittleFS.

Image
In my understanding: To use 16MB Flash with LittleFS, have to select Partition Scheme of 16M Flash (2MB APP/12.5MB FATFS) or 16M Flash (3MB APP/9.9MB FATFS). Tested on  Waveshare ESP32-C5-WIFI6-KIT-N16R8 . ESP32-xx_LittleLS_16M.ino /* Exercise on ESP32-xx to use 16MB Flash with LittleFS. In my understanding: To use 16MB Flash with LittleFS Have to select Partition Scheme of 16M Flash (2MB APP/12.5MB FATFS) or 16M Flash (3MB APP/9.9MB FATFS). But, if call simple LittleFS.begin(true), will fail. To use it, have to set partitionLabel to "ffat". In my test on Waveshare ESP32-C5-WIFI6-KIT-N16R8: With "16M Flash (2MB APP/12.5MB FATFS)": LittleFS.totalBytes: 12451840 bytes LittleFS.usedBytes: 8192 bytes With "16M Flash (3MB APP/9.9MB FATFS)": LittleFS.totalBytes: 10354688 bytes LittleFS.usedBytes: 8192 bytes */ #include <LittleFS.h> #include "esp_partition.h" void setup() { delay(2000); Serial.begin(115200); delay(10...

arduino-esp32 read memory info (tested on YD-ESP32-S3 N16R8/Waveshare ESP32-C5-WIFI6-KIT-N16R8)

Image
arduino-esp32 read memory info, tested on Waveshare ESP32-C5-WIFI6-KIT-N16R8 and YD-ESP32-S3 N16R8 . ESP32-xx_mem_info.ino /* Exercise run on Waveshare ESP32-xx - Memory info Tested on: VCC-GND Studio YD-ESP32-S3 N16R8 https://github.com/vcc-gnd/YD-ESP32-S3 16MB Flash, 8MB PSRAM WaveShare ESP32-C5-WIFI6-KIT-N16R8: https://www.waveshare.com/wiki/ESP32-C5-WIFI6-KIT-NXRX 16MB Flash, 8MB PSRAM */ #include <SPIFFS.h> void setup() { delay(2000); Serial.begin(115200); delay(1000); Serial.println("\n\n~ Start ~"); Serial.println("--- Memory Info ---"); Serial.println(); Serial.println("--- Model and Revision ---"); Serial.printf("Chip model: %s\n", ESP.getChipModel()); Serial.printf("Chip revision: %d\n", ESP.getChipRevision()); Serial.println(); Serial.println("--- SRAM (internal RAM) ---"); Serial.printf("Free heap: %d bytes\n", ESP.getFreeHeap()); Serial.printf("L...

WebServer on ESP32-C5-WIFI6-KIT-N16R8, to control onboard RGB LED (Arduino Framework)

Image
Exercises (Arduino Framework) run on Waveshare ESP32-C5-WIFI6-KIT-N16R8 , act as WiFi Access Point, and setup simple WebServer to control onboard RGB LED. ESP32C5_WiFi_AP_WebServer , act as Access Point and setup a simple WebServer. /* Exercise run on Waveshare ESP32-C5-WIFI6-KIT-N16R8 Setup WiFi AP, and a simple WebServer. details: https://coxxect.blogspot.com/2026/03/webserver-on-esp32-c5-wifi6-kit-n16r8.html Ref: Arduino ESP32 Wi-Fi API https://docs.espressif.com/projects/arduino-esp32/en/latest/api/wifi.html Github: espressif/arduino-esp32/libraries/WebServer/ https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer */ #include <WiFi.h> #include <WebServer.h> // Built-in lightweight HTTP server const char* ssid = "ESP32-C5_AP"; const char* password = "12345678"; // Create a web server on port 80 WebServer server(80); void handleRoot() { server.send(200, "text/html", "<h1>Hello from ESP32-C5 W...

my cam.module, OV3660 & GC2145 Camera Modules

Image
my cam.module, OV3660 & GC2145 Camera Modules, both 68 degrees, 21mm length.

Waveshare ESP32-C5-WIFI6-KIT-N16R8 to control onboard RGB LED using Adafruit_NeoPixel library, Arduino framework.

Image
Exercise run on Waveshare ESP32-C5-WIFI6-KIT-N16R8 to control onboard RGB LED using Adafruit_NeoPixel library. ESP32C5_RGB.ino /* Exercise run on Waveshare ESP32-C5-WIFI6-KIT-N16R8 to control onboard RGB LED using Adafruit_NeoPixel library. The onboard RGB on Waveshare ESP32-C5-WIFI6-KIT-N16R8 is connected to GPIO27. https://coxxect.blogspot.com/2026/02/waveshare-esp32-c5-wifi6-kit-n16r8-to.html */ #include <Adafruit_NeoPixel.h> // Pin where the onboard RGB is connected #define LED_PIN 27 // Number of LEDs (number of onboard RGB is 1) #define LED_COUNT 1 // Create NeoPixel object Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_RGB + NEO_KHZ800); void setup() { strip.begin(); // Initialize NeoPixel library strip.show(); // Turn OFF all pixels ASAP strip.setBrightness(50); // Adjust brightness (0–255) } void loop() { // Cycle through Red, Green, Blue strip.setPixelColor(0, strip.Color(255, 0, 0)); // Red strip.show(); delay(100...

my dev. board: Waveshare ESP32-C5-WIFI6-KIT-N16R8

Image
my dev. board: Waveshare ESP32-C5-WIFI6-KIT-N16R8 Product Page: ~  https://www.waveshare.com/wiki/ESP32-C5-WIFI6-KIT-NXRX (English) ~  https://www.waveshare.net/wiki/ESP32-C5-WIFI6-KIT-N16R4 (Chinese) ~ ESP32-C5-WIFI6-KIT-NXRX Schematic Arduino Exercises: ~  Waveshare ESP32-C5-WIFI6-KIT-N16R8 to control onboard RGB LED using Adafruit_NeoPixel library . ~  WebServer on ESP32-C5-WIFI6-KIT-N16R8, to control onboard RGB LED ~  arduino-esp32 read memory info ~  ESP32-xx to use 16MB Flash with LittleFS ~  Downloading and Displaying JPG Images via WiFi on ESP32-C5 with ST7789 SPI TFT LCD

Pico HDMI Board on CircuitPython

Image
picodvi is a CircuitPython library of low-level routines for interacting with PicoDVI Output. This exercise run on Raspberry Pi Pico (RP2040) running CircuitPython 10.0.3 to display on HDMI monitor with Spotpear Pico HDMI Board . pico-hdmi.py , basic test. """ Pico HDMI Board on CircuitPython Basic test. details: https://coxxect.blogspot.com/2026/02/pico-hdmi-board-on-circuitpython.html Ref: https://docs.circuitpython.org/en/latest/shared-bindings/picodvi/ https://learn.adafruit.com/using-dvi-video-in-circuitpython/using-a-framebuffer-and-picodvi lib needed: - adafruit_display_text folder Install lib using circup: circup install adafruit_display_text """ import os, sys import board import displayio import framebufferio import picodvi from adafruit_display_text import label import terminalio import time import gc displayio.release_displays() #======================================= info = os.uname()[4] + "\n" + \ sys.impleme...

Raspberry Pi Pico 2 W/CircuitPython 10.0.3: Load animated GIFs from MicroSD, display them on a 240*240 GC9A01 LCD using gifio.OnDiskGif.

Image
Previous posts show Basic setup of 1.28 inch 240x240 Round Display with GC9A01 SPI on Raspberry Pi Pico 2 W/CircuitPython 10.0.3  and display bmp images from SD using displayio.OnDiskBitmap()/adafruit_imageload.load()  This post shows how to display animated GIFs from MicroSD. The connection between Raspberry Pi Pico 2 W, GC9A01 LCD and the MicroSD Module refers to the last post, display bmp images from SD using displayio.OnDiskBitmap()/adafruit_imageload.load()   Ref: https://docs.circuitpython.org/en/latest/shared-bindings/gifio/index.html#gifio.OnDiskGif Exercise Code: cpy_rpPicoW_gc9a01_sd_OnDiskGif.py. Cooperate with displayio, this mode is relatively slow. """ Raspberry Pi Pico 2 W/CircuitPython 10.0.3 with 1.28" 240x240 Round GC9A01 SPI IPS LCD Display animated GIF in SD, using gifio.OnDiskGif. Cooperate with displayio, this mode is relatively slow. https://coxxect.blogspot.com/2026/02/raspberry-pi-pico-2-wcircuitpython-1003.html ref: https:...

my display module: Spotpear Pico HDMI Board

Image
Spotpear Pico HDMI Board schematic: Links: ~ Spotpear Raspberry Pi Pico HDMI Board User Guide Exercise: ~  Pico HDMI Board on CircuitPython

Pico 2 W/CircuitPython 10.0.3 Display bmp images in SD, using displayio.OnDiskBitmap()/adafruit_imageload.load().

Image
Raspberry Pi Pico 2 W with CircuitPython 10.0.3, to display BMP images from an MicroSD card on a 240*240 GC9A01 Round LCD , using displayio.OnDiskBitmap() and adafruit_imageload.load(). Reference: -  displayio.OnDiskBitmap() -  adafruit_imageload.load() All bmp were resized and converted from jpg to 240*240 RGB888 bmp using FFmpeg . Connection: Raspberry Pi Pico 2 W ===================== GP28| GND | GP27| GP26| Run | GP22| ------- LCD_BLK ------------+ GND | | GP21| ------- LCD_DC ---------+ | GP20| ------- LCD_RES-------+ | | +------- SD_MISO|GP12 GP19| MOSI - SPI_SDA ----+ | | | | +----- SD_CS |GP13 GP18| SCK - SPI_SCL --+ | | | | | | |GND GND | | | | |...

CircuitPython to list files in SD

Image
CircuitPython exercise to list files in SD Connection: Raspberry Pi Pico 2 W ===================== GP28| GND | GP27| GP26| Run | GP22| GND | GP21| GP20| +------- SD_MISO|GP12 GP19| | +----- SD_CS |GP13 GP18| | | |GND GND | | | +--- SD_SCK |GP14 GP17| | | | +- SD_MOSI|GP15 GP16| | | | | +---------------+ | | | | | | | | SD Module | | | | ========= | | | | GND --- GND +-|-|-|-------- MISO | +-|-------- CLK | +-------- MOSI +------------ CS 3V3 --- 3V3 Exercise Code: cpy_rpPicoW_sd.py """ Raspberry Pi Pico 2 W/CircuitPython 10.0.3 with SD Card module. List files in SD. """ import os, sys import board...