• Stars
    star
    305
  • Rank 136,879 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ePaper Cryptocurrency Ticker

YouTube Channel Views

Instagram

Cryptocurrency ePaper Ticker

(supports all coins/currencies/exchanges listed on CoinGecko)

An ePaper Cryptocurrency price ticker that runs as a Python script on a Raspberry Pi connected to a Waveshare 2.7 inch monochrome ePaper display. The script periodically (every 5 mins by default) takes data from CoinGecko and prints a summary to the ePaper. You can specify the exchange used for price info, as well as the currencies that your chosen coin's prices are in.

A few minutes work gives you a desk ornament that will tastefully and unobtrusively monitor a coin's journey moonward.

Action Shot

Getting started

Prerequisites

(These instructions assume that your Raspberry Pi is already connected to the Internet, happily running pip and has python3 installed)

If you are running the Pi headless, connect to your Raspberry Pi using ssh.

Connect to your ticker over ssh and update and install necessary packages

sudo apt-get update
sudo apt-get install -y python3-pip mc git libopenjp2-7
sudo apt-get install -y libatlas-base-dev python3-pil

Enable spi (0=on 1=off)

sudo raspi-config nonint do_spi 0

Now clone the required software (Waveshare libraries and this script)

cd ~
git clone https://github.com/waveshare/e-Paper
git clone https://github.com/veebch/btcticker.git

Move to the btcticker directory, copy the example config to config.yaml and move the required part of the waveshare directory to the btcticker directory

cd btcticker
cp config_example.yaml config.yaml
cp -r /home/pi/e-Paper/RaspberryPi_JetsonNano/python/lib/waveshare_epd .
rm -rf /home/pi/e-Paper

Install the required Python3 modules

python3 -m pip install -r requirements.txt

Add Autostart

cat <<EOF | sudo tee /etc/systemd/system/btcticker.service
[Unit]
Description=btcticker
After=network.target

[Service]
ExecStart=/usr/bin/python3 -u /home/pi/btcticker/btcticker.py
WorkingDirectory=/home/pi/btcticker/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target
EOF

Now, simply enable the service you just made and reboot

sudo systemctl enable btcticker.service
sudo systemctl start btcticker.service

sudo reboot

Control via buttons

This only applies if you are going to control configuration via the buttons on the board.

The ePaper is slow. There is a lag of a few seconds between button press and a change to the display.

Here's what each of the buttons do:

  • Button 1: Cycle through the cryptocurrencies listed in config.yaml
  • Button 2: Rotate Display -90 degrees
  • Button 3: Invert Display
  • Button 4: Cycle through the fiat currencies listed in config.yaml

Update frequency can be changed in the configuration file (default is 300 seconds).

Configuration via config file

The file config.yaml (the copy of config_example.yaml you made earlier) contains a number of options that can be tweaked:

display:
  cycle: true # Setting to true makes the ticker cycle through a list of coins
  cyclefiat: true # Setting to true makes fiat cycle too, so you can do multiple pairs
  inverted: false # true for black text on grey, false for grey text
  orientation: 90 # 90 for horizontal display, buttons on left
  trendingmode: false # Add trending coins to those being displayed
  showvolume: false # Show volume (in fiat currency)
  showrank: false # Show ranking (by volume)
  24h: true # true for 24h clock, false for 12h
  locale: en_US # For region specific changes to price formatting
ticker:
  currency: bitcoin,ethereum,cardano # symbols used on coingecko
  exchange: default # specific exchanges can be specified
  fiatcurrency: usd,btc,gbp # 'fiat' currency
  sparklinedays: 1 # Time period shown on sparkline graph
  updatefrequency: 300 # How often price is refreshed (seconds) (lower limit 60s)

Values

  • cycle: switch the display between the listed currencies if set to true, display only the first on the list if set to false
  • cyclefiat: cycle listed fiat currencies, display only the first on the list if set to false
  • inverted: Black text on grey background if false. Grey text on black background if true
  • orientation: Screen rotation in degrees , can take values 0,90,180,270
  • trendingmode: If true, it checks the 7 coins that coingecko lists as trending and also displays them (names are included in display)
  • showvolume, showrank: true to include in display, false to omit
  • currency: the coin(s) you would like to display (must be the coingecko id)
  • exchange: default means use coingecko price, it can also be set to a specific exchange name such as gdax (coinbase), binance or kraken (full list on coingecko api page)
  • fiatcurrency: if cyclefiat is set to True, it will also cycle, otherwise it will use only the first entry (and cycle with button presses)
  • sparklinedays: Number of days of historical data appearing on chart
  • updatefrequency: (in seconds), how often to refresh the display

Trending mode

When you activate trending mode (by setting to true in the config file, in addition to your coins, the ticker will cycle through 7 coins that are currently listing as trending on CoinGecko (see photo below).

Action Shot

Contributing

To contribute, please fork the repository and use a feature branch. Pull requests are welcome.

Links

Watch the video

  • Video of the unit working here
  • A fully assembled ticker or frames can be obtained at veeb.ch

Licencing

GNU GENERAL PUBLIC LICENSE Version 3.0

More Repositories

1

photon

A DIY incident light meter
Python
487
star
2

boostbox

Some notes on a cli terminal, upcycling an old super 8 film viewer
114
star
3

sploosh

A PID controller for a plant watererer connected to a soil moisture sensor
Python
90
star
4

heat-o-matic

Proportional Integral Derivative controller using pi pico
Python
85
star
5

clock

Running a vintage secondary clock, using DCF77 or WWVB and Raspberry Pi Pico. Also a version that does not use Radio and uses a Pico W.
Python
84
star
6

bbq

RETIRED. Superseded by https://github.com/llvllch/stonks
Python
67
star
7

hometime

A physical progress bar based on Google Calendar events
Python
44
star
8

thedailygrind

An open-source coffee grinder
Python
41
star
9

edify

A quote scraper (r/quotes on reddit) on a Pi Zero with a 2.7 inch epaper screen
Python
30
star
10

ir-see

Infrared photos and HD video using picamera2
Python
28
star
11

stonks

A script to scrape useful things off the internet and display them on HD epaper
Python
26
star
12

doomed

A Fear and Greed index visualiser for Bitcoin on a SSD1351 OLED Screen
Python
21
star
13

palomino

The code for a high definition ePaper display that shows what is currently playing on Volumio
Python
21
star
14

Bip39-Dice

Generate a Bitcoin Wallet Seed Phrase using dice (and a few lines of Python)
Python
20
star
15

teasmade

Python code for a controlling a relay connected to a Raspberry Pi, connected to a 1974 goblin Teasmade
Python
20
star
16

bullion

An epaper display for Precious Metals and Crypto
Python
13
star
17

peeperpam

Python
12
star
18

walkman

Pull the music files from Plex playlists on your server and sync to a portable music player
Python
8
star
19

fob

Python
8
star
20

hbty

A flickering LED candle that plays tunes. Extra birthday points guaranteed
Python
7
star
21

readwire

A script to copy your Highlights from an Amazon Kindle device
Python
6
star
22

twirly

DIY Remote control precision turntable using 3d printed gears
OpenSCAD
5
star
23

cassette

A rudimentary youtube subscription counter
Python
3
star
24

nodemode

How to get a RaspiBlitz to run price ticker code
2
star
25

button

Control network connected devices ( eg some KEFLS50 Wireless speakers) with a flic button
Python
2
star
26

veebch

Config files for my GitHub profile.
2
star
27

veebkeeb

A repository of 3x3 macro pad mappings for a variety of apps
C
1
star