LED-matrix

Making a LED matrix may teach you a lot about programming, which took me way longer than expected. Mind the diameter of the wiring or they'll burn. The 2gb sd-card lying around is not enough.

Background

One of my long standing dream was to build a LED-Matrix, probably due to watching too much Knight Rider. With LED matrices being widely available and also inspired, again, by things I saw at the GPN18 I ordered a 64x64 LED display for a decoration of an upcoming event.

the first test

Objective

Raspberry pi zero controlled LED matrix with a distance sensor that turns it off when no one is around.

Getting things done

Raspberry pi zero

  • get headless raspbian lite and make bootable sd-card enable SSH (put an empty file named "ssh" on the sd card, like here
  • to enable the wifi. I use a linux based os to access the file: /etc/wpa_supplicant/wpa_supplicant.conf. In this file include: network={ssid="your_WIFI_Name" psk="the_password_of_wifi"}
  • put the sd-card in your raspberry and run
  • connect over ssh from your computer (wifi should work)
  • change password and enable I2C by sudo raspi-config
  • install the H. Zeller git, like described here: https://learn.adafruit.com/matrix-led-sand/code
  • install the latest java (for webserver): sudo apt-get install openjdk-9-jdk-headless (or 8 for a raspberry nano), jre is not enough for webserver. I ended up using the oracle version: sudo apt-get install oracle-java8-jdk (supposedly faster? )
  • I had problems with java and found a solution with this: You need to first remove ca-certificate-java found here: sudo apt-get purge ca-certificate-java sudo apt-get install -f
  • here I had to start all over since the old 2gb sd-card was full. The transfer did clearly not change the partition but at least I then knew how to backup (as for example described in detail here): diskutil list sudo dd bs=1m if=/dev/disk2 | gzip > ~/Desktop/rpi-image.gz

Distance measurement

I decided to use a time-of-flight distance sensor that uses a laser source like this one. I was actually able to visualize the laser point using a fullspectrum camera, which I thought was nice as a confirmation of the measuring angle (the left picture shows only a tiny source where intensity increases when moving the lens just parallel ).

From the side Right in front

3D printed parts

I modified an scad frame as described on thingiverse.

Programming

Not knowing python (or any other language) and trying to code something with that complexity was not going to be finished quick as I had to realise in hindsight as well. Check out the code if interested.