Crypto ticker led to show current price of cryptocurrencies on matrix led. The main objective of this project is to reproduce this project selling on Etsy for almost 200$.
total : ~150$ (with shipping)
To connect the RGB Matrix to the Raspberry Pi, follow the instructions on the Adafruit website: https://learn.adafruit.com/adafruit-rgb-matrix-bonnet-for-raspberry-pi/driving-matrices
sudo dietpi-software
commandgit clone --recurse-submodules https://github.com/ronanren/CryptoTickerLed.git
deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main
sudo apt-get update && sudo apt-get install python2.7-dev python-pillow make build-essential -y
cd matrix
make build-python CC=gcc
sudo make install-python
Thanks to these Python bindings, I was able to create this project: https://github.com/hzeller/rpi-rgb-led-matrix/tree/master/bindings/python
To test the matrix led, you need to run:
cd project
sudo ./run.py --led-gpio-mapping=adafruit-hat --led-rows=32 --led-cols=64 --led-slowdown-gpio=4
Workflow of the script:
I use the CoinGecko API to get the current price of cryptocurrencies and the historical price to display the evolution of the price on the led matrix.
To test the web application and the json server api, you need to run:
cd project/app
bun install
bun run server.js & bun run start
In order to run the web application and the script for the led matrix, build the app and install serve:
npm run build
npm install -g serve
After, run crontab -e
and add this line:
@reboot sleep 20 && /root/CryptoTickerLed/project/run.sh
If you have a problem with the led matrix, you can check the logs:
/root/script.log
: file for output logs/root/script_error.log
: file for error logsdocker-compose up -d