Displays prices of configured cryptocurrencys sourced from CoinGecko. Based on Spotipy Display.
- Displays configured cryptocurrency prices for configured coins
- Bottom (KEY4) button triggers price refresh
- Raspberry Pi 4
- Raspberry Pi OS Lite 64-bit
- Waveshare 2.7" e-Paper Display GPIO HAT
Get an API key for retrieving crypto prices.
- Create a CoinGecko account
- Create a Demo Account (use browser find to find the small button)
- Note down the API Key in the developer dashboard
Turn on SPI after attaching e-paper display to Pi via GPIO.
- Open Raspberry Pi config:
sudo raspi-config
- Choose Interfacing Options -> SPI -> Yes Enable SPI interface
- Save config changes
- Reboot Pi:
sudo reboot
- Create a
.env
file based on.env.example
with your CoinGecko API keyCOINGECKO_CSV_IDS
: comma-separated string of CoinGecko API IDs found on a coin's pageCOINGECKO_DEMO_API_KEY
: API key from CoinGecko developer dashboardREFRESH_INTERVAL_MINS
: time interval in minutes between automatically refreshing pricesPERCENT_TIME_COLUMN_[1|2|3]
: time window price percent change change per column- Supported values:
1h, 24h, 7d, 14d, 30d, 200d, 1y
- Supported values:
- Set up virtual environment:
python3 -m venv venv
- Activate virtualenv:
source venv/bin/activate
- Install dependencies:
pip3 install lgpio gpiozero numpy Pillow requests RPi.GPIO spidev
Before configuring spotipy-display
to run automatically, test it first.
- Activate virtualenv:
source venv/bin/activate
- Run:
python3 main.py
- After confirming that it works, quit with CTRL+C
- Add systemctl service:
sudo vim /etc/systemd/system/coin-display.service
[Unit] Description=Coin Display After=network.target [Service] ExecStart=/home/pi/coin-display/venv/bin/python3 /home/pi/coin-display/main.py WorkingDirectory=/home/pi/coin-display Restart=always User=pi Group=pi Environment=PATH=/home/pi/coin-display/venv/bin:/usr/bin:$PATH [Install] WantedBy=multi-user.target
- Reload systemctl:
sudo systemctl daemon-reload
- Enable
coin-display
:sudo systemctl enable coin-display.service
- Start
coin-display
:sudo systemctl start coin-display.service
- Monitor logs:
sudo journalctl -fu coin-display.service
- Reboot Pi to ensure everything works