Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phalski/ledshim
A basic application framework for the Pimoroni LED SHIM
https://github.com/phalski/ledshim
pimoroni raspberry-pi
Last synced: 14 days ago
JSON representation
A basic application framework for the Pimoroni LED SHIM
- Host: GitHub
- URL: https://github.com/phalski/ledshim
- Owner: phalski
- License: mit
- Created: 2018-11-06T13:46:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-09T17:55:13.000Z (about 6 years ago)
- Last Synced: 2024-10-09T12:36:39.710Z (2 months ago)
- Topics: pimoroni, raspberry-pi
- Language: Python
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phalski-ledshim
A basic application framework for the Pimoroni LED SHIM.
Features:
* Easy animation development
* Flexible pixel segmenting
* Running multiple animations simultaneously
* Basic charting supported out of the box## Examples
Basic usage:
```python
from phalski_ledshim import app, animationapplication = app.App()
application.configure_worker(0.1, animation.Rainbow(application.pixels[0:13], 60))
application.configure_worker(0.2, animation.LedTest(application.pixels[13:27]))
application.exec()
```Running multiple sources in a single worker:
```python
from phalski_ledshim import app, animationapplication = app.App()
application.configure_worker(0.1, animation.Rainbow(application.pixels[0:13], 60), animation.LedTest(application.pixels[13:27]))
application.exec()
```Using charts (requires `psutil`):
```python
import psutilfrom phalski_ledshim import app, chart
application = app.App()
source = chart.Factory.bar_chart_source(application.pixels, lambda: psutil.cpu_percent())
application.configure_worker(0.1, source)
application.exec()```