aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2021-06-26-simple-world-clock.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-05-26 00:40:40 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-05-26 00:40:40 +0200
commit43b0708769eb61392050045b881f8e6ba39c5b66 (patch)
tree3939579a13b8325325d5ebb8e05324a41ed78a6d /content/posts/2021-06-26-simple-world-clock.md
parent49e7e7d555a6cd9810d81561fa3e98e3d64502be (diff)
downloadmitjafelicijan.com-43b0708769eb61392050045b881f8e6ba39c5b66.tar.gz
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.
Diffstat (limited to 'content/posts/2021-06-26-simple-world-clock.md')
-rw-r--r--content/posts/2021-06-26-simple-world-clock.md34
1 files changed, 25 insertions, 9 deletions
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 @@
1--- 1---
2title: Simple world clock with eInk display and Raspberry Pi Zero 2title: Simple world clock with eInk display and Raspberry Pi Zero
3url: simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html 3url: simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html
4date: 2021-06-26 4date: 2021-06-26T12:00:00+02:00
5draft: false 5draft: false
6--- 6---
7 7
8Our team is spread across the world, from the USA all the way to Australia, so having some sort of world clock makes sense. 8Our team is spread across the world, from the USA all the way to Australia,
9so having some sort of world clock makes sense.
9 10
10Currently, 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. 11Currently, I am using an extension for Gnome called
12[Timezone extension](https://extensions.gnome.org/extension/2657/timezones-extension/),
13and it serves the purpose quite well.
11 14
12But 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. 15But I also have a bunch of electronics that I bought through the time, and I
16am not using any of them, and it's time to stop hording this stuff and use it
17in a project.
13 18
14A 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. 19A while ago I bought a small eInk display
20[Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811)
21and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/)
22lying around that I really need to use.
15 23
16![Inky pHAT, Raspberry Pi Zero](/assets/world-clock/hardware.jpg) 24![Inky pHAT, Raspberry Pi Zero](/assets/world-clock/hardware.jpg)
17 25
18Since 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/). 26Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811)
27is essentially a HAT, it can easily be added on top of the
28[Raspberry Pi Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/).
19 29
20First, I installed the necessary software on Raspberry Pi with `pip3 install inky`. 30First, I installed the necessary software on Raspberry Pi with `pip3 install inky`.
21 31
@@ -66,7 +76,8 @@ board.set_image(img)
66board.show() 76board.show()
67``` 77```
68 78
69And because eInk displays are rather slow to refresh and the clock requires refreshing only once a minute, this can be done through cronjob. 79And because eInk displays are rather slow to refresh and the clock requires
80refreshing only once a minute, this can be done through cronjob.
70 81
71Before we add this job to cron we need to make `clock.py` executable with `chmod +x clock.py`. 82Before we add this job to cron we need to make `clock.py` executable with `chmod +x clock.py`.
72 83
@@ -80,8 +91,13 @@ So, we end up with a result like this.
80 91
81![World Clock](/assets/world-clock/world-clock.jpg) 92![World Clock](/assets/world-clock/world-clock.jpg)
82 93
83And for the enclosure that can be 3D printed, but I haven't yet something like this can be used. 94And for the enclosure that can be 3D printed, but I haven't yet something like
95this can be used.
84 96
85<iframe id="vs_iframe" src="https://www.viewstl.com/?embedded&url=https%3A%2F%2Fmitjafelicijan.com%2Fassets%2Fworld-clock%2Fenclosure.stl&color=gray&bgcolor=white&edges=no&orientation=front&noborder=no" style="border:0;margin:0;width:100%;height:400px;"></iframe> 97<iframe id="vs_iframe" src="https://www.viewstl.com/?embedded&url=https%3A%2F%2Fmitjafelicijan.com%2Fassets%2Fworld-clock%2Fenclosure.stl&color=gray&bgcolor=white&edges=no&orientation=front&noborder=no" style="border:0;margin:0;width:100%;height:400px;"></iframe>
86 98
87You 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. 99You can download my [STL file for the enclosure here](/assets/world-clock/enclosure.stl),
100but make sure that dimensions make sense and also opening for USB port should
101be added or just use a drill and some hot glue to make it stick in the
102enclosure.
103