Setup a live Bitcoin price ticker and clock / date display on a LilyGo T-display.
Combines the date, clock, and wifi functions of https://espgo.be/index-en.html with the Bitcoin price tracker of https://how2electronics.com/bitcoin-price-tracker-using-esp32-oled-display/
- This may work with similar LilyGo models, but I have only tested on the LilyGo T-display v1.1
- Bitcoin price is sourced from coindesk public API.
- Originally tried getting this repo by oxinon to work, but I had trouble getting wifi to connect and I did not want to use the coinmarketcap API.
- A LilyGogo T-display
- Arduino IDE
Setup steps are for Mac. Windows and Linux will be very similar but may be easier as I had some issues getting the LilyGo T-display drivers working at first.
-
Connect the LilyGo T-display via USB and install the LilyGo T-display drivers (For Mac or Windows from here: https://github.com/Xinyuan-LilyGO/TTGO-T-Display?tab=readme-ov-file
-
Install Arduino IDE: https://www.arduino.cc/en/software/
-
Add Arduino settings for the ESP32 boards "Preferences" > "Additional Boards Manager".
Paste in this url:https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- Add the required Arduino libraries in the Arduino Library Manager by going "Sketch" > "Include Library" > "Manage Library".
Libraries to add:
- ArduinoJson by Benoit Blanchon
- Preferences by Volodymr Shymanskyy
- TFT_eSPI by Bodmer
- WiFiManager by Tzapu
- Update the TFT_eSPI user settings by opening the Arduino library folder, located on mac at
[Username]/Documents/Arduino/Libraries/TFT_eSPI/User_Setup_Select.h
- Comment out the line 27
#include <User_Setup.h>
- Uncomment line 58
#include <User_Setups/Setup25_TTGO_T_Display.h>
(or whichever specific device it is you have).
- Download and open the repo and open the file
lilygo-t-display-btc-clock/lilygo-t-display-btc-clock.ino
to your Arduino folder at[Username]/Documents/Arduino/
- Change Line 25 to be your City name and Line 26 to your time zone
- Setup your board: "Tools" > "Board" > "ESP32" > "ESP32 Dev Module". The device should now show up as connected in the top left with a USB icon. If this does not work you might need to try changing the ports to one of the other options from the menu. For me it was '/dev/cu.wchusbserial56230381151`.
Set "Tools" > "Upload speed" to 115200. All other settings should be OK as defaults. If things are not showing up or working as expected try restarting the Arduino IDE or the computer or try a different USB port or cable.