11. Measuring Time

How exactly does a robot tell time—perhaps it looks at a clock like the rest of us? That sounds flip, but it’s actually true: It’s possible to have the Arduino look up an Internet “time server” and get the official time. More prosaically, you can also have the Arduino use its (not terribly accurate) internal timer to tell time, or use a dedicated real-time clock module (RTC) to keep track of hours and minutes. In this chapter, we explore a variety of ways in which an Arduino can keep track of time, and then you’ll tackle the project for this chapter, a motor-controlled “wind chime” that triggers on the hour. Figure 11.1 shows an example of an interactive Arduino-based clock.

FIGURE 11.1 Nootropic Designs’ Defusable Clock is ...

Get Arduino for Beginners: Essential Skills Every Maker Needs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.