Skip to content

pineman/LEDmatrix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEDmatrix

A 20 * 10 Pixel LED Matrix, using WS2811 LEDs, an Arduino Nano as driver and an Orange Pi Zero as control.

Run the server: python3 server/driver.py

Run the client: python3 -m client

The serial paths are hardcoded for now. So remember to boot the orange pi with the arduino plugged in, wait a minute and only then plug in the HES controller (it all Just Works™)

The server driver is expecting NUM_BYTES (600) bytes to be written to a TCP socket (port 53777) per frame. Each three bytes represent a LED, and each of those three bytes are the color in standard RGB order. The first LED is the upper left corner, going right, then down, like so:

[
[00 01 02 03 04 05 06 07 08 09],
[10 11 12 13 14 15 16 17 18 19]
...
]

For arduino:

[
[09 08 07 06 05 03 03 02 01 00],
[10 11 12 13 14 15 16 17 18 19]
...
]

Running the simulator

    • On Windows, get python 3 from here and mark the option to add python 3 to PATH, on the installer.
    • On GNU/Linux, run sudo apt install python3 python3-pip.
  1. For either system, after installing python run sudo pip3 install pygame.
  2. Run python3 simulator.py from the "server" folder.
  3. In another terminal run the client with python3 -m client -i shell. This connects your program to port 53777 and you are ready to go!

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.0%
  • C++ 2.0%