Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

An Arduino device that renders harmonographs to an e-ink display.

Notifications You must be signed in to change notification settings

adamkewley/eink-harmonograph

Repository files navigation

eink-harmonograph

device vid

better quality video

Arduino project for rendering a harmonograph image using an eink display.

Renders a random harmonograph image as frequently as possible, which is about once per minute with the settings in this repo.

Hardware

  • Arduino Uno

  • Waveshare 4.2 inch E-Ink Display Module (amazon)

  • ~8 jumper cables

Hardware Assembly

  • Wire the screen up to the Arduino according to standard manufacturer guide (see here)

  • Connect Arduino to computer

  • Build + deploy to the arduino (see below)

  • Put it in a nice case

  • Done: the device should flash harmonograph images to the screen

Software Build & Deploy

  • Install third_party/ as an Arduino library. I modified the demo code from here to fix some bugs I encountered (old version of Arduino etc.). The code in third_party/ includes those modifications

Arduino IDE

This was developed in the standard Arduino IDE (v1.8.8). Make sure the relevant library (above) is installed and it should (hopefully) just upload to your Arduino

Arduino CLI

This project includes Makefile goals for installing + setting up arduino-cli. To use those:

# install + setup arduino-cli
make setup-arduino-cli 

# compile harmonograph binaries
make compile

# deploy to typical arduino device path
make deploy

This can be customized with environment variables (see the Makefile):

ARDUINO_CLI="arduino-cli" ARDUINO_DEV=/dev/ttyACM2 make compile deploy

Simulating

Project includes an SDL2 implementation of the renderer. Requires libsdl2-dev to be installed.

make simulator-run

Note: The simulator isn't efficient: it's built with a rendering API that's similar to what the Waveshare eInk display needs (so that code can be shared between the Arduino and simulator).

Limitations

  • Algorithm is unoptimized: takes ~1 min of constant computation to render an image

  • Because of the above, cannot run the device on a battery (too much drain to run it for multiple days)

About

An Arduino device that renders harmonographs to an e-ink display.

Resources

Stars

Watchers

Forks

Packages

No packages published