Lesson plan

Build a desk buddy robot lesson plan

Animated eyes on a round display that blink, feel, react to touch, tilt and light, ending with a robot that misses you.

3 chapters, 6 lessons, about 4 hours, on the ESP32-C3-DevKitM-1. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Two eyes on round glass, then blinks and glances that bring them to life.
  • Moods as a table of numbers, and a touch pad that changes them.
  • Tilt and light, then the whole robot together.

Materials for the whole unit

  • Accelerometer and gyroscope, MPU6050
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • Photoresistor sensor module
  • Piezo speaker
  • Round display, GC9A01
  • Touch sensor, TTP223

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.

Chapter 1. About 1 h 20 min

A face

Two eyes on round glass, then blinks and glances that bring them to life.

LessonTimeWhat students do
Two eyes on a round screenDraw two rounded eyes on a GC9A01 and slide them across the glass by repainting only the edges that move.40 min
  1. A round window
  2. The glass lights up
  3. Two rounded rectangles
  4. Move only what changed
Blink and glanceBlinks on an uneven beat and glances that ease into place, both on millis() timers so neither waits for the other.40 min
  1. Alive, not animated
  2. The first blink
  3. Easing
  4. Two timers, no waiting

Materials

  • Accelerometer and gyroscope, MPU6050
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • Photoresistor sensor module
  • Piezo speaker
  • Round display, GC9A01
  • Touch sensor, TTP223

Check for understanding

Each student finishes "Blink and glance" 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: "Two timers, no waiting".

Chapter 2. About 1 h 20 min

Feelings

Moods as a table of numbers, and a touch pad that changes them.

LessonTimeWhat students do
Moods are numbersHappy, sleepy, surprised, angry, lonely and dizzy as a handful of numbers each: lids, tilt, size and color, eased from one to the next.40 min
  1. A happy face
  2. Sleepy lids
  3. Cross
  4. Lonely
Touch and feelingsA TTP223 pad makes the robot beam, too many pokes make it cross, and being ignored makes it lonely.40 min
  1. A pad that feels a finger
  2. A stroke makes it happy
  3. Not so fast
  4. Do not forget me

Materials

  • Accelerometer and gyroscope, MPU6050
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • Photoresistor sensor module
  • Piezo speaker
  • Round display, GC9A01
  • Touch sensor, TTP223

Check for understanding

Each student finishes "Touch and feelings" 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: "Do not forget me".

Chapter 3. About 1 h 20 min

Senses

Tilt and light, then the whole robot together.

LessonTimeWhat students do
Tilt and lightAn MPU6050 tips the gaze and makes the robot dizzy when rocked; an LDR module sends it to sleep in the dark.40 min
  1. A sense of balance
  2. Look down the slope
  3. Lights down
  4. Asleep
Meet your desk buddyEverything together: blinking, glancing, moods, touch, a temper, dizzy spells, bedtime in the dark and loneliness when ignored.40 min
  1. Hello
  2. Pet it
  3. Rock it
  4. Leave it be

Materials

  • Accelerometer and gyroscope, MPU6050
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • Photoresistor sensor module
  • Piezo speaker
  • Round display, GC9A01
  • Touch sensor, TTP223

Check for understanding

Each student finishes "Meet your desk buddy" 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: "Leave it be".

Your class

Teach this unit as a class

Start a class from this course and its 6 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.