AiTeky Original Interactive Learning & Practice Intermediate
Device clocks: drift, event order and the sensor log that went out of sequence
Work out how far a cheap clock wanders each day, see how two devices with slightly wrong clocks put events in the wrong order, and choose how often a fleet should resynchronise without draining its batteries.
Small devices keep time with a tiny crystal, and no crystal is perfect. A clock that is wrong by a few parts per million sounds harmless. Over weeks it drifts by seconds, and then a log that is sorted by device timestamp starts putting cause after effect.
This course models clock drift with small Python programs you can run in your browser. Python stands in for the device: the offsets and drift rates are made up, and the arithmetic is exact. Check your device's datasheet for its clock accuracy and your platform's time-synchronisation options. All numbers are made up.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
No embedded systems experience is assumed. Basic Python helps.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 20 min Free sample 🔒 AiTeky Pass How far a clock wanders Turn a clock accuracy in parts per million into seconds of error per day and per month, and compare a 20 ppm crystal with a 50 ppm one.
- 02 20 min 🔒 AiTeky Pass Events in the wrong order Put events from two devices with slightly wrong clocks into one log sorted by device timestamp, and count how many pairs end up in the wrong order.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

