From 43b0708769eb61392050045b881f8e6ba39c5b66 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 26 May 2023 00:40:40 +0200 Subject: Massive update to posts, archetypes Added a archetypes for creating notes and posts so it auto-populates fields. Fixed existing posts so they align with the rule of 80 columns now. --- content/posts/2021-06-26-simple-world-clock.md | 34 +++++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'content/posts/2021-06-26-simple-world-clock.md') diff --git a/content/posts/2021-06-26-simple-world-clock.md b/content/posts/2021-06-26-simple-world-clock.md index 80d1e32..f42af11 100644 --- a/content/posts/2021-06-26-simple-world-clock.md +++ b/content/posts/2021-06-26-simple-world-clock.md @@ -1,21 +1,31 @@ --- title: Simple world clock with eInk display and Raspberry Pi Zero url: simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html -date: 2021-06-26 +date: 2021-06-26T12:00:00+02:00 draft: false --- -Our team is spread across the world, from the USA all the way to Australia, so having some sort of world clock makes sense. +Our team is spread across the world, from the USA all the way to Australia, +so having some sort of world clock makes sense. -Currently, I am using an extension for Gnome called [Timezone extension](https://extensions.gnome.org/extension/2657/timezones-extension/), and it serves the purpose quite well. +Currently, I am using an extension for Gnome called +[Timezone extension](https://extensions.gnome.org/extension/2657/timezones-extension/), +and it serves the purpose quite well. -But I also have a bunch of electronics that I bought through the time, and I am not using any of them, and it's time to stop hording this stuff and use it in a project. +But I also have a bunch of electronics that I bought through the time, and I +am not using any of them, and it's time to stop hording this stuff and use it +in a project. -A while ago I bought a small eInk display [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) lying around that I really need to use. +A while ago I bought a small eInk display +[Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) +and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) +lying around that I really need to use. ![Inky pHAT, Raspberry Pi Zero](/assets/world-clock/hardware.jpg) -Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) is essentially a HAT, it can easily be added on top of the [Raspberry Pi Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/). +Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) +is essentially a HAT, it can easily be added on top of the +[Raspberry Pi Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/). First, I installed the necessary software on Raspberry Pi with `pip3 install inky`. @@ -66,7 +76,8 @@ board.set_image(img) board.show() ``` -And because eInk displays are rather slow to refresh and the clock requires refreshing only once a minute, this can be done through cronjob. +And because eInk displays are rather slow to refresh and the clock requires +refreshing only once a minute, this can be done through cronjob. Before we add this job to cron we need to make `clock.py` executable with `chmod +x clock.py`. @@ -80,8 +91,13 @@ So, we end up with a result like this. ![World Clock](/assets/world-clock/world-clock.jpg) -And for the enclosure that can be 3D printed, but I haven't yet something like this can be used. +And for the enclosure that can be 3D printed, but I haven't yet something like +this can be used. -You can download my [STL file for the enclosure here](/assets/world-clock/enclosure.stl), but make sure that dimensions make sense and also opening for USB port should be added or just use a drill and some hot glue to make it stick in the enclosure. +You can download my [STL file for the enclosure here](/assets/world-clock/enclosure.stl), +but make sure that dimensions make sense and also opening for USB port should +be added or just use a drill and some hot glue to make it stick in the +enclosure. + -- cgit v1.2.3