ESP32 Installation (Wendy Lite)
Install Wendy Lite on ESP32 RISC-V microcontrollers
ESP32 Installation (Wendy Lite)
Wendy Lite is a WebAssembly runtime for ESP32 RISC-V microcontrollers. It lets you write firmware in Swift and deploy it as a .wasm binary to ESP32-C6 and ESP32-C5 devices.
Supported chips: Wendy Lite targets ESP32-C6 and ESP32-C5 (RISC-V). Classic ESP32 (Xtensa) is not supported.
What You'll Need
- An ESP32-C6 or ESP32-C5 development board
- USB cable for connecting the board to your computer
- Wendy CLI installed on your development machine (Developer Machine Setup)
- Swift 6.0+ with Embedded Swift WASM support (Developer Machine Setup)
Installing Wendy Lite Firmware
Connect Your Board
Plug your ESP32-C6 or ESP32-C5 board into your computer via USB.
Install the Firmware
Use the wendy CLI to flash the Wendy Lite firmware to your board:
wendy os installSelect ESP32-C6 (or ESP32-C5) when prompted, then select the USB serial port for your board. The CLI will download and flash the Wendy Lite firmware automatically.
Discover Your Device
Once the firmware is flashed, the board will restart and advertise itself over BLE. Run:
wendy discover
wendy device set-defaultYou should see your ESP32 device appear in the list of discovered devices.
Writing Your First App
Create a New Project
Use the Wendy CLI to scaffold a new Wendy Lite project:
mkdir blink && cd blink
wendy initSelect ESP32 as the target platform when prompted. This creates a Swift project preconfigured with the WendyLite SDK and the correct build settings for WebAssembly.
Explore the Project Structure
After initialization, you'll have the following structure:
blink/
├── Package.swift
├── wendy.json
└── Sources/
└── blink/
└── main.swiftEdit Your App
Open Sources/blink/main.swift and replace the contents with a simple blink example:
import WendyLite
let led = GPIO(pin: 8, mode: .output)
while true {
led.high()
Timer.delay(milliseconds: 500)
led.low()
Timer.delay(milliseconds: 500)
}Deploying to the Device
Once your project is set up, deploy it to your ESP32 with a single command:
wendy runThe Wendy CLI compiles your Swift code to WebAssembly and uploads the .wasm binary to the device. You should see the onboard LED start blinking.
BLE Provisioning
Wendy Lite devices advertise themselves as Wendy-XXXX over BLE for WiFi provisioning. You can send WiFi credentials and cloud certificates via the BLE GATT interface, enabling headless setup of devices in the field.
Observability
Wendy Lite supports OpenTelemetry natively. Your application can emit structured logs, metrics, and traces that integrate with the Wendy dashboard alongside your Jetson and Raspberry Pi devices.
import WendyLite
Log.info("Sensor reading", attributes: ["temperature": 23.5, "humidity": 61.2])
Metrics.gauge("temperature", value: 23.5)Next Steps
- Explore the Wendy Lite examples for GPIO, I2C, SPI, BLE, and WiFi demos
- Check the Developer Machine Setup for CLI installation
- Read the Raspberry Pi 5 Installation or NVIDIA Jetson Installation guides if you also work with larger devices