Build a smartwatch lesson plan
Build a watch you could wear: a round display, an analog face in fixed-point trig, real time, steps, days of battery and a menu.
Objectives and materials
By the end, students can
- A round display, hands from a sine table, and a real-time clock.
- Count steps from the wrist, and make a small battery last.
- Menus from three buttons, then the whole watch.
Materials for the whole unit
- Accelerometer and gyroscope, MPU6050
- Arduino Uno R3
- Full-size breadboard
- Pushbutton x 3
- Real-time clock, DS3231
- Round display, GC9A01
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
A face that tells time
A round display, hands from a sine table, and a real-time clock.
| Lesson | Time | What students do |
|---|---|---|
| A round displayBring up a GC9A01 round display: a square of memory behind round glass, drawn around its center, with themes on a button. | 55 min |
|
| Watch facesDraw analog hands with fixed-point trig: a 16 entry sine table, positions on a 60 step dial, and hands rubbed out and redrawn each second. | 55 min |
|
| RTC timeKeep real time with a DS3231: BCD registers over I2C, a temperature compensated crystal, a coin cell, and a button that sets the minutes. | 70 min |
|
Materials
- Accelerometer and gyroscope, MPU6050
- Arduino Uno R3
- Full-size breadboard
- Pushbutton x 3
- Real-time clock, DS3231
- Round display, GC9A01
Check for understanding
Each student finishes "RTC time" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Midnight".
Steps and battery
Count steps from the wrist, and make a small battery last.
| Lesson | Time | What students do |
|---|---|---|
| Step countingCount steps from an MPU6050 on the wrist: take gravity away with a running average and run a peak detector on the magnitude of what is left. | 55 min |
|
| Battery lifeMake a battery last: a mAh budget, the backlight off, the display told to sleep, and the ATmega328P in power-down until MODE wakes it. | 55 min |
|
Materials
- Accelerometer and gyroscope, MPU6050
- Arduino Uno R3
- Full-size breadboard
- Pushbutton x 3
- Real-time clock, DS3231
- Round display, GC9A01
Check for understanding
Each student finishes "Battery life" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Wake on MODE".
Wear it
Menus from three buttons, then the whole watch.
| Lesson | Time | What students do |
|---|---|---|
| MenusTurn three buttons into a watch's screens with a state machine: MODE moves on, and each screen owns what UP and DOWN do. | 55 min |
|
| Project: a daily-wear watchThe whole watch: an analog face from the DS3231, a menu with a stopwatch, a step count, and a display that sleeps when nobody is looking. | 80 min |
|
Materials
- Accelerometer and gyroscope, MPU6050
- Arduino Uno R3
- Full-size breadboard
- Pushbutton x 3
- Real-time clock, DS3231
- Round display, GC9A01
Check for understanding
Each student finishes "Project: a daily-wear watch" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours".
Teach this unit as a class
Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.