Image

7TIME TRAVEL

Okay, so we won’t actually build a time machine in this chapter, but you’ll measure time by making a binary clock and a clock that can speak. We’ll also conduct an experiment to test how well your micro:bit can keep time. All the experiments and projects in this chapter use MicroPython only.

EXPERIMENT 9: KEEPING TIME

Image

The aim of this experiment is to make a micro:bit clock that keeps good time. That means programming the micro:bit to tick at precisely one-second intervals.

One way to do this would be to use the sleep function, as ...

Get Micro:bit for Mad Scientists now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.