Lesson plan

Displays: characters, digits and dots lesson plan

Make the Uno show things: a 16x2 LCD on six wires and on an I2C backpack, seven-segment digits by hand, the TM1637, a MAX7219 dot matrix and the HT16K33, then an arcade scoreboard for two players with a high score.

4 chapters, 7 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Text on a 16x2 LCD, on six wires and then on two.
  • Seven segments by hand, then a chip that drives four.
  • A 64-dot matrix and an I2C digit display.
  • An arcade scoreboard for a two-player button mash duel.

Materials for the whole unit

  • Air quality sensor, SGP30
  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Character LCD, 16x2
  • Four-digit display, HT16K33 backpack
  • Four-digit display, TM1637
  • Full-size breadboard
  • Half breadboard
  • LED x 3
  • LED matrix, 8x8
  • Piezo speaker
  • Pushbutton x 3
  • Resistor x 3
  • Seven segment display
  • Temperature and humidity, SHT31
  • Temperature sensor, TMP36
  • Thermistor, 10k NTC

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 30 min

Characters

Text on a 16x2 LCD, on six wires and then on two.

LessonTimeWhat students do
Sixteen characters, two rowsA 16x2 character LCD on six wires: what RS and E do, four-bit mode, setCursor() counting from zero, a rocket you draw as eight bytes, and a live temperature.45 min
  1. Run it: mission control
  2. The LCD has a brain of its own
  3. Columns and rows count from zero
  4. A longer countdown
  5. Draw your own character
  6. Live data: the cabin temperature
Four wires: the I2C backpackThe same LCD on a PCF8574 backpack: an I2C bus scan, what an address is, a scrolling marquee from Mars, a walking alien, and what the two wires cost in speed.45 min
  1. Run it: who is on the bus?
  2. An address, and a chip that sets pins
  3. The wrong address
  4. Fix it in the sketch
  5. Two wires cost time
  6. A marquee and a walking alien

Materials

  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Character LCD, 16x2
  • Full-size breadboard
  • Half breadboard
  • Resistor
  • Temperature sensor, TMP36
  • Thermistor, 10k NTC

Check for understanding

Each student finishes "Four wires: the I2C backpack" 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: "A marquee and a walking alien".

Chapter 2. About 1 h 30 min

Digits

Seven segments by hand, then a chip that drives four.

LessonTimeWhat students do
Seven segments by handOne bare digit on seven pins: each segment is an LED, a digit is a byte, a font is an array of bytes, and one change makes it count in hex.45 min
  1. Run it: a segment test
  2. Each segment is an LED
  3. A digit is a byte
  4. Roll the die
  5. Count in hex
  6. Why four digits need a trick
Four digits on two wires: TM1637An escape room timer on a TM1637: a driver chip that scans the digits for you, MM:SS in one call with a blinking colon, brightness, and DONE spelled in raw segments.45 min
  1. Run it: an escape room timer
  2. A chip that does the scanning
  3. Start the clock
  4. Turn it up
  5. Spell DONE
  6. What the chip bought you

Materials

  • Arduino Uno R3
  • Four-digit display, TM1637
  • Full-size breadboard
  • LED x 3
  • Piezo speaker
  • Pushbutton x 3
  • Resistor x 3
  • Seven segment display

Check for understanding

Each student finishes "Four digits on two wires: TM1637" 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: "What the chip bought you".

Chapter 3. About 1 h 10 min

Dots and driver chips

A 64-dot matrix and an I2C digit display.

LessonTimeWhat students do
Sixty-four dots: the MAX7219 matrixAn 8x8 LED matrix on a MAX7219: a row is a byte written in binary, a picture is eight of them, and two pictures in turn make a space invader march.35 min
  1. Run it: an invader appears
  2. A row is a byte
  3. Two frames make it move
  4. Give it a bigger head
  5. Why the matrix does not melt
Digits on the bus: HT16K33An HT16K33 four-digit display on the I2C bus beside two sensor chips: three addresses on two wires, a temperature with a degree sign from raw segments, and a warning that blinks.35 min
  1. Run it: three chips, two wires
  2. Digits from the sensor
  3. Warm the room
  4. Set your own limit
  5. Choosing a display chip

Materials

  • Air quality sensor, SGP30
  • Arduino Uno R3
  • Four-digit display, HT16K33 backpack
  • Full-size breadboard
  • Half breadboard
  • LED
  • LED matrix, 8x8
  • Resistor
  • Temperature and humidity, SHT31

Check for understanding

Each student finishes "Digits on the bus: HT16K33" 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: "Choosing a display chip".

Chapter 4. About 50 min

Project

An arcade scoreboard for a two-player button mash duel.

LessonTimeWhat students do
Project: arcade scoreboardButton Mash Duel: two players, a start button, the live score on an HT16K33, the countdown and the winner on an I2C LCD, both on one bus, and a high score saved in EEPROM.50 min
  1. Run it: the arcade wakes up
  2. Two displays, one bus
  3. Ready, set, GO
  4. Mash!
  5. A winner and a high score
  6. Speed round
  7. Make it your arcade

Materials

  • Arduino Uno R3
  • Character LCD with I2C backpack
  • Four-digit display, HT16K33 backpack
  • Half breadboard
  • Pushbutton x 3

Check for understanding

Each student finishes "Project: arcade scoreboard" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it your arcade".

Your class

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.