News for hackers. Stuff that matters.

eldruin

Re:Playing audio files in a Pi Pico without a DAC on Friday March 08, 2024 @03:18PM (#39645865)
A couple of years ago I wrote a MIDI player with a bluepill board (STM32F1 microcontroller) and a waveform generator (AD9833) in Rust. It was actually quite simple and a lot of fun to write (and hear!).

Video: [1]

Source code: [2]

[1]: https://blog.eldruin.com/ad983x-waveform-generator-dds-drive...

[2]: https://github.com/eldruin/driver-examples/blob/master/stm32...

Looks great! Once you publish the code, please submit it to the Rust Embedded Showcase :)

https://showcase.rust-embedded.org/

Re:The Adoption of Rust in Business on Tuesday February 07, 2023 @08:08AM (#34692226)
For those getting a 404, here the article in MarkDown: https://github.com/RustMagazine/rustmagazine/blob/main/conte...
Re:Introducing multitasking to Arduino on Wednesday August 03, 2022 @06:40AM (#32329936)
There are several microcontroller architectures within the Arduino family officially as well as compatible ones that are also called Arduino-something.

The classic (and oldest) are the AVR microcontrollers (ATmega), which are not supported by embassy nor rtic at the moment AFAIK. They are supported by Rust, though. see: https://github.com/rahix/avr-hal.

However, there are several other Arduino microcontrollers that are supported. For example the Arduino Nano RP2040, Arduino Nano 33 BLE (nRF), the Arduino MKR ones as well as the STM32duino (STM32F103, the one in the hugely popular $2 blue-pill boards) are all based on the ARM cortex-m architecture, which is supported by both embassy as well as rtic.

For espressif chips (like the esp32), support is being worked on by the manufacturer itself: https://github.com/embassy-rs/embassy/issues/745

Here an overview of microcontrollers in the (official) Arduino family: https://www.makeuseof.com/exploring-different-types-of-ardui...

Re:Introducing multitasking to Arduino on Wednesday August 03, 2022 @02:14AM (#32328219)
In Rust there is https://embassy.dev which is an async Rust framework for embedded. It has been shipping in products for years. Can be made real-time (for some definitions of it).

There is also RTIC https://rtic.rs which is a concurrency framework for real-time systems using interrupts. IIRC the car industry is interested in it.

Re:Introducing multitasking to Arduino on Wednesday August 03, 2022 @02:06AM (#32328171)
You can have a look at https://embassy.dev Rust+async on embedded
Here a whole bunch of example programs for hardware device drivers written in Rust for use in embedded.
Re:Ask HN: Share your personal site on Thursday April 07, 2022 @03:25AM (#30941665)
https://blog.eldruin.com I blog mostly about embedded Rust device drivers. It is a static blog made with Hexo and deployed to GitHub pages.
Re:This Year in Embedded Rust on Wednesday December 29, 2021 @10:44AM (#29725809)
Are you looking specifically at AVR? ARM works out-of-the-box with stable Rust.

I can really recommend getting a micro:bit board and following the discovery book [1].

There are a few other books in the embedded Rust bookshelf [2].

Otherwise, I wrote a bunch of sensor drivers and simple examples for several boards: [3]

[1]: https://docs.rust-embedded.org/discovery/index.html

[2]: https://docs.rust-embedded.org/

[3]: https://github.com/eldruin/driver-examples

Re:This Year in Embedded Rust on Wednesday December 29, 2021 @10:25AM (#29725630)
You may have started getting deprecation warnings because some methods in the `Error` trait have been deprecated [1] in favor of a different mechanism.

Then, you may have configured warnings to result in compilation errors in your build/project, however, I would argue this situation is not what most people would understand as "code not compiling due to a compiler update".

[1]: https://doc.rust-lang.org/std/error/trait.Error.html

Re:This Year in Embedded Rust on Wednesday December 29, 2021 @08:07AM (#29724455)
That's a way to avoid complicated coordinated upgrades across the ecosystem if certain conditions are met. It's called the "semver-trick" [1].

[1]: https://github.com/dtolnay/semver-trick

Re:This Year in Embedded Rust on Wednesday December 29, 2021 @08:03AM (#29724427)
This issue is on nightly Rust, not stable. A stable Rust compiler update should never break code.

See: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html

Re:This Year in Embedded Rust on Wednesday December 29, 2021 @07:59AM (#29724396)
It depends on your target architecture. For example, embedded development on ARM with stable Rust has been possible since 2018 (Rust 1.31)
Re:This Year in Embedded Rust on Wednesday December 29, 2021 @05:19AM (#29723512)
Espressif (the makers of the hugely popular ESP32/ESP8266/... microcontrollers) hired an embedded Rust community member to work full time on Rust support for their chips: https://mabez.dev/blog/posts/esp-rust-espressif/
Re:Show HN: CCS811 indoor air quality sensor driver in Rust on Thursday September 10, 2020 @02:45PM (#24435313)
My platform-agnostic CCS811 air quality sensor is now complete.
Re:Ask HN: What is your blog and why should I read it? on Tuesday April 07, 2020 @05:21AM (#22801643)
Mine is: https://blog.eldruin.com I write mostly about device drivers I write in Rust for use in embedded.