impl Rust on ESP32 Book logo

impl Rust on ESP32 Book

Free

A hands-on guide that uses the ESP32 DevKit V1 to demonstrate how to work with various modules and sensors. ([github source](https://github.com/ImplFerris/esp32-book))

FreeFree tier
Type
Open Source

About impl Rust on ESP32 Book

A hands-on guide to learning embedded Rust programming using the ESP32 DevKit V1 microcontroller. The book covers building IoT projects such as controlling an LED with a light-dependent resistor (LDR), using an ultrasonic sensor for proximity detection, controlling an LED over Wi-Fi, displaying images and text on an OLED screen, playing tunes with a buzzer, and controlling a servo motor. All projects are developed in Rust's no_std environment, making the skills transferable to other microcontrollers. The book assumes prior reading of 'The Rust on ESP Book' and 'The Embedded Rust book', and includes hardware prerequisites, datasheets, and a license (MIT/Apache for code, CC-BY-SA for prose).

Key Features

Hands-on projects with ESP32 DevKit V1
Uses Rust's no_std environment for portability
Covers LDR-based LED control
Ultrasonic sensor proximity detection
Wi-Fi controlled LED
OLED display for images and text
Buzzer for tunes and alarms
Servo motor control
Includes hardware prerequisites and datasheet references
Open source with permissive licenses

Pros & Cons

Pros
  • Free and open source
  • Practical, project-based learning
  • no_std approach enables skills transfer to other MCUs
  • Covers multiple common sensors and output devices
  • Well-structured with clear hardware setup guidance
  • Written prose and code samples under permissive licenses
Cons
  • Requires prior knowledge of Rust and ESP32 basics
  • Targets only ESP32 DevKit V1 hardware
  • no_std environment may be limiting for beginners used to std
  • Does not cover advanced topics like multi-tasking or deep sleep
  • Results may vary; author provides disclaimer and no guarantees

Best For

Learning embedded Rust programmingPrototyping IoT sensor and actuator projectsEducational resource for microcontroller coursesHands-on experimentation with ESP32 hardwareBuilding foundational skills for bare-metal Rust development

FAQ

What hardware do I need to follow this book?
You need an ESP32 DevKit V1 board, a breadboard (or two mini breadboards to accommodate the board width), and the specific sensors/actuators mentioned in projects (LDR, ultrasonic sensor, OLED display, buzzer, servo motor).
What Rust environment is used?
The book uses Rust's no_std environment, which is suitable for bare-metal embedded systems and allows you to apply the same logic to other microcontrollers.
Is there any prior reading required?
Yes, the author recommends first reading 'The Rust on ESP Book' and 'The Embedded Rust book' to understand setup and basic concepts.
What is the license of the book?
The code samples are licensed under MIT and Apache 2.0. The written prose is under Creative Commons CC-BY-SA v4.0.
Can I expect all projects to work exactly as described?
The author states that experiments worked for them, but results may vary. They are not responsible for any issues or damage. Proceed with caution and take safety precautions.