Espressif ESP32 C-series boards
Espressif release development boards for each of their low-cost Wi-Fi microcontroller modules. This is a selection of the Espressif boards for the ESP32-C3, ESP32-C5, and ESP32-C6, which are all based on RISC-V processors.
These boards all provide a USB to Serial chip, and that gives a reliable USB interface with minimum RAM usage. These boards can therefore be recommended for use with uLisp, even when uploading large uLisp programs via the Serial Monitor.
Boards
General features
The following features apply to all boards.
Installing the ESP32 Arduino core
If you don't already have the ESP32 Arduino Core installed:
- Add the following URL to the Additional Boards Manager URLs list in the Arduino IDE Preferences dialog box:
https://espressif.github.io/arduino-esp32/package_esp32_index.json
- In the Arduino IDE search for the ESP32 Arduino core in Boards Manager and install it.
I tested this with core version 3.3.7.
Setting up the Board options
The installation procedure is the same for all of these boards:
- Select ESP32 Arduino from the Board menu.
- Select the appropriate Board option: ESP32-C3 Dev Module, ESP32-C5 Dev Module, or ESP32-C6 Dev Module.
- Set USB CDC On Boot: to "Disabled".
- Set Partition Scheme to Default 4MB with spiffs.
If your board has PSRAM, specify whether you want to use it:
- Set PSRAM: to "Enabled" (recommended) or "Disabled".
You can leave the other options at their defaults.
Uploading uLisp
- Download release 4.9a or later of the ESP version of uLisp from the Download uLisp page.
- If the board has two USB sockets, connect to the board via the one labelled UART.
- Select the board's USB port from the Port menu.
- Upload uLisp to the board.
Uploading Lisp programs
To upload a program to uLisp:
- Select it, including the comment at the top of the program, and do Copy.
- Click in the Arduino Serial Monitor input field and do Paste, then press Return.
The comment disables echo, which could interfere with the serial upload.
LittleFS and save-image
The ESP32 version of uLisp uses LittleFS to allow you to save the entire workspace on all ESP32 boards using (save-image).
The first time you call save-image LittleFS allocates the file system, and an error may be displayed such as:
./components/esp_littlefs/src/littlefs/lfs.c:1071:error: Corrupted dir pair at {0x0, 0x1}
E (62578) esp_littlefs: mount failed, (-84)
E (62579) esp_littlefs: Failed to initialize LittleFS
It should subsequently work without error.
If you have previously used the board with an older version of the Arduino ESP32 core and you get the error:
assert failed: lfs_fs_grow_ lfs.c:5263 (block_count >= lfs->block_count)
upload uLisp again after selecting the option:
- Erase All Flash Before Sketch Upload: "Enabled"
Wi-Fi
All these boards support Wi-Fi. To connect to a Wi-Fi network give the wifi-connect command with the network name and password; for example:
> (wifi-connect "Geronimo" "secret99") "10.0.1.28"
If successful it will return the IP address you are connected to.
For more examples of using the Wi-Fi features see Wi-Fi examples, and for reference information see Wi-Fi extensions.
NeoPixel
These boards include a NeoPixel RGB LED. The following program slowly displays the full range of colours on the LED using the rgbledwrite function:
; NeoPixel spectrum
(defvar neopixel 48)
(defun fix (y)
(setq y (mod y 1536))
(if (>= y 768) (setq y (- 1535 y)))
(setq y (max (min (- y 256) 255) 0)))
(defun spectrum ()
(unwind-protect
(loop
(dotimes (c 1536)
(rgbledwrite neopixel (fix (+ c 768)) (fix (+ c 256)) (fix (+ c 1280)))
(delay 50)))
(rgbledwrite neopixel 0 0 0)))
Set neopixel to the pin corresponding to the NeoPixel. The unwind-protect turns off the LED if you escape from the program.
To run the program enter:
(spectrum)
To exit type a ~.
Sleep
The sleep function can be used to put these boards into light sleep for a specified number of seconds. The current consumption typically drops to 5% of normal power.
ESP32-C3-DevKitM-1
This is Espressif's official DevKit board for the RISC-V ESP32-C3 based on the ESP32-C3-MINI-1 module [1]. It uses a CP2102N USB-to-Serial chip for the serial interface:

The ESP32-C3 is a single-core RISC-V processor running at 160 MHz. It provides 4 Mbytes of SPI flash, but no PSRAM.
NeoPixel
The ESP32-C3-DevKitM-1 Board has a NeoPixel connected to digital pin 8.
Analogue inputs
The ESP32-C3-DevKitM-1 Board has 6 analogue inputs, on pins 1 (A0) to 6 (A5).
Serial
The ESP32-C3-DevKitM-1 Board has one serial port on pin numbers 20 (RX) and 21 (TX).
SPI
The ESP32-C3-DevKitM-1 Board has one SPI port on pin numbers 7 (SS), 5 (MISO), 6 (MOSI), and 4 (SCK).
I2C
The ESP32-C3-DevKitM-1 Board has one I2C port on pins 8 (SDA) and 9 (SCL).
ESP32-C5-DevKitC-1 Board
The ESP32-DevKitC-1 Board is a development board from Espressif for evaluating their new ESP32-C5 module:

The ESP32-C5 module features a 240 MHz RISC-V processor, with 16 Mbytes of flash, 384 KB of on-chip SRAM, and 4 Mbytes of PSRAM. It has 2.4 and 5 GHz Dual-band Support supporting Wi-Fi 6 (802.11ax) with 802.11a/b/g/n/ac backwards compatibility. It also supports Bluetooth 5 (LE), Zigbee, and Thread.
NeoPixel
The ESP32-C5-DevKitC-1 Board has a NeoPixel connected to digital pin 27.
Analogue inputs
The ESP32-C5-DevKitC-1 Board has 6 analogue inputs, on pins 1 (A0) to 6 (A5).
Serial
The ESP32-C5-DevKitC-1 Board has two serial ports: port 0 on pins 12 (RX) and 11 (TX), and port 1 (LP) on pins 4 (RX) and 5 (TX).
SPI
The ESP32-C5-DevKitC-1 Board has one SPI port on pin numbers 6 (SS), 9 (MISO), 8 (MOSI), and 10 (SCK).
I2C
The ESP32-C5-DevKitC-1 Board has two I2C ports: port 0 on pins 0 (SDA) and 1 (SCL), and port 1 (LP) on pins 2 (SDA) and 3 (SCL).
ESP32-C6-DevKitC-1
ESP32-C6-DevKitC-1 is an entry-level development board based on ESP32-C6-WROOM-1(U):

The ESP32-C6 is a single-core RISC-V processor running at 160 MHz, with 512 KB SRAM and 8 MB SPI flash, but no PSRAM. It supports Wi-Fi, Bluetooth LE, Zigbee, and Thread.
Analogue inputs
The ESP32-C6-DevKitC-1 has 7 analogue inputs on pins 0 to 6.
Analogue outputs
You can generate an analogue output using PWM on any of the digital pins. The precision is 8 bits.
Serial
The ESP32-C6-DevKitC-1 has one serial port on pin numbers 17 (RX) and 16 (TX).
SPI
The ESP32-C6-DevKitC-1 has one SPI port on pin numbers 18 (SS), 19 (MOSI), 20 (MISO), and 21 (SCK).
I2C
The ESP32-C6-DevKitC-1 has two I2C ports: port 0 on pins 23 (SDA) and 22 (SCL), and port 1 on pins 6 (SDA) and 7 (SCL).
- ^ ESP32-C3-DevKitM-1 Development Board on The Pi Hut.
