Saturday, April 28, 2018

Final Project Alpha

Connection to the Raspberry PI was successfully established using the WiFi dongle setup. I wanted to get set up without having to use Ethernet or external monitors, so I researched different ways to set it up remotely.

I eventually decided to burn the Raspberry Stretch OS onto the SD card and make the OS automatically connect to the WiFi upon booting up. I edited some configuration files in the OS so that it would automatically connect to my iPhone's hotspot using the WiFi dongle. Once booted, I was able to verify connection by seeing that the iPhone hotspot bar displayed 1 connection.

In order to connect to the RPI using ssh terminal, I had to determine the IP address that the RPI was using on the WiFi network. To do this, I connected to the hotspot with my laptop and used the "arp -a" command to view all other local IP addresses. I found the correct IP address and established an SSH connection from my terminal to the Raspberry PI. Immediately after logging in for the first time, I set up my private keys so that I wouldn't have to put in my password every time I connected to the Raspberry PI. I also updated all of the Linux packages so that the Raspberry PI would have the latest libraries and tools that I needed.

Connecting to the RPI eventually worked via SSH

In order to test the Raspberry PI, I made a simple python program that would turn an LED light on and off every few seconds. This test was a success, so I decided to wire up my LCD Matrix.


Before wiring up the LCD Matrix completely, I decided to test the matrix without wiring to see that it was lighting up and checked for any defects in the hardware. There were some pixels that were not as bright as the other ones, but I determined that there were no major defects that would prevent me from proceeding with the setup.

After wiring the LCD Matrix, I realized that it would be much better to configure and test the LCD Matrix with the Adafruit RGB Matrix HAT + RTC for Raspberry Pi. This ended up being a great purchase because it comes with the correct configuration needed to work with the Adafruit LCD Matrix library, which I needed to use to interface with the LCD Matrix. It also had connections to power the Raspberry PI, which allowed me to attach a 4 amp power cable into the HAT to power both the LCD Matrix and the Raspberry PI at the same time. This eliminated the need for multiple power connections. I did not end up using the Real Time Clock which came with the hat.

Setting up the Adafruit RGB Matrix HAT + RTC required soldering about 50 different connections on both sides of the HAT
Once the HAT was connected, I was able to test the LCD Matrix. I used text libraries to display text on the display. I soon realized that the pixel density of the display would only allow me to display the train times clearly, and other data sets would have to be left out otherwise they would add too much clutter to the screen.


Using sample static data, I was able to start adding text to the display. I worked to fine tune the display of the text by playing with different font sizes so that they would fit on the screen. I also edited the font file itself to reduce kerning between each letter, and the width of the space character, so that it would be possible to fit the train time on the horizontal dimension of the display. After figuring that out, I added the colors that I thought would add an aesthetic quality to the display.




No comments:

Post a Comment