Simulate neopixels in the terminal.
Project description
simpyx
Simulate RGB pixel control in a terminal.
Installation
Install with pip
pip install simpyx
Modules
pixels
: Create and show RGB pixel arrays.shows
: Collection of programs to show off the simpyx library.screen
: Manipulate a file (usually standard out) as a screen.
Usage
pixels.PixelDrawer
object is the primary interface for displaying an array of
pixels.
Can index and iterate as a normal python array. Intended to work (kinda) similarly to adafruit-circuitpython-neopixel.
with pixels.PixelDrawer(100) as pix_drawer:
for p in pix_drawer:
p.set_rgb(255, 0, 100)
pix_drawer[30] = pixels.Pixel(0, 0, 0)
pix_drawer.show()
Typical Python usage
import time
from simpyx import pixels
with pixels.PixelDrawer(100) as pix:
delta = 255 / len(pix)
while True:
for i, p in enumerate(pix):
p.set_rgb(100, 0, round((i + i) * delta)
pix.show()
time.sleep(0.05)
pix.fill(0, 0, 0)
pix.show()
License
Licensed under the MIT license. See LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simpyx-1.1.0.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file simpyx-1.1.0.tar.gz
.
File metadata
- Download URL: simpyx-1.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 730ab63208474c2eb07c1d30eeecb875cd7532555d08883b4c946667c414bfc8 |
|
MD5 | 093f3d8e3ec6cf22b12881b829c86a7e |
|
BLAKE2b-256 | ceb52cf9b6282e07bc9dfa0d01cdb8419ef628d644f1917acb46b2e92b0cf7e3 |
File details
Details for the file simpyx-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: simpyx-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f69605c782cf0bffc6d4cce8b8ea95d9ebe9c694f2ecbfb8c3852266c35a04c |
|
MD5 | 6dca14d6644436985d1a3a93c03b7781 |
|
BLAKE2b-256 | ff38110005dd85d5fea873380da81c645554a063f204ad2d1bee99a3486d6cff |