This project uses a Raspberry Pi show NTP diciplned time on 6 7-Segment LED displays
- 6 SparkFun Large Digit Drivers
- 6 SparkFun 6.5" 7-Segment Displays
- 1 Raspberry Pi
- 1 SparkFun Logic Level Converter
- 5 VDC power supply capable of 3 A
- 12 VDC power supply capable of 2 A
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 deamon
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
Copy the ntpclock.sh file to an appropriate directory on you 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
and add the following line to the bottom
/usr/local/ntpclock/ntpclock.sh &