Desky 2025

- 3 mins read

Building a Bitcoin Price Tracker with ESP32-S3 and AMOLED Display

Introduction

In this project, I built a Bitcoin price tracker that shows real-time price data on a small AMOLED screen. It fetches Bitcoin price data from the CoinDesk API and displays it as an easy-to-read graph, along with high/low values and percentage change.

Hardware

I based this project on the LILYGO T-Display-S3 AMOLED development board, which includes:

  • ESP32-S3 microcontroller with WiFi and Bluetooth 5.0
  • 1.9-inch AMOLED display with RM67162 controller
  • Two programmable buttons
  • Compact form factor perfect for desktop displays

LILYGO T-Display-S3 AMOLED

Features

Here are the main features I wanted in this tracker:

  1. Real-time Price Updates: Fetches the latest Bitcoin price data every 5 minutes
  2. Interactive Time Intervals: Switch between 30-minute, 30-hour, and 30-day views using the buttons
  3. Visual Price Graph: Displays price trends with auto-scaling for optimal visualization
  4. Key Price Information: Shows high, low, and current prices
  5. Percentage Change: Displays price movement with color coding (green for positive, red for negative)
  6. Clean User Interface: Well-organized layout with clear labeling

How It Works

The project is split into a few key parts:

1. Hardware Setup

The LILYGO T-Display-S3 AMOLED board gives me everything I need in one package. The ESP32-S3 handles WiFi and data processing, and the AMOLED display makes the output look sharp and vibrant.

2. Software Architecture

I structured the code to:

  • Initialize the display and WiFi connection
  • Fetch Bitcoin price data from the CoinDesk API
  • Process and store the historical price data
  • Draw the graph and price information on the display
  • Handle button inputs for switching between time intervals

3. Data Visualization

I draw the graph using the TFT_eSPI library, which is efficient and works well with the AMOLED display. The price data is auto-scaled so the graph stays useful even when the market moves a lot.

4. User Interaction

I use the two onboard buttons for interaction:

  • Button 1: Cycles through different time intervals (30m → 30h → 30d)
  • Button 2: Manually refreshes the data

Technical Challenges and Solutions

While building it, I ran into a few challenges and solved them:

  1. Display Initialization: The AMOLED display required specific initialization parameters to work correctly
  2. Memory Management: ESP32 has limited RAM, so we optimized data structures and drawing routines
  3. Screen Refresh: We implemented proper sprite clearing to prevent artifacts and ensure smooth updates
  4. API Rate Limiting: Added error handling for API requests to manage potential rate limits
  5. Button Debouncing: Implemented proper debounce logic to ensure reliable button inputs

Code Structure

I kept the code modular, with separate functions for:

  • Display initialization and management
  • Data fetching and parsing
  • Graph drawing and visualization
  • Button handling and user interaction

I also used a template-based approach for environment variables so sensitive values like API keys stay out of source code.

Future Enhancements

There are a few obvious ways I could expand this:

  1. Additional Cryptocurrencies: Add support for tracking multiple cryptocurrencies
  2. Custom Alerts: Implement price alerts for significant movements
  3. More Time Intervals: Add additional time ranges like 7-day or 1-month views
  4. Weather Integration: Combine with weather data for a multi-purpose display
  5. Cloud Integration: Store historical data in the cloud for longer-term analysis

Conclusion

This project is a good example of what I can do with an ESP32-S3 and a small AMOLED display. By combining hardware and software in a simple way, I ended up with a compact desktop tool that gives me real-time Bitcoin market data at a glance.

It also shows how practical and useful modern microcontroller projects can be when they are connected to live internet data.

Resources