This project is intended for my own amusement and Rust learning. The main goal of the project is to have a bunch of air quality sensors connected to a ESP32 devboard. The ESP32 will then report the sensor data to a server on a local network via wifi. The data shall then be represented on a web gui of some sort.
This repository will hold both the firmware running on the ESP32 and the web gui software running on the server. The idea is to write all of it in Rust.
- Board: ESP32-C6-DevKitC-1-N8
- HP CPU: 160 MHz RISC-V
- LP CPU: 20 MHz RISC-V
- HP RAM: 512 kB
- LP RAM: 16 kB
- ROM: 32 kB
- SPI Flash: 8 MB
- and more...
The RGB LED on the board is the WS2812B. The red, green and blue colors are encoded in a 24 bit value, 8 bits per color. An example below for each color at full brightness:
- Green:
0b11111111_00000000_00000000 = 0xff0000 - Red:
0b00000000_11111111_00000000 = 0x00ff00 - Blue:
0b00000000_00000000_11111111 = 0x0000ff
Installation steps (provided that Rust is installed), where the target triple is: riscv32imac-unknown-none-elf
rustup update
rustup toolchain install nightly --component rust-src
rustup target add riscv32imac-unknown-none-elfAn embedded programming and debugging tooltool. Among other features it supports RTT.
curl -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | shA serial flash cli utility tool for esp32 SoC's. Provided by Espressif.
cargo install espflash --lockedProject template generation tool to create applications for ESP SoC's.
cargo install esp-generate --locked
esp-generateAdd udev rule to give user access to serial-usb device, and add current user to dialout group
echo 'ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GROUP="dialout", MODE="0666"' | sudo tee /etc/udev/rules.d/99-esp.rules
sudo usermod -aG dialout $USERFlash the esp32-c6 target
cargo run --release