Lesson plan

E-paper displays lesson plan

E-paper on the Uno with GxEPD2: how e-ink holds a picture with no power, full and partial refresh, two-color layouts, paged drawing, fonts and icons, sleeping between updates, and an ISS pass badge for the boss.

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

  • Particles that stay put, and the two kinds of refresh.
  • Black and white layouts, pages, fonts and icons.
  • Wake, draw, sleep, and the power budget.
  • A badge that says when to look up for the space station.

Materials for the whole unit

  • Arduino Uno R3
  • E-paper display, 2.9 inch
  • E-paper display, SSD1680 2.13 inch
  • Half breadboard
  • Pushbutton

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

How e-paper works

Particles that stay put, and the two kinds of refresh.

LessonTimeWhat students do
How e-ink holds an imageCharged particles in oil: a picture that needs power only to change. One full refresh with BUSY high for two seconds, then deep sleep and the picture stays.45 min
  1. Run it: a lunar base
  2. Particles in oil
  3. BUSY: wait for the particles
  4. Switch it off
  5. Draw it twice
  6. Where e-paper wins
Full and partial refreshA press counter: a partial refresh of one strip in a fraction of a second, the ghosts it leaves, and a full refresh every fifth update to clean them.45 min
  1. Run it: a press counter
  2. A partial refresh
  3. Ghosts
  4. The refresh count
  5. Clean more often
  6. Choosing a refresh

Materials

  • Arduino Uno R3
  • E-paper display, SSD1680 2.13 inch
  • Half breadboard
  • Pushbutton

Check for understanding

Each student finishes "Full and partial refresh" 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: "Choosing a refresh".

Chapter 2. About 2 h

Drawing for paper

Black and white layouts, pages, fonts and icons.

LessonTimeWhat students do
Two-color layoutA mission status card in pure black and white: an inverted title band, boxes, a progress bar and a dotted line, all placed from width() and height() so it survives a rotation.40 min
  1. Run it: a mission card
  2. Contrast does the work
  3. A bar from a number
  4. Turn it upright
  5. Design for distance
Pages: a picture bigger than RAMA 4000-byte picture on a board with 2048 bytes of RAM: GxEPD2 draws it in pages, the do/while loop runs once per page, and a bigger buffer means fewer passes.40 min
  1. Run it: a rocket in pages
  2. Bigger than the memory
  3. Why the code must draw everything
  4. A bigger buffer
  5. Pages everywhere
Fonts and iconsA weather card: GFX fonts that draw from a baseline, getTextBounds() to center a reading, and a sun and a cloud from 16x16 bitmaps.40 min
  1. Run it: a weather card
  2. Fonts sit on a baseline
  3. Measure, then center
  4. Weather on Mars
  5. Icons are bitmaps

Materials

  • Arduino Uno R3
  • E-paper display, SSD1680 2.13 inch
  • Half breadboard
  • Pushbutton

Check for understanding

Each student finishes "Fonts and icons" 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: "Icons are bitmaps".

Chapter 3. About 40 min

Living on a battery

Wake, draw, sleep, and the power budget.

LessonTimeWhat students do
Sleep between updatesA sensor display on a timer: wake, draw with a partial refresh, hibernate, and work out how long a battery lasts when the screen costs nothing between updates.40 min
  1. Run it: a sensor node
  2. Wake, draw, sleep
  3. The power budget
  4. Update less often
  5. The board sleeps too

Materials

  • Arduino Uno R3
  • E-paper display, SSD1680 2.13 inch
  • Half breadboard
  • Pushbutton

Check for understanding

Each student finishes "Sleep between updates" 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: "The board sleeps too".

Chapter 4. About 55 min

Boss project

A badge that says when to look up for the space station.

LessonTimeWhat students do
Boss: an ISS pass badgeA 2.9 inch badge that counts down to the next pass of the space station: a mission patch, partial updates every minute with a full one every sixth, a details page on a button, and sleep between.55 min
  1. Run it: the ISS pass badge
  2. A patch from shapes
  3. Minute by minute
  4. Pass details
  5. Clean every sixth
  6. Look up!
  7. Make it your badge

Materials

  • Arduino Uno R3
  • E-paper display, 2.9 inch
  • Half breadboard
  • Pushbutton

Check for understanding

Each student finishes "Boss: an ISS pass badge" 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 badge".

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.