e-Paper display program
- Setup the apeiron WiFi network, and start your instance of Redis. Make sure you note the IP Address of the server.
- Log into the Raspberry Pi using the username and password. Navigate to the
e-Pendirectory. - Launch the program using
sudo ./e-Pen- You can specify a different hostname or IP address (default:
mothership.local) using the flag-h [hostname] - You can specify a different port (default
6379) using the flag-p [port] - You can skip the splashscreen with
-S(NOTE: this will not clear the screen on startup)
- You can specify a different hostname or IP address (default:
- Send commands through the Redis channel
projector/eink- To change images, send the command
{ "type": "command", "command": "change-image", "value": 0 } - There are also maintenece commands that can replace
change-image, and do not require a value parameter. These commands are:exit- Safely quits the applicationreboot- Reboots the Raspberry Pishutdown- Shuts down the Raspberry Pi
- To change images, send the command
The e-Paper Display will only display monochrome images provided in the BMP format. Click here for documentation on how to create these images.
To switch images, navigate to the e-Pen.c file. Around line 20, you will find something like this:
#define NUMBER_OF_IMAGES 5
const char *imgs[NUMBER_OF_IMAGES] = {
"./imgs/portrait1.bmp",
"./imgs/portrait2.bmp",
"./imgs/portrait3.bmp",
"./imgs/portrait4.bmp",
"./imgs/portrait5.bmp"};To add, remove, or swap out images, simply change the NUMBER_OF_IMAGES define, and modify the array below. On the Raspberry Pi, navigate to the e-Pen directory, and run the commands sudo make clean to prepare for a clean rebuild, and sudo make to compile the changed code.
- Setup the apeiron network, and plug in the ESP32
- Prepare your image by converting it to a C-array with something like image2cpp. I recommend using Atkinson or Floyd-Steinberg dithering.
- Once an IP Address is displayed on the e-Paper, send it the generated 48,000 byte character array as a raw data stream. You can do this in Node.js by using the
Buffer.from()andSocket.write()from thenetmodule. - To shutdown the ESP32, send a 48,000 byte array of pure white (
0xFF). This will trigger the ESP32 code to cleanup memory and disconnect.