2023-04-10 20:51:47 +00:00
|
|
|
# pixelfoo-viewer
|
|
|
|
|
2023-04-16 19:55:51 +00:00
|
|
|
[<img alt="codeberg" src="https://img.shields.io/badge/codeberg-poc/pixelfoo-viewer?style=for-the-badge&labelColor=555555&logo=codeberg" height="20">](https://github.com/starblue/lowdim)
|
|
|
|
[![Crate](https://img.shields.io/crates/v/pixelfoo-viewer.svg)](https://crates.io/crates/pixelfoo-viewer)
|
|
|
|
|
2023-04-10 20:51:47 +00:00
|
|
|
> A viewer for pixelfoo frame streams.
|
|
|
|
|
2023-04-16 19:18:55 +00:00
|
|
|
## Background
|
|
|
|
|
|
|
|
At Chaospott in Essen we have a large 80x40 array of Neopixel LEDs
|
2023-04-16 19:55:51 +00:00
|
|
|
in the ceiling of our main room.
|
2023-04-16 19:18:55 +00:00
|
|
|
A server can run various apps to generate animations on the LED array.
|
|
|
|
|
|
|
|
## Apps
|
|
|
|
|
|
|
|
Apps can be written in any programming language,
|
|
|
|
they are started as child processes.
|
|
|
|
They get the width and height as the first and second command line parameter,
|
|
|
|
plus currently one additional free-to-use third parameter.
|
|
|
|
|
|
|
|
Apps generate a stream of fixed format pixel data as their standard output.
|
|
|
|
A pixel is either three bytes for red, green and blue (RGB),
|
|
|
|
or four bytes with additionally white (RGBW).
|
|
|
|
The number of pixels specified by the width make up a row,
|
|
|
|
and the number of rows specified by the height make up a frame.
|
|
|
|
Frames are sent consecutively, without any additional delimiters.
|
|
|
|
|
|
|
|
The app controls the speed by the timing of the frame data it sends.
|
|
|
|
|
|
|
|
## Viewer
|
|
|
|
|
|
|
|
The viewer runs such apps locally and displays the animation in a window.
|
|
|
|
This helps with app development.
|
|
|
|
|
|
|
|
For example,
|
|
|
|
```
|
|
|
|
pixelfoo-viewer -w apps/backlight.py 80 40
|
|
|
|
```
|
|
|
|
runs the `backlight.py` app (assuming it exists) in RGBW mode
|
|
|
|
with an 80x40 matrix.
|
|
|
|
|
2023-04-10 20:51:47 +00:00
|
|
|
## License
|
|
|
|
|
|
|
|
Licensed under either of
|
|
|
|
|
|
|
|
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
at your option.
|
|
|
|
|
|
|
|
### Contribution
|
|
|
|
|
|
|
|
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
|
|
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
|
|
|
dual licensed as above, without any additional terms or conditions.
|