diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-05-26 00:40:40 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-05-26 00:40:40 +0200 |
| commit | 43b0708769eb61392050045b881f8e6ba39c5b66 (patch) | |
| tree | 3939579a13b8325325d5ebb8e05324a41ed78a6d /content/posts/2021-06-26-simple-world-clock.md | |
| parent | 49e7e7d555a6cd9810d81561fa3e98e3d64502be (diff) | |
| download | mitjafelicijan.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.md | 34 |
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 | --- |
| 2 | title: Simple world clock with eInk display and Raspberry Pi Zero | 2 | title: Simple world clock with eInk display and Raspberry Pi Zero |
| 3 | url: simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html | 3 | url: simple-world-clock-with-eiink-display-and-raspberry-pi-zero.html |
| 4 | date: 2021-06-26 | 4 | date: 2021-06-26T12:00:00+02:00 |
| 5 | draft: false | 5 | draft: false |
| 6 | --- | 6 | --- |
| 7 | 7 | ||
| 8 | Our team is spread across the world, from the USA all the way to Australia, so having some sort of world clock makes sense. | 8 | Our team is spread across the world, from the USA all the way to Australia, |
| 9 | so having some sort of world clock makes sense. | ||
| 9 | 10 | ||
| 10 | 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. | 11 | Currently, I am using an extension for Gnome called |
| 12 | [Timezone extension](https://extensions.gnome.org/extension/2657/timezones-extension/), | ||
| 13 | and it serves the purpose quite well. | ||
| 11 | 14 | ||
| 12 | 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. | 15 | But I also have a bunch of electronics that I bought through the time, and I |
| 16 | am not using any of them, and it's time to stop hording this stuff and use it | ||
| 17 | in a project. | ||
| 13 | 18 | ||
| 14 | 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. | 19 | A while ago I bought a small eInk display |
| 20 | [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) | ||
| 21 | and I have a bunch of [Raspberry Pi's Zero](https://www.raspberrypi.org/products/raspberry-pi-zero/) | ||
| 22 | lying around that I really need to use. | ||
| 15 | 23 | ||
| 16 |  | 24 |  |
| 17 | 25 | ||
| 18 | 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/). | 26 | Since the Inky [Inky pHAT](https://shop.pimoroni.com/products/inky-phat?variant=12549254217811) |
| 27 | is 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 | ||
| 20 | First, I installed the necessary software on Raspberry Pi with `pip3 install inky`. | 30 | First, I installed the necessary software on Raspberry Pi with `pip3 install inky`. |
| 21 | 31 | ||
| @@ -66,7 +76,8 @@ board.set_image(img) | |||
| 66 | board.show() | 76 | board.show() |
| 67 | ``` | 77 | ``` |
| 68 | 78 | ||
| 69 | And because eInk displays are rather slow to refresh and the clock requires refreshing only once a minute, this can be done through cronjob. | 79 | And because eInk displays are rather slow to refresh and the clock requires |
| 80 | refreshing only once a minute, this can be done through cronjob. | ||
| 70 | 81 | ||
| 71 | Before we add this job to cron we need to make `clock.py` executable with `chmod +x clock.py`. | 82 | Before 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 |  | 92 |  |
| 82 | 93 | ||
| 83 | And for the enclosure that can be 3D printed, but I haven't yet something like this can be used. | 94 | And for the enclosure that can be 3D printed, but I haven't yet something like |
| 95 | this 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 | ||
| 87 | 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. | 99 | You can download my [STL file for the enclosure here](/assets/world-clock/enclosure.stl), |
| 100 | but make sure that dimensions make sense and also opening for USB port should | ||
| 101 | be added or just use a drill and some hot glue to make it stick in the | ||
| 102 | enclosure. | ||
| 103 | |||
