breadboard
docs

Example project · Start here

ESP32-H2 blink

A real emulated ESP32-H2 (single RISC-V RV32IMAC at 96 MHz, 320 KB SRAM) runs the bundled chip-specific firmware and blinks its onboard G8 RGB pixel. H2 has Bluetooth LE and 802.15.4 for Thread/Zigbee, and no Wi-Fi. Official MicroPython with BLE is available from the Inspector.

The ESP32-H2 blink circuit as rendered by the simulator

How it works

The ESP32-H2 is the low-power member of the family: one RISC-V core at 96 MHz, Bluetooth LE and an IEEE 802.15.4 radio for Thread and Zigbee, and no Wi-Fi at all. Its default firmware, example:esp32h2-blink, is a hand-assembled program that touches only the H2's own peripheral addresses. After a banner on UART0 it toggles the onboard RGB pixel on G8 between dim red and off.

The timing comes from the 16 MHz system timer: comparator 0 fires every 4,000,000 ticks, which is 0.25 s, and the interrupt reaches the core through the H2's interrupt matrix and its PLIC. The core sleeps in wfi between alarms instead of spinning in a delay loop. Each WS2812 frame is counted in core cycles and scaled from the 96 MHz clock, so the slower chip produces the same waveform as faster ones.

What to watch

Serial shows ESP32-H2 ready - blinking G8 RGB pixel (RV32IMAC core). The G8 pixel then alternates between red and dark every quarter of a second, and keeps doing so with no further serial output. Select the board to see the H2's radios and the other firmware the Inspector offers for this chip.

What's on the bench

  • ESP32-H2 DevKitM-1

This project runs prebuilt firmware on the emulated board; open it in the simulator to watch it work and inspect every part live.

Try this

  • In the Inspector, load official ESP32_GENERIC_H2 MicroPython v1.29.0 and use its USB-Serial-JTAG REPL. At the REPL, run import machine, neopixel, then np = neopixel.NeoPixel(machine.Pin(8), 1), np[0] = (64, 0, 0) and np.write(). The G8 pixel lights red.
  • In that REPL, run import bluetooth, ble = bluetooth.BLE() and ble.active(True). Then enter ble.active() to check that Bluetooth LE is running. The REPL prints True.
  • Open the ESP32-H2 Zigbee or OpenThread example to see the 802.15.4 radio at work, each with an ESP32-C6 as the partner board.

Related projects