This python script, tries to emulate the hardware of the ceiling pixel lamp, by creating a virtual serial port for the input and renders the output into a pygame window.
You can use it to test for example animations and games on your local machine, without the use of the actual hardware.
This experimetal branch adds a non blocking serial read, with the help of a thread.
- python (2.x / 3.x) (both working)
- python pygame library
- Glediator
- java
- java rxtx library for serial communication
git clone https://github.com/c3e/CeilingMatrixEmulator.git
cd CeilingMatrixEmulator
python MatrixEmulator.py
Warning! This script removes any existing /dev/ttyUSB99 and reinitializes it with the pseudo terminal of the emulator.
- Current settings for the (hopefully soon to be) finished ceiling pixel lamp @c3e lounge
- Size x: 80 pixels
- Size y: 40 pixels
- Space: 1 (only in use for the preview in Glediator)
- Output mode needs to be "Glediator_Protocol"
- As of now, the emulator only supports the pixel & board order "HL_TL"
- Color order: RGB
- Board size x & y: 8 (so you get the 10 by 5 panel grid)
- You can ignore the "Baud-Rate" value
- fix virtual serial port name, so you don't need a symlink
- thread for serial reading, to make it non-blocking
- add "real" pixel and board order of ceiling for @c3d lounge (pixel: SL_BL, board: HL_BL)
- Pixel spacing
- Panel spacing
- Pixel width & height
- Panel order inside grid
- Pixel order inside panel
- number of pixels
- HS_TL - horizontal snake, top left
- HS_TR - horizontal snake, top right
- HS_BL - horizontal snake, bottom left
- HS_BR - horizontal snake, bottom right
- HL_TL - horizontal line, top left
- HL_TR - horizontal line, top right
- HL_BL - horizontal line, bottom left
- HL_BR - horizontal line, bottom right
- VS_TL - vertical snake, top left
- VS_TR - vertical snake, top right
- VS_BL - vertical snake, bottom left
- VS_BR - vertical snake, bottom right
- VL_TL - vertical line, top left
- VL_TR - vertical line, top right
- VL_BL - vertical line, bottom left
- VL_BR - vertical line, bottom right