Making a LED matrix took me way longer than expected. Things I might consider next time: mind the diameter of the wiring or they’ll burn and the 2gb sd-card lying around might not be big enough..
Background
One of my long standing idea 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.
[image VL53L0X/20180528_193737.gif “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, as 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 the 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 ).
3D printed parts
I modified an scad frame as described on thingiverse.
Programming
To code something without knowing the language (python in this case) took quite some time and still is quite unfinished although working: Check out the code if interested.