Introduction: Magic Book Eye

About: Artist, maker, teacher.

I recently read a nice fantasy book*. It has an eye on the cover and other beautiful drawings by the author.

Something comes to mind with the new round OLED displays. Why should the eye be just a drawing?

The magical fantasy book should become reality! Let's go!


*Walter Moers - Die Insel der Tausend Leuchttürme / The island of a thousand lighthouses

Supplies

  • old hardcover book, as thick as possible
  • 1,28‘ round display (GC9a01)
  • ESP32 (Arduino Nano is too slow)
  • short wires
  • 5V power bank

Tools: Pen knife, ruler, drill, glue, hot glue

Basic knowledge of Arduino IDE is required.

Step 1: Microcontroler & Wiring

Soldering is normally not necessary if you use cables and have large enough book with plenty of internal space. If you use a small book, it would be necessary to spare the cables and connectors by soldering short wires.

Follow the wiring list for an ESP32-Wroom:

VCC - 5V or 3V

GND - GND

SCL - 18 (SCK)

SDA - 23 (MOSI)

DC - 17

CS - 16

RST - EN

Step 2: Software

The eye should look straight ahead most of the time and occasionally blink and look to the side as a surprise effect. To do this, we use the random function for the pauses and the direction of gaze.

The eye itself consists only of filled circles that change the center of the circle using the program. I deliberately used graphic elements rather than an eye image in order to retain the comic-like character.

You can experiment a little: Background in white, yellow or black, eye color in blue, yellow, orange, magenta, red or green.

The graphic speed of the display is not particularly fast. It is therefore necessary to make the eye blink and then immediately change the position of the iris. Smooth animation is not possible.


Download the sketch "Book-eye-1.ino"

Step 3: Upload


Connect the ESP32 via USB with your computer and activate Arduino IDE.


Install libraries:

Sketch --> Include Library --> Manage Library --> type "GC9a01" --> install Adafruit_GC9A01A

Sketch --> Include Library --> Manage Library --> type "GFX" --> install Adafruit_GFX Library


Setup:

Board : ESP32 Dev Module

set the port

--> upload the sketch

Step 4: Preparing the Book

My display has the diameter 3.7cm. A suitable hole is made in the middle of the book cover with a drill. If you don't have a suitable drill, you need to mark it out with a pair of compasses and cut it out cleanly with a penknife.

Then you define how much of the book you want to cut out. To do this, we open the first page and fix the book on both sides with wood strips and screw clamps. Now you can make cuts along the ruler and remove the paper in between. We do this until the space is large enough.

I use wood glue to fix the cut edges a little. It matches the color well, is slightly elastic and dries quickly.

Step 5: Bring It All Together

We fix the display in the hole with hot glue. A wooden strip can be helpful.

Drill a hole for the cable in a suitable place on the back of the book. Close the book, connect the power bank - done.

Books and Bookshelves Contest

This is an entry in the
Books and Bookshelves Contest