Matrix/API/deps/samples
2022-08-07 15:29:12 +02:00
..
graphics.py updated sample paths 2023-11-22 16:44:11 +01:00
grayscale-block.py updated sample paths 2023-11-22 16:44:11 +01:00
image-draw.py added examples 2023-11-22 15:45:55 +01:00
image-scroller.py updated sample paths 2023-11-22 16:44:11 +01:00
image-viewer.py added examples 2023-11-22 15:45:55 +01:00
menu.py updated sample paths 2023-11-22 16:44:11 +01:00
pulsing-brightness.py updated sample paths 2023-11-22 16:44:11 +01:00
pulsing-colors.py updated sample paths 2023-11-22 16:44:11 +01:00
README.md consistency 2022-08-07 15:29:12 +02:00
rotating-block-generator.py updated sample paths 2023-11-22 16:44:11 +01:00
runtext.py updated sample paths 2023-11-22 16:44:11 +01:00
simple-square.py updated sample paths 2023-11-22 16:44:11 +01:00

About

These are basic example scripts on the usage of the Matrix itself.

Usage

Unfortunately, there is no known way to run the provided scripts as is due to the projects directory structure. However, you can still run the scripts with a little bit of a workaround:

  1. Copy the directory deps/samples/ to some other, well known place

  2. Copy the file deps/samplebase.py into the samples copy you just created

  3. Find and replace all references to the common library samplebase.py:

    • The erroneous imports should look like this:

      from ..samplebase import SampleBase
      
    • And they should be replaced like this:

      from samplebase import SampleBase
      
  4. Run any given sample script with the following template:

    sudo python3 <script>.py
    
  • NOTE: You may need to specify all kinds of different flags or arguments to run the matrix correctly. For usage, please refer to any of the scripts, followed by the flag --help

Example Command

sudo python rotating-block-generator.py --led-rows=64 --led-cols=64 --led-slowdown-gpio=5 --led-parallel=3 --led-chain=3 --led-gpio-mapping=regular