Coinbase bitcoin ticker using an ESP8266 and SSD1306 OLED
- Arduino esp8266 2.4.0-rc2
- ArduinoJson
- esp8266-oled-ssd1306
- brzo_i2c (for faster screen interfacing)
- timelib
It gets NTP time, uses coinbase's JSON API
by http GET'ing https://api.coinbase.com/v2/prices/BTC-USD/buy
, parsing the json and displaying the
latest USD price on the screen as well as a timestamp of the most recent successful query so that the user
knows the data is not stale.
If the parsing fails or the connection doesn't complete (and it happens more often than you'd think) it shows an error sign with accompanying error message, so that the wrong value doesn't mistakenly get used. It will then retry the next time and the error usually goes away.
Initially started on Arduino IDE but then moved to use platformio.