It is a really really cool tutorial. You don't cut anything and like this it's way more pleasant to understand everything. Usually people on youtube cut all theirs mistakes but those are really 70% of the time of a dev and the process to fix those is really what makes the learning good. You won a subscriber keep on this kind of content !
@DavidCabanis2 жыл бұрын
Thank you Andrei, I have been looking for Embedded Rust tutorials all over youtube but your is the most exhaustive so far. You really took the time to explain all the steps; Brilliant work thanks again.
@jamjestlx2 жыл бұрын
Some libraries consume delay, do You know how to solve this issue? There is a similar problem with the i2c bus for example but there is the shared-bus library.
@embedded-rust2 жыл бұрын
Can you give a specific example link? I believe I encountered this before but in that case Delay was a trait and I ended up implementing it myself. The original delay was using timers and one could only have a single timer to expire hence delay was consumed.
@embedded-rust2 жыл бұрын
@@jamjestlx Looking at the code in docs.rs/bme280/0.3.0/src/bme280/lib.rs.html#369 and more, it looks to me like the delay is not dependent on super high accuracy, just that enough time passes, basically startup time or measuring time. What I imagine you could do is have some struct containing a Mutexed delay object and implement DelayMs for that (basically deferring delay to the underlying delay). It will not be perfect as the mutex may block more than the delay requested, however at least for the BME280 it should be enough.
@embedded-rust2 жыл бұрын
By mutex I mean some form of ARC + Mutex or pointing to a global mutexed delay, so that you can consume and construct several instances of the same struct pointing to a shared Mutexed delay.