2015-06-28 09:38:55 +00:00
|
|
|
Python bindings for RGB Matrix library
|
|
|
|
|
======================================
|
|
|
|
|
|
|
|
|
|
Building
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
In the root directory for the matrix library simply type
|
|
|
|
|
|
2016-03-30 16:33:41 +00:00
|
|
|
$ sudo apt-get install python2.7-dev
|
2015-06-28 09:38:55 +00:00
|
|
|
$ make build-python
|
|
|
|
|
$ make install-python
|
|
|
|
|
|
|
|
|
|
Using the library
|
|
|
|
|
-----------------
|
|
|
|
|
|
2016-03-30 16:33:41 +00:00
|
|
|
```python
|
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
from rgbmatrix import RGBMatrix
|
|
|
|
|
import time
|
2015-06-28 09:38:55 +00:00
|
|
|
|
2016-03-30 16:33:41 +00:00
|
|
|
rows = 16
|
|
|
|
|
chains = 1
|
|
|
|
|
parallel = 2
|
|
|
|
|
myMatrix = RGBMatrix(rows, chains, parallel)
|
|
|
|
|
myMatrix.Fill(255, 0, 0)
|
|
|
|
|
time.sleep(5)
|
|
|
|
|
myMatrix.Clear()
|
|
|
|
|
```
|