-
Hello everyone! I am building a (not so) small project in order to learn embedded just for fun. The idea is to automate watering my plants while I am away. It'll include water pump, soil moisture sensor and LCD display. I've done tiny things with Arduino and RPi Pico so far, but my experience with embedded in general is still small. One part of the solution is to be able to connect over bluetooth to configure wifi (pass ssid and password) and then to connect to home wifi network to report some data a self-hosted server. My initial idea was to use Does it sound like a sensible way to do my project given my experience level? In what cases would you generally prefer IDF version over bare-metal one? Any advice and guidance are welcome, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sounds like something which should be perfectly doable with bare-metal approach (esp-hal / embassy) Maybe the only thing which might be a bit more involved is the WiFi provisioning via bluetooth. I started something here: https://github.com/bjoernQ/esp32c3-ble-provisioning-experiment but haven't had time to continue working on that. It's also probably something you can skip for the start (if it's just a project for yourself you can set SSID/password via env-variables during the build for the start) Choosing esp-hal (bare-metal) or esp-idf-hal (std) is probably mostly a matter of taste. The big disadvantage (in my personal opinion) about the std approach is that sooner or later you will need to understand enough of ESP-IDF (including the build-system). Maybe you get to a point where you need to implement some Rust wrappers for functionality found in ESP-IDF (probably not for the project you want to implement). And definitely at some point you need to look into the code to learn what is happening under the hood if something doesn't work as expected - in that case you will end up reading C code at some point. On the other hand, esp-hal / bare-metal is just a regular Cargo build and all the code is Rust. I think we have everything you will need for your project but there might be other cases where functionality is missing or incomplete (but since it's an open-source project everyone can contribute). Here you don't have access to the std-lib but that - in general - isn't too much of a problem. Making your code no-alloc is slightly harder but if you want you can opt-in to use alloc - that might make things a lot easier in the beginning (depending on your your level of experience in Rust probably) |
Beta Was this translation helpful? Give feedback.
Sounds like something which should be perfectly doable with bare-metal approach (esp-hal / embassy)
Maybe the only thing which might be a bit more involved is the WiFi provisioning via bluetooth. I started something here: https://github.com/bjoernQ/esp32c3-ble-provisioning-experiment but haven't had time to continue working on that. It's also probably something you can skip for the start (if it's just a project for yourself you can set SSID/password via env-variables during the build for the start)
Choosing esp-hal (bare-metal) or esp-idf-hal (std) is probably mostly a matter of taste.
The big disadvantage (in my personal opinion) about the std approach is that sooner or later you will ne…