Skip to content

mtrudel/desk_clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desk Clock

A Nerves-powered, NTP-synchronized, SPI-connected, OLED-outputting desktop clock, running on a Raspberry Pi. It was built as a demo for a talk given at the July 2020 Toronto Elixir Meetup, but is also suitable for actual use.

Time is synchronized via NTP and display updates are adjusted to optimize the timeliness of the displayed time. In typical operation, the displayed time should be no more than ~5ms out of sync with the device's NTP dervied time.

It looks like this:

desk_clock

Building Hardware

Desk Clock runs on a Raspberry Pi and uses the following peripherals:

  • An SSD1322 display configured and connected as suggested in the SSD1322 library
  • A PEC11-style rotary encoder connected as per the docs. See here for an easy to use breakout board suitable to purpose.

Building the Application

Desk Clock is a standard nerves application, so it's best to consult their excellent docs for the most up-to-date guide.

Setting up Networking

Desk Clock uses VintageNet to configure networking. In the common case where you want to set up wifi, you'll want to ssh into the device and run a VintageNet.configure command as described in their README. Settings made in such a way will be persistent.

User Interface

The rotary encoder attached to Desk Clock performs the following tasks:

  • When rotated, it cycles the top time display through the available timezones
  • When rotated while depressed, it cycles the bottom time display through the available timezones
  • When tapped, it toggles the display on and off

About

A Nerves-powered, NTP-synchronized, SPI-connected, OLED-outputting desktop clock

Topics

Resources

License

Stars

Watchers

Forks