Welcome to iot-ledmatrix’s documentation!¶
The code consists of three parts:
- the python code used on the raspberry pi inside the matrix
- the android code making up the control app
- the arduino code required to talk to the leds
This documentation is mostly concerned with the python code used on the rpi, since at the moment the other code is only written by enra64.
Raspberry pi (host) code¶
The raspberry pi code is responsible for pushing the correct colors to the arduino, and also constitutes the bridge between the matrix, the internet and an optional android phone.
The android app included in client-android makes working with the matrix really easy. It supports some administration features, and it is the basis for interactive scripts.
Users can reboot the raspberry pi, shut it down or simply restart the host code. A log viewer is also implemented, so failures can be quickly debugged.
host script fragments¶
Programmers can write Fragments that display an arbitrary user interface to implement any required custom functionality. Two-Way communication with the matrix is available.
The arduino code is simple, but
NUM_LEDS_CURRENT must be set before uploading the code.
The arduino will partake in a simple handshake to confirm correct initialization.
After that, the arduino writes all received data into the led buffer.
Whenever enough bytes for a single frame have arrived, the leds will show the new data.