shurik179 / pov-esp32

MIT License
1 stars 0 forks source link

General info

Arduino library for Persistence of Vision (POV) projects on ESP32-based MCUs. It supports reading image files in bitmap format and showing them, one line at a time, on a strip of addressable LEDs. DotStar (APA102) individually addressable LED strips; NeoPixels (WS2812B) are not supported.

Changes from earlier version

This is a fork of my own pov-library (https://github.com/shurik179/pov-library) with the following changes:

Image format

The library is capable of showing images at the root of LittleFS system on the MCU. It doesn't contain any tools for formatting the filesystem or uploading the images - that must be done seprately. Below are the image requirements.

You can create your own images or search for existing ones. A good source for POV image patterns is Visual POI Zone. You will need to rotate images 90 degrees.

Please note that the same color (i.e. the same RGB values) can look quite different on your computer monitor and on LED strip. Experiment with colors to get some feel for it.

Imagelist format

Library also supports reading the list of images to be shown from an image list file. This file must contain the list of image files in the order you want to use them in your show, one filename per line, including .bmp extension and leading slash. Optionally, you can also add how long the image should be shown, in seconds (whole numbers only!), separated from filename by one or more spaces

/image1.bmp 20
/image2.bmp 41
/image5.bmp 10
/image1.bmp

You can include some image file more than once, or not at all - it is your choice.

API

The library defines class POV which describes your POV device (LED strip, staff, poi,...). It provides the following methods:

Low-level pixel manipulation

Working with images and image lists

The POV object at all times maintains a list of images to be shown together with durations (in seconds). You can add images present on LittleFS filesystem to this list, move to next image, etc. It also keeps track of current line in the image currently shown. These operations do not change the image files present in the filesystem - they just modify the list of images to be shown.

Showing images