ESP32-C6 board

The ESP32-C6 boards use Espressif's ESP32-C6 32-bit RISC-V single-core processor running at 160 MHz with 8 MB SPI flash. It supports Wi-Fi IEEE 802.11 at 2.4 GHz, Bluetooth LE 5, and IEEE 802.15.4 (Zigbee and Thread). It has 512 KB SRAM and 320 KB ROM.

USB CDC

The ESP32-C6 has a USB CDC (Communications Device Class) that can emulate a serial port over USB. This allows the ESP32-C6 to communicate with a PC or other host device via USB without needing a separate USB-to-serial converter.

However, the current implementation of the USB CDC has a problem that causes it to hang up when transferring long messages, such as a uLisp program. Boards that rely on the USB CDC are therefore unsuitable for use with uLisp.

The following board provides a separate USB-to-serial converter, the CP2102N, and so avoids this problem. This is therefore the only ESP32-C6 board currently recommended for use with uLisp.

Board

ESP32-C6-DevKitC-1

Installing uLisp from the Arduino IDE

Install the ESP32 Arduino core

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

  • Select ESP32 Arduino from the Board menu, and ESP32C6 Dev Module from the submenu.

Set the options as follows:

USB Mode: "Hardware CDC and JTAG"
Flash Size: "8MB (64Mb)"
Partition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)"
PSRAM: "Disabled"

You can leave all the other options at their defaults.

Upload uLisp

  • Download release 4.8d or later of the ESP version of uLisp from the Download uLisp page.
  • Select the board's USB port from the Port menu.
  • Upload uLisp to the board.

Using uLisp

  • Select Serial Monitor from the Tools menu.
  • Enter Lisp commands.

General features

LittleFS and save-image

The ESP32 version of uLisp now 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.

Wi-Fi

The ESP32-C6-DevKitC-1 board supports Wi-Fi. For examples of using the Wi-Fi features see Wi-Fi examples, and for reference information see Wi-Fi extensions.

ESP32-C6-DevKitC-1

ESP32-C6-DevKitC-1 is an entry-level development board based on ESP32-C6-WROOM-1(U), a general-purpose module with an 8 MB SPI flash. It supports Wi-Fi, Bluetooth LE, Zigbee, and Thread:

ESP32-C6.jpg

Pins

ESP32-C6-Pins.gif

For more information see ESP32-C6-DevKitC-1 on the Espressif Wiki.

NeoPixel

The ESP32-C6-DevKitC-1 has a NeoPixel connected to digital pin 8.

The Arduino Core lets you use this like a conventional white LED with digitalwrite, so you can blink it with the following program:

(defun blink (&optional x)
  (digitalwrite :led-builtin x)
  (delay 1000)
  (blink (not x)))

Run it by typing:

(blink)

Exit by entering ~.

Analogue inputs

The ESP32-C6-DevKitC-1 has 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), 21 (SCK), and 20 (MISO).

I2C

The ESP32-C6-DevKitC-1 has two I2C ports: I2C0 on pin numbers 23 (SDA) and 22 (SCL), and I2C1 on pin numbers 6 (SDA) and 7 (SCL).