I saw a great project on Hackster.io about using a Raspberry Pi with an e-ink screen as a weather and news station. The Pi connects to the internet, retrieves the latest news and weather, and displays it on the e-ink screen.
I had a spare Raspberry Pi 3B+, so I thought this would be a nice little project to get some Python experience and add a unique display around the house. It turned out to be one of those projects that you might not have started if you knew a bit more beforehand! Anyway, I ordered the e-ink display from China and got to work. Initially, I thought this would be a standard display setup, where I'd just need to create a webpage or something similar to output to the screen, but that wasn't the case. These screens connect to the Pi via the SPI interface, and the Python script has to create an image using the Pillow library with all the data downloaded via API calls in JSON format, then render this data to the e-ink display.
I did some tests to see if I could get data from an API and send it to the display, and with the help of ChatGPT, got that working. But to have a nicely formatted screen with weather icons and other details took a bit more effort.
There are a couple of issues I'm still trying to work out (like adding historic temperature and pressure data displayed in graphs, severe weather alerts, and pollution data), but it's pretty much up and running. I just need a nice frame, and I think I'll switch the Pi to a Zero to save space and maybe get an external power supply to avoid visible cables.
The code is available on my GitLab page, and I'll also leave a link to the original post on Hackster.
Working codeAnother interesting project I saw was using a DHT11 temperature and humidity sensor with a Pi Pico. I already had the DHT11 sensor and a 16x2 LCD screen, which came bundled in an electronics kit I bought a while back, so I thought I'd give this one a go.
Picos are really cheap (£5 as of writing this), and it was another chance to get some Python experience (specifically MicroPython), so armed with my breadboard and a bunch of jumper wires, I got to work. The initial plan was to wire the LCD display directly to the Pico, but this needs approximately 16 jumper leads (a little overkill if you ask me). After some research, I found that you can buy an SPI interface for these screens, which cuts it down to just four leads.
The SPI interface needed to be soldered to the back of the LCD display, so I made a quick trip to B&Q to get a soldering iron, solder, and a mat to avoid burning the house down. This was the first time I'd soldered anything since school, but it was fairly straightforward, and a quick test with the multimeter showed all the joins were good.
Next was the coding. Again, I'm standing on the shoulders of other skilled hobbyists and utilizing their code, but I had to make some adjustments, as a few things weren't quite the same.
One feature I wanted to add was the ability to switch between Celsius and Fahrenheit on the display. I had a spare micro switch from the electronics kit, so I wired that up and added some extra code to enable this. It's not perfect since the code runs in a loop, you need to press the switch for a few seconds for the program to exit the loop and register the button press. The next plan is to update the code with an interrupt to eliminate this delay.
Another thing I want to add is its own power supply. I have three AA batteries in an enclosure and have wired them up, but I haven't managed to get it working yet.
I found this nice Dashboard that will run as a Docker container called Homepage. It can link into any APIs and grab some usefull info to display at a glance. It will also get Google Calendar and Openweather API details.
Homepage uses YAML for configuration, YAML stands for "YAML Ain't Markup Language.". Which is a human-readable data serialization format that's a superset of JSON. Great for config files, easy to read and write. Supports complex data types like lists and objects. Indentation matters. As I had already used Docker Compose I was a little familier with YAML and this set up was quiet easy.
This app links into and reads API data from my OPNSense firewall, PiHole and pretty much most of my Docker images I have running and is now my goto site and home page when I open the browser.