What You Learned#
The Mental Model#
Instantiate → Configure → Control — it works for every peripheral, every HAL, every driver crate.
| Step | What You Do | Where in the Docs |
|---|---|---|
| Instantiate | Create a driver instance | Struct page → new() or builder |
| Configure | Set behavior options | Config structs, enums |
| Control | Read/write/interact | Trait implementations, methods |
The Ecosystem Layers#
BSP → Driver Crates → embedded-hal → HAL → PAC → HardwareYou now know what each layer does and how to read its documentation.
The Skills#
- Navigate crate documentation to find peripheral modules, examples, driver structs, and methods
- Apply the mental model across different HALs — you compared esp-hal, rp2040-hal, and stm32f4xx-hal
- Use the BSP layer to simplify the pattern to Instantiate → Control
The Workflow#
Find a basic example → Apply the mental model → Map to documentation → ModifyThe example shows ONE way. The docs show ALL ways. Your job is to explore.
Where to Go From Here#
Keep Learning#
Your ESP32-C3 board has more peripherals to explore:
- SPI — faster serial communication (displays, SD cards)
- ADC — read analog values (potentiometers, light sensors)
- PWM — control LED brightness, servo motors
- ESP-NOW — wireless communication between ESP32 devices
Same pattern: find the module in esp-hal docs, Instantiate → Configure → Control.
Dig Deeper#
For a more comprehensive guide, check out the Simplified Embedded Rust: ESP Core Library Edition book.
Level Up with Async#
Embassy is an async runtime for embedded Rust. Instead of interrupt handlers with mutexes, you write async/await code:
// Instead of interrupt handler + AtomicBool flag:
let level = button.wait_for_falling_edge().await;
led.toggle();Check out embassy.dev and the embassy-executor crate.
Stay Connected#
- The Embedded Rustacean — hi@theembeddedrustacean.com
- Newsletter — theembeddedrustacean.com/subscribe
- LinkedIn — The Embedded Rustacean
- Bluesky — @theembeddedrust.bsky.social
Thank you for attending. Now go build something.
