Skip to content

billtubbs/display1593

Repository files navigation

display1593

Python code for Raspberry Pi controlling irregular LED display (with 1593 LEDs).

Irregular LED Display showing a rendering of Mona Lisa painting.

Design

Display is 4x4 ft in size (1.2 x 1.2 metres) and has 1593 WS2811 RGB LEDs behind a translucent plastic screen. The LEDs are arranged according to a randomly generated pattern whereby adjacent LEDs are roughly 50 mm apart (on average) but are not arranged in a classical x-y (Cartesian) grid.

The LEDs are controlled by two Teensy 3.1 microcontrollers connected to a Raspberry Pi Zero by USB.

This repository contains the code installed on the Raspberry Pi. The code for the Teensy microcontrollers and other information on the project is available at https://github.com/billtubbs/led-display-project.

Display driver code

The main code for connecting to the display and setting LED intensities is in this module:

Here is a simple example showing how to connect to the display:

>>> import display1593 as display
>>> dis = display.Display1593()
>>> dis.connect()
Finding Teensies...
Trying to connect to Teensies...
Connection to /dev/ttyACM1 (Teensy1) successful.
Connection to /dev/ttyACM0 (Teensy2) successful.
>>> dis.show_image("images/monalisa.png")
>>> 

Data on the LED co-ordinates, nearest neighbours etc. is currently stored in this file:

Current list of display projects in this repository:

  • clock.py - displays a round (analog) clock face
  • cls.py - clears screen (turns off all LEDs).
  • coltest.py - displays a test-screen to calibrate RGB colour scales
  • digclock.py - displays a digital clock face
  • lightlevels.py - displays and logs light intensity levels using the built-in light sensor
  • shapes.py - displays random moving shapes of different colours
  • schelling.py - simulation of the Schelling segregation model
  • show_images.py - shows a series of recognisable images over time (e.g. Mona Lisa, David Bowie)
  • stars.py - simulates a changing starry sky at night

Current developments

I'm currently working on an emulator of the real LED display to aid in the development and testing of display algorithms and projects.

About

Python code for Raspberry Pi controlling irregular LED display (with 1593 LEDs).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published