footsteps. Since my preference is in hardware and I
sometimes struggle with software, who you gonna call?
I won’t go into detail about the logic of the master
clock sketches. If you are new to programming, you would
be better served following the Arduino programming
articles published in this magazine, beginning back in the
January 2014 "Smiley’s Workshop" column by Joe Pardue.
Those more experienced at programming should be able
to figure out what happens as there are fairly good
comments in the code that Phil wrote. Visit Phil's github
repo at https://github.com/phord/master_clock for code
updates, to get the PC simulator version, to fork the
project, or to contribute enhancements of your own.
Generally, when the Arduino is powered up, it
initializes software variables, performs several tasks, then
settles into a loop. Provisions are made to control the
program from the keyboard via the serial monitor — if the
Arduino is plugged into the USB port and the serial
monitor is activated. This master clock will run completely
by itself if it has an Internet connection with a DHCP
server, is connected as in Schematic 3, and is powered on.
If you are using the serial monitor (referring to Photo 13),
the screen will show the minute:seconds displayed every
second, and will scroll up the page. You can uncheck
auto-line feed at the bottom of the screen if you want to
look at previously scrolled pages of the display.
At 58 minutes, zero seconds, the A line active event,
the NTP request, the programmed MAC address, the NTP
48 byte packet received, system clock correction, and the
line "off" event will be displayed. Then, a display of each
minute:second as the loop runs is shown. Typing on the
console will enter the commands as mentioned in the
console code. My cropped screenshot shows both the
UNO and Mega master clocks running at the same time.
January 2015 37
■ SCHEMATIC 3. Arduino-based master clock system: driver shield, power supply, and clock wiring.
Master Clock code written by
Phil Hord; Phil@phord.com.
Code not obtained from the
Web or other sources is granted
to public domain, December 25,
Arduino is a registered trademark
of ARDUINO, LLC, Cambridge,
IBM, I. T.R, are registered
trademarks of International
Business Machines, Armonk, NY
Page 16, I. T.R Service
Instructions No 230, April 1,
1938, re-printed with permission
IBM Corporate Archives
Somers, NY 10589