Posts

CircuitPython to control ESP32-H2-DevKitM-1-N4 onboard RGB LED

Image
CircuitPython 10.0.3 code to control  ESP32-H2-DevKitM-1-N4 onboard RGB LED. import os, sys print("=========================================") print(sys.implementation[0], os.uname()[3], "\nrun on", os.uname()[4]) print("=========================================") import time import neopixel import board def cycleNeopixel(wait): for r in range(255): pixel[0] = (r, 0, 0) time.sleep(wait) for r in range(255, 0, -1): pixel[0] = (r, 0, 0) time.sleep(wait) for g in range(255): pixel[0] = (0, g, 0) time.sleep(wait) for g in range(255, 0, -1): pixel[0] = (0, g, 0) time.sleep(wait) for b in range(255): pixel[0] = (0, 0, b) time.sleep(wait) for b in range(255, 0, -1): pixel[0] = (0, 0, b) time.sleep(wait) print("to control onboard RGB NeoPixel") print("neopixel version: " + ...

Control onboard RGB LED of Waveshare ESP32-H2-Zero and ESP32-H2-DevKitM-1-N4, in Arduino framework.

Image
Following code control the onboard RGB LED of Waveshare ESP32-H2-Zero and ESP32-H2-DevKitM-1-N4 , in Arduino framework. H2_BlinkRGB.ino /* H2_BlinkRGB */ void setup() { // No need to initialize the RGB LED } // the loop function runs over and over again forever void loop() { // * notice the color order rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red delay(1000); rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green delay(1000); rgbLedWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue delay(1000); rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Off / black delay(1000); int fade_speed = 10; for(int i=0; i<=255; i++){ rgbLedWriteOrdered(RGB_BUILTIN, LED_COLOR_ORDER_RGB, i, 0, 0); // Red delay(fade_speed); } for(int i=255; i>=0; i--){ rgbLedWriteOrdered(RGB_BUILTIN, LED_COLOR_ORDER_RGB, i, 0, 0); // Red delay(fade_speed); } for(int i=0; i<=255; i++){ rgbLedWriteOrdered(RGB_BUILTIN, LED_COLOR_ORDER_RGB, 0, i,...

My dev.board: ESP32-H2-DevKitM-1-N4

Image
 My dev.board: No brand ESP32-H2-DevKitM-1-N4 development board. Related links: ~ Espressif  ESP32-H2-DevKitM-1 Arduino Exercises: ~  Control onboard RGB LED of Waveshare ESP32-H2-Zero and ESP32-H2-DevKitM-1-N4, in Arduino framework . CircuitPython Exercises: ~  CircuitPython to control ESP32-H2-DevKitM-1-N4 onboard RGB LED

My dev.board: Waveshare ESP32-H2-Zero

Image
 My dev. Board:  Waveshare ESP32-H2-Zero ~ Product link:  Waveshare ESP32-H2-Zero Exercises: ~  Control onboard RGB LED of Waveshare ESP32-H2-Zero and ESP32-H2-DevKitM-1-N4, in Arduino framework .

TFT_eSPI + LVGL on Xiao ESP32S3 + ST7789 SPI IPS with FT6236 cap touch.

Image
To implement TFT_eSPI + LVGL on Xiao ESP32S3 + ST7789 SPI IPS with FT6236 cap touch. First, follow previous exercise Xiao ESP32S3 display on 240*240 ST7789 SPI LCD/FT6236U cap. touch using TFT_eSPI in Arduino Framework , make sure both ST7789 and FT6236 works using TFT_eSPI library. Install LVGL library in Arduino IDE Library Manager. Follow the video to prepare lv_conf.h file. Then you can try LVGL example: > File > Examples > lvgl > arduino > LVGL_Arduino My example codes: XS3_ST7789_TFT_eSPI_lvgl.ino Create a button to toggle onboard LED. /* TFT_eSPI + LVGL exercise run on Xiao ESP32S3 + 1.54" 240x240 ST7789V2 SPI IPS with FT6236 cap touch Create a button to toggle onboard LED. https://coxxect.blogspot.com/2025/10/tftespi-lvgl-on-xiao-esp32s3-st7789-spi.html modified from Examples > lvgl > arduino > LVGL_Arduino Library needed: - TFT_eSPI - LVGL Preparation: - Prepare TFT_eSPI in Arduino ...

Xiao ESP32S3 display on 240*240 ST7789 SPI LCD/FT6236U cap. touch using TFT_eSPI in Arduino Framework.

Image
This video show steps how Xiao ESP32S3 display on 1.54" 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 FT6236 ---------------------------- SCL GPIO6 SDA GPIO5 INT GPIO43 (Not used) RST GPIO44 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> #de...

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...