2024 03 15 Iot Systems With Esp32
2024 03 15 Iot Systems With Esp32
with
ESP32
2024-03-15
FIT VUT - Brno
Juraj Michálek - Espressif Systems
What is your favorite?
Programming language
Operating system
Editor
IDE
Cloud provider
Espressif System
Espressif Systems is a public multinational, fabless semiconductor company established in 2008, with offices in China, the Czech Republic,
India, Singapore and Brazil.
Espressif Leads the IoT Chip Market with Over 1 Billion Global Shipments
Arduino - https://github.com/espressif/arduino-esp32
- 12 300+ stars
Elektor Mag
https://www.elektor.com/products/elektor-s
pecial-espressif-guest-edition-2023-pdf-en
Wearables
The Ultimate Guide to Informed Wearable Technology
- book: https://packt.link/01VBv
Developing IoT Projects
with ESP32
https://blog.espressif.com/book-revie
w-developing-iot-projects-with-esp32
-2nd-edition-facdef7545bb
MicroPython Projects
https://www.packtpub.com/product/microp
ython-projects/9781789958034
ESP32-C3 Wireless Adventures a Comprehensive Guide to IoT
https://espressif.github.io/esp32-c3
-book-en/
More books about ESP32
https://www.espressif.com/en/ecosystem/community-engagement/books
Designing Open Hardware - esp-rust-board
KiCad templates
https://github.com/esp-rs/esp-rust-board
ESP32-C3-DevKit-RUST-1
https://www.espressif.com/en/products/devkits
Open Hardware - ESP32-S3-BOX-3
https://github.com/espressif/esp-box
Joystick controller
https://github.com/espressif/esp-box/tree/master/exampl
es/esp_joystick/joystick_controller
Desktop vs. Embedded development
Memory: GB (TB) vs. kB (MB bytes of PSRAM)
Zephyr - https://zephyrproject.org/
- EDC22 Day 1 Talk 10: Applications of Asymmetric Multiprocessing with ESP32 Devices -
including Rust on one core - https://youtu.be/oble9ObAqxM
- C/C++
- most common choice - https://github.com/espressif/esp-idf
- Rust
- security and memory guaranties of Rust
- https://github.com/esp-rs
- multi-target support: Xtensa, RISC-V, plus WASM, desktops or mobile
- Arduino - Maker choice
- Arduino IDE 2.x
- note: check the license for production
wokwi.com/rust
Contribute: https://github.com/wokwi
Fragmentation
Security
UX
Development
Certification
…
Matter
Repo: https://github.com/project-chip/connectedhomeip
Specs: https://csa-iot.org/developer-resource/specifications-download-request/
Article: https://blog.espressif.com/what-does-matter-mean-to-you-fa3bb53a7793
Matter for end user
No more silos
More ecosystems
Better security
https://blog.espressif.com/what-does-matter-mean-to-you-fa3bb53a7793
Espressif and Matter
Support for ESP32 is upstream
https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32
https://blog.espressif.com/matter-clusters-attributes-commands-82b8ec1640a0
Cluster list
ID; Cluster Name 0x0050 - Mode Select
0x0006 - On/Off
Supported by JetBrains:
Supported by SysProgs
Joystick controller
https://github.com/espressif/esp-box/tree/master/exampl
es/esp_joystick/joystick_controller
News: Ferrocene compiler - the major milestone in 2023
Ferrocene is an open source qualified Rust compiler toolchain. Ferrous Systems invested its decade
of Rust experience to make Rust a first-class language for mission-critical and functional safety
systems.
For its first release, Ferrocene 23.06 is a ISO 26262 (ASIL D) and IEC 61508 (SIL 4) qualified version
of the existing open-source compiler, rustc, based on Rust 1.68.
https://ferrous-systems.com/ferrocene/
Why Ferrocene? https://www.youtube.com/live/i06djj0KvB8?si=mxXuuWPMpSs-JC2r
Rainmaker
Rust layer - Linux & ESP
https://github.com/shreyash-b/rainmaker-rs
Cloud connectivity
Time-O-Mat - built at summer camp
https://github.com/vedatori/Time-O-Mat
Grafana
https://grafana.com/blog/2020/06/17/how-to-monitor-a-sourdough-starter-with-grafana/
- https://espressif.github.io/esp-launchpad/?flashConfigURL=https://espressif.github.io/esp-mat
ter/launchpad.toml
Async with Embassy
Embassy: https://github.com/embassy-rs/embassy
https://github.com/georgik/esp32-spooky-maze-game
https://github.com/espressif/esp-box
Rust language support
Talk: Embedded Rust on ESP32 - Juraj Michálek - Rust Linz November 2022
https://youtu.be/0PPPdqoDBQs
IDEs with Rust support
Supported by Espressif:
Supported by JetBrains:
- RustRover - https://www.jetbrains.com/rust/
Rust component in C/C++ project
ESP-IDF has notion of components (libraries)
https://github.com/georgik/esp32-idf-no-std-rust-component
https://github.com/georgik/esp32-idf-nmea-example
https://aerorust.org/
Debugging
2 steps:
no_std
- no C dependencies
- https://github.com/esp-rs/esp-template
Starting from template
cargo generate esp-rs/esp-template
https://github.com/embedded-graphics
https://github.com/lvgl/lv_binding_rust
Slint UI
https://slint.dev/
2 options:
- bare metal
- ESP-IDF component: https://components.espressif.com/components/slint/slint
Espressif and Matter
Support for ESP32 is upstream
https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32
- https://www.youtube.com/watch?v=FA1jqZLig4s
https://github.com/wokwi/esp32c6-i2c-lp
Pause button - see state of GPIOs
Wokwi F1 menu (download binary and many more)
Wokwi Logic Analyzer
https://docs.wokwi.com/chips-api/getting-started
https://wokwi.com/projects/366167936725307393
Wokwi Profiler
https://profiler.wokwi.com/
Wokwi CI
https://github.com/wokwi/wokwi-ci-action
Rust STD Training Embedded for ESP32-C3
Material: https://esp-rs.github.io/std-training/
GitHub: https://github.com/esp-rs/espressif-trainings
- https://github.com/esp-rs/esp-hal/blob/main/esp32-hal/examples/embassy_hello_world.rs
- https://github.com/esp-rs/esp-hal/blob/main/esp32-hal/examples/embassy_spi.rs
- https://github.com/esp-rs/esp-hal/blob/main/esp32-hal/examples/embassy_wait.rs
Accelerated learning with AI
Rust has steep learning curve
VM based:
https://youtu.be/mR3gUNXMEsM?si=7Rkq7wbClCvnM3pw
Rust language support
Talk: EDC23 - Rust Bare-metal and Async - Scott Mabin, Juraj Sadel - DevConf September 2023
https://youtu.be/QPp4WEjx5jU?si=zJwXPT8WxXOFq8oy
Talk: EDC22 - Rust on Espressif chips - Scott Mabin - DevConf September 2022
https://youtu.be/qeEmJ_-6fPg
Talk: Embedded Rust on ESP32 - Juraj Michálek - Rust Linz November 2022
https://youtu.be/0PPPdqoDBQs
Where you can find us?
https://makerfaire.cz/praha/
Přízova 3, 602 00 Brno
Embedded World 2024
Meet us in Nuremberg, Germany - 9th - 11th April 2024
Visit us in Brno
Espressif Systems (Czech) s.r.o.
Czechia, Europe