Skip to content

Server-client system to draw images over the network on an Inkplate 10

License

Notifications You must be signed in to change notification settings

limolitz/haifoss

Repository files navigation

Haifoss

A project written to draw a specially compressed file from a network source on the Inkplate 10.

Overview

The project is split up into two main parts. The client, written in Micropython, running on the Inkplate, and a tool which runs on a server, written in Python, and compresses files into a special format and writes that to a text file. This file then needs to be delivered by any regular webserver.

Since drawing every pixel is incredibly slow, the image is read line by line and coverted into line drawing operations, which are way faster. On the device, we then loop through every row and draw all lines in this column. Note that empty lines carry meaning in this file format (that there is no black pixel in this line).

Installation

Clone the repo, and get the submodule:

git clone https://github.com/wasmitnetzen/haifoss.git
git submodule init
git submodule update

Make a venv and install the requirements:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Convert a file (default filename is tab1.bmp). It should be a file with the resolution of 825 x 1136 pixels (or smaller).

./convert.py

Configure a webserver (e.g. Nginx, Apache) to deliver it.

Adjust the config.json from the sample with your Wifi and webserver data.

Copy the needed files to the Inkplate

python3 ./Inkplate-micropython/pyboard.py --device /dev/ttyUSB0 -f cp config.json screen.py ./Inkplate-micropython/inkplate10.py :

Lauch the client on the Inkplate:

make run

or

python3 ./Inkplate-micropython/pyboard.py --device /dev/ttyUSB0 screen.py

If you are happy with the results, you can copy the boot.py file to the Inkplate, which will start the script on boot.

python3 ./Inkplate-micropython/pyboard.py --device /dev/ttyUSB0 -f cp boot.py :

or

make copy

Troubleshooting

Reset flash

esptool.py -p /dev/ttyUSB0 erase_flash

Install new firmware

esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32spiram-20210902-v1.17.bin

Resources

About

Server-client system to draw images over the network on an Inkplate 10

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published