During difficult and uncertain times, messages of hope, strength, and encouragement can have a meaningful impact. EssentialQuotes is a project designed to capture outpouring of community support from tweets and simple messages. Received messages are displayed on a chain of 64x32 RGB matrices.
If you want to show your support for our community send a tweet to @techahoynyc with #weheartrdgwd or visit https://techahoy.org/we-heart-rdgwd to message us through our website.
Prerequisites- Raspberry Pi with Internet access
- PSQL database
- Twitter App
This story assumes you have the aforementioned prerequisites and does not go into too much detail regarding their setup. Reply in the comments if a guide for those resources would be helpful.
Hardware InstructionsIt starts like many projects, with a Raspberry Pi (3 to be specific). The project uses four 64x32 RGB matrices chained together, to display the messages to community members.
We begin by fastening two matrices together using a 3D printed bracket and four M3x6mm screws.
Fasten the remaining two matrices together to form one long matrix!
Connect each of the ribbon cables. Pay attention to the notch on the ribbon cable - when correctly seated the red wire should be at the top (the RPi is at the bottom).
Now, connect the power cable. Pay attention to the VCCGNDmarkingsbelow the power cable sockets. The red wire connects to VCC and the black wire connects to GND.
Connect the loose end of the power cable to the terminal block on the Adafruit RGB Matrix Bonnet. Makesurethe cables are plugged all the way into the terminal block and tightly secured.
Plug the power supply into the Adafruit RGB Matrix Bonnet and login to the RPi,
Now that the hardware setup is complete it's time to shift to software.
Software InstructionsClone the essentialQuote repo withe the following command:
git clone --recursive https://github.com/techahoynyc/essentialQuotes
Create
the config.ini with the following format:
[twitter]
TW_NAME = <your twitter screen name>
TW_HASH = <your designed hash tag including hash symbol>
APP_KEY = <your twitter app API Key>
APP_SECRET = <your twitter app API Secret>
ACCESS_TOKEN = <your twitter app Access Token>
ACCESS_SECRET = <your twitter app Access Secret>
[sql]
HOST = <your PSQL DB hostname>
DB = <your PSQL DB name>
PORT = 5432 <or your custom PSQL DB port>
UN = <your PSQL DB username>
PW = <your PSQL DB user's password>
[general]
DEFAULT_MSG = <your default message or instructions>
Add showQuotes.py to /etc/rc.local so it will run on boot:
# run essentialQuotes
cd /home/pi/essentialQuotes && sudo python3 showQuotes.py &
Modify cron so getTweet.py runs every five minutes:
*/5 * * * * /usr/local/bin/python3 /home/pi/essentialQuotes/getTweet.py &
Reboot and make sure the code launched successfully.
If nothing appears on the matrices you can verify the code is running by using this command:
ps -aux | grep python
Hardware InstallationMount the sign in a window or inside on a wall - we chose a window.
Tell everyone about your sign and help spread positive messages to community members!
Helpful Resources- QRCode Generator - https://www.the-qrcode-generator.com/
- Twitter API Docs - https://developer.twitter.com/en/docs/basics/getting-started
Comments