Skip to content

ilaborie/toboggan-esp32

Repository files navigation

Toboggan ESP32

ESP32-S3-BOX-3B embedded application that connects to a presentation server (Toboggan) via WiFi and WebSocket to display slides on a built-in screen with RGB LED status indicators.

Note: This is an educational and fun project created to explore Rust's capabilities across different platforms - from embedded systems to web browsers. While fully functional, it's designed primarily for learning and experimentation rather than production use. It's a playground to demonstrate how Rust can target everything from microcontrollers to iOS apps!

Hardware

Target Device: ESP32-S3-BOX-3B

  • MCU: ESP32-S3 (Xtensa dual-core)
  • Display: MIPIDSI 240x320 SPI
  • RGB LED: GPIO 39 (red), 40 (green), 41 (blue)
  • WiFi: Built-in 802.11b/g/n

Quick Start

Prerequisites

Install tools via mise:

mise install

This installs: ldproxy, espflash, espup, and esp-generate.

Configuration

Create .mise.local.toml (gitignored):

[env]
WIFI_SSID = "your-wifi-network"
WIFI_PASSWORD = "your-password"
TOBOGGAN_HOST = "192.168.1.100"
TOBOGGAN_PORT = "8080"

Build and Flash

# Build for release
cargo build --release

# Flash and monitor
cargo espflash flash --monitor --release

Architecture

  • Multi-threaded: WiFi, API, WebSocket, and main display loop
  • State machine: Booting → Connecting → Loading → Play/Paused/Done
  • Message passing: Workers communicate via std::sync::mpsc channels
  • LED indicators: Visual feedback for each application state

Key Crates

ESP32 Ecosystem

  • esp-idf-svc - High-level Rust bindings for ESP-IDF services (WiFi, HTTP, WebSocket)
  • esp-idf-sys - Low-level ESP-IDF bindings (auto-generated)
  • embuild - ESP-IDF build integration for Cargo
  • embedded-svc - Embedded service traits (WiFi, HTTP client, etc.)

Display & Graphics

Utilities

  • heapless - Static data structures (Vec, String) without heap allocation
  • serde / serde_json - JSON serialization for WebSocket messages
  • anyhow - Flexible error handling
  • log - Logging facade

Resources

Official Rust ESP32 Documentation

Tools

Community

License

Licensed under either of:

at your option.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages