We’ve seen a lot of weather displays over the years, and plenty of the more modern ones have been using some form of electronic paper. So what makes this particular build from [Harry Stern] different? The fact that the firmware running on the ESP32 microcontroller at its heart was developed in Rust.
The weather station itself is capable of operating for several months on its rechargeable NiMH battery bank. The Rust section of the project is in two parts, the first of which runs on a server which downloads the weather data and aggregates it into an image. The second part runs on the ESP32 using esp-idf which configures peripherals, turns on and connects to Wi-Fi, retrieves the image from the server, displays the image and then puts the display to sleep. By doing the heavy lifting on the server, the display should be able to run for longer than it would if everything was happening on the ESP32.
The project code is available from this GitHub page which should allow even Rust beginners to follow along, and the case file is also available for those with a 3D printer. [Harry] has a few upgrades planned for future releases as well, including a snap-fit case, a custom PCB, and improved voltage regulator for better battery life, and enhanced error handling for the weather API. And Rust isn’t the only interesting part of this project, either. As prices for e-paper displays continue to fall, more and more of them are found in projects like weather stations and even complete laptops which use these displays exclusively.
I don’t get why everything written in Rust has to shout about it. It’s just another language, no big deal.
well to be fair.. it is certainly unusual to run embedded rust on the ESP32.
It used to be. Now theres an officially supported SDK by espressif.
There’s the same mention when using pretty much any language other than c++ for embedded dev. You’d see “in Python” or “in Lua” or “in Typescript” or whatever if those languages were used instead.
How do you know if someone is a [insert phrase here h Vegan, Rust Developer, etc ]? Don’t worry, they’ll tell you.
I think it’s because it’s exciting to see it be applied. More developers want to see a bigger job market for it, so talking about it further proves to the market it’s ready for production and should be used for all possible (good) applications. Embedded rust is still a baby to some of the market so I’m personally excited to see what people do with it.
I know, he should used LateX and write it in dilDOS language.
The linked repo is not by the article author. See https://github.com/boustrophedon/eink-esp-weather-display instead
What id compare size of programs?
In embeded system memory is important
I don’t understand why this ridiculous programming language is so overrated. How does writing in Rust help us now? Why are people dying to use this language that looks so bad and has ridiculous syntax when there are already mature languages?
I guess it’s popular because of :
“Rust is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices, and easily integrate with other languages.
Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.” [https://www.rust-lang.org]
The syntax appears to be just as ridiculous as any other languages.
I wouldn’t have been so hyperbolic, but that’s more-or-less what I thought about rust before trying it. I was a C/++ (mostly C) firmware engineer for ~8 years before I tried rust. I’ve now been using it full time at work for a little over a year, and you’d have to threaten my life to get me to give up rust.
I love C, it was the first language I did anything useful in, I worked with it full time for nearly a decade, and it will never fully go away, and I don’t think it should go away completely. On the other hand, rust is a better language, the ecosystem is healthier, and the tooling is so much better that it’s not even a competition. None of that should be surprising, if tooling hadn’t gotten better since the dawn of C it would be a sad commentary about the software industry. The only thing rust currently lacks that is important for (some) embedded projects is a certified tool chain, though people are working on that.
I recommend you give it a try, for a couple solid weeks. Even if you don’t end up switching, the perspective is useful.
Got an ad about one just the other day: https://ferrous-systems.com/ferrocene/
The syntax is truly ugly, I cannot understand why anyone would like to type more to do the same things that C does.
That aside, I would’ve shifted regardless if the safety features were as great as the community always seems to claim but I am yet to see a single embedded program in rust which does not include unsafe code (which defeats the point of using it entirely).
I’ve wanted to do one of these things for tides for a while now, maybe this is the thing to inspire me to finally do it.
I’m hoping Rust is just another fad which will go away. I’ve yet to see an example of Rust offering something Ada cannot, while Ada is “human readable”. Perhaps too much misinformation about Ada blasted in the content forums? The compile time checks are awesome, and the runtime checks can be turned on or off. The compiler is based on gcc/llvm and produces executables as similar to having compiled C so can’t even complain about it producing poor code. Really at a loss TBH.
Rust will never ‘go away’. Just like Fortran, Ada, Pascal, C, C++, Java, Python, Perl, JavaScript, Etc., there will always be those people that think ‘a’ certain language is the best ‘ever’. Right now the new fad in software development is ‘Rust’. It may fade (or not), but regardless it will never ‘go away’. That is wishful thinking :) . I prefer C/C++, Python, and Assembly myself. I’ve written some apps in Rust for fun, but not ‘taken’ with the language to convert over to it. I certainly do NOT like how it tries to force ‘style’ on you.
You are 100% correct, it was just a hope. The fact that Adacore is offering Rust (I still do not understand the business case) might mean a few companies might adopt Rust too.
Hi, I’m the author of this project – as mentioned, the github address for this project is https://github.com/boustrophedon/eink-esp-weather-display.
Please add a Photo and maybe a 3 seconds GIF video. More self marketing please. The clean design looks great but not everybody reads the code to imagine whats behind it. And add a link to this article.
I really like the clean and minimalistic design of the display visualisation. The average hacker tent to use all typo, color….and bulk everthing up.