8000 GitHub - sstorholm/ntpclock: NTP clock using Raspberry Pi and 7-segment displays
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sstorholm/ntpclock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntpclock

This project uses a Raspberry Pi to show NTP disciplined time on 6 7-Segment LED displays

Bill of Materials

Setting up NTP

First, we need to set up NTP on the Raspberry Pi.

sudo apt-get install ntp

Then, if you want to, you can configure your own time servers in /etc/ntp.conf, but it will work just fine with the stock Debian NTP Pool servers.

sudo nano /etc/ntp.conf

After changing the NTP conf, you need to restart the NTP daemon.

sudo systemctl restart ntp

Or on older systems using init.d:

sudo /etc/init.d/ntpd restart

Make sure your clock is running correctly by running the date command.

date

Also, remember to set your timezone.

sudo dpkg-reconfigure tzdata

Copying the Repository

Setting the Python Code to Run at Startup

Crontab Method

Copy the 7seg_clock.py file to an appropriate directory on your Raspberry Pi. In my example, I've created a new folder under /usr/local/ named ntpclock

Edit /etc/crontab

sudo nano /etc/crontab

Add the following line to the bottom:

@reboot root python /usr/local/ntpclock/7seg_clock.py &

rc.local Method - Deprecated since Debian Bookworm

Copy the ntpclock.sh file to an appropriate directory on your Raspberry Pi, in my example, I've created a new folder under /usr/local/ named ntpclock

Edit /etc/rc.local

sudo nano /etc/rc.local

Add the following line to the bottom

/usr/local/ntpclock/ntpclock.sh &

Wiring Everything Up

Wiring Diagram

About

NTP clock using Raspberry Pi and 7-segment displays

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0