- Notifications
You must be signed in to change notification settings - Fork6
License
NotificationsYou must be signed in to change notification settings
shanemmattner/ESP32-C3_Rust_Tutorials
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Variousembedded Rust tutorials
using theESP32-C3. We'll work towards making aremote data logger
by first implementing peripherals we will need to build the larger project.
Each tutorial below has aYouTube video
link where I will start with a blank project and implement a peripherals using the latestesp-idf-hal version.
- Tutorials: Source code for theYouTube tutorials
- WIP: Half-baked crates that may have some useful code in the future
- docs: Various datasheets, books, and technical manuals
- submodules: All of the submodules for this repository.
- referecnce projects: A huge collection of embedded Rust projects that I copy code from
- Data-Logger-PCB: KiCAD hardware designs for ESP32-C3 data logger PCB
Minimum viable product project where we'll implement all the peripherals and features we need for the data logger
- 4 ADC's
- 16 Digital I/O
- DHT11
- SD card logging
- UART CLI Shell
- p0-output: Make the "Hellow World" of embedded systems: a
Blinky application
to periodically turn an LED on and off - p1-input: Add a button to turn the blinking logic on and off
- p2-threads: Move the button logic and LED logic to their own thread and pass messages between threads withcrossbeams channel
- p3-adc: Read ananalog-to-digital converter channel and print out the value
- p4-dht11: Read aDHT11 for temperature and humidity data
- p5-i2c: Configure and use aSX1509 GPIO Expander throughI2C
- p6-spi: Write a string to a uSD card over SPI usingembedded-sdmmc crate
- p7-uart: Receiver characters from the UART and send them back when we detect acarriage return
- p8-cli-shell: Create a simpleCLI shell to interact with the ESP32-C3 over UART
- p9-adc-stream: Configure ADC's to continuously read and make that data available to other parts of the application through a mutex
- p10-log-values: Log all the values read from the ADC's
- p11-digital-stream: Continuously read the SX1509 inputs and log to SD card
For the next part of the project we will add in features listed below:
- Debugging
- Logging
- FSM/HSM
- Wifi
- MQTT
- OTA
- Pub/sub
- Crash dumps & diagnostics
Other features I'd like to add but don't have a clear example for yet:
- DMA
- Timer usage
Development environment setup
- Install Rust and associated build tools
- Start a project using theesp-idf-template from the private repo home
dir
. I chose all the default options
# STD Projectcargo generate https://github.com/esp-rs/esp-idf-template cargo# NO-STD (Bare-metal) Projectcargo generate https://github.com/esp-rs/esp-template
- Build the
Hello World
program by runningcargo build
in the new project dir. This will take a while to build the first time:
cd esp32-rustcargo build...Finished dev [optimized + debuginfo] target(s) in 6m 40s
- Flash the ESP32 with the build artifact:
espflash /dev/ttyACM0 target/riscv32imc-esp-espidf/debug/project
- Connect to ESP32 and monitor
espmonitor /dev/ttyACM0
Misc
Pull in code for submodules with:
git submodule update --init --recursive
About
No description, website, or topics provided.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.