Wednesday, 31 December 2025

ESP32 Web Server

I'm trying out the tutorial at https://randomnerdtutorials.com/esp32-web-server-arduino-ide/ and building a tiny web server with an Adafruit QT Py ESP32-S2l
The circuit I'm trying to reproduce is shown below.
Here is the pinout of the QT Py ESP32-S2.
I'm going to use the A3 pin (GPIO08) as an output for an LED to test. But first I'll experiment with the built in Neopixel. The Adafruit pinouts page identifies that this can be controlled in Arduino as PIN_NEOPIXEL. 
 Here is the basic NeoPixel Blink Sketch

#include <Adafruit_NeoPixel.h>

// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS        1

Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

// the setup routine runs once when you press reset:
void setup() {
  Serial.begin(115200);

#if defined(NEOPIXEL_POWER)
  // If this board has a power control pin, we must set it to output and high
  // in order to enable the NeoPixels. We put this in an #if defined so it can
  // be reused for other boards without compilation errors
  pinMode(NEOPIXEL_POWER, OUTPUT);
  digitalWrite(NEOPIXEL_POWER, HIGH);
#endif

  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.setBrightness(20); // not so bright
}

// the loop routine runs over and over again forever:
void loop() {
  // say hi
  Serial.println("Hello!");
  
  // set color to red
  pixels.fill(0xFF0000);
  pixels.show();
  delay(500); // wait half a second

  // turn off
  pixels.fill(0x000000);
  pixels.show();
  delay(500); // wait half a second
}

I've edited this code to make the NeoPixel flash red, yellow, green, cyan, blue, and magenta in sequence.

CH32V203 Big Round Button

Having successfully uploaded the Blink code to the  CH32V203 , the next task is to try the HID button demo. The circuit I’m using has two bu...