A real-time cryptocurrency price display application for ESP32-based "Cheap Yellow Display" (CYD) boards from Sunton. Features a modern touchscreen interface built with LVGL to monitor your favorite cryptocurrencies with live price updates, trend indicators, and customizable display options.
- Advanced Candlestick Charts: Interactive OHLCV charts with real-time data from Binance API
- Dynamic Interval Selection: Touch-enabled interval selector with 14 timeframes (1m to 1M) and automatic refresh
- Technical Analysis: 7-period moving averages with smooth line rendering
- Interactive Price Inspection: Click-to-show-price with blue indicator line and precise price display
- Real-time Crypto Prices: Live price updates from Binance WebSocket API (no API key required)
- Multi-Currency Support: Display multiple cryptocurrencies simultaneously
- Touch Interface: Modern LVGL-based GUI with touch controls
- Visual Indicators: Color-coded price trends and status indicators
- Hardware Integration: RGB LED status indicators and automatic brightness adjustment
- WiFi Connectivity: Automatic connection management with retry logic
- Modern Web Interface: PicoCSS v2-styled configuration portal with responsive design
- Multi-Board Support: Compatible with 40+ different Sunton ESP32 display variants
- Memory Efficient: Optimized for ESP32's limited RAM with 25% usage (82KB/327KB)
ESP32-2432S028R (CYD) running the crypto ticker application
Note: Screenshot capture functionality is available in the
screenshotsbranch. See that branch's README for details.
This project should supports all Sunton ESP32 display boards, you can check the boards documentation.
- Primary Target: ESP32-2432S028R (CYD - Cheap Yellow Display)
- Display: 240x320 ILI9341 TFT with SPI interface
- Touch: XPT2046 resistive touchscreen controller
- Additional Hardware: RGB LED, CdS light sensor, speaker output, TF card slot
-
uv: Install uv for running PlatformIO commands
# Install uv (recommended) curl -LsSf https://astral.sh/uv/install.sh | sh # Or via pip pip install uv
-
No API Key Required: Uses free Binance WebSocket API for real-time cryptocurrency data
-
Clone the repository:
git clone https://github.com/your-username/cyd-crypto-ticker.git cd cyd-crypto-ticker -
Initialize submodules (for board definitions):
git submodule update --init --recursive
-
Configure the application:
The application provides a web-based configuration interface. After first boot, connect to the device's WiFi configuration portal to set up your WiFi credentials and select up to 6 Binance USDT trading pairs through an HTML interface.
-
Build and upload:
# Using Makefile (recommended) make upload-monitor # Or using uv directly uv tool run platformio run -t upload -t monitor # See all available commands make help
Use the included Python utility to discover available Binance trading pairs:
# Find specific trading pairs
python find_binance_symbols.py BTC ETH SOL
# List top 20 pairs by trading volume
python find_binance_symbols.py --list-top 20
# Search by cryptocurrency name
python find_binance_symbols.py --search bitcoin
# Show all USDT pairs
python find_binance_symbols.py --usdt-pairsThe utility will show available trading pairs that you can enter in the web configuration interface.
To use a different CYD board variant, modify the board setting in platformio.ini:
[env:esp32-cyd]
board = esp32-2432S028R ; Change this to your board modelAvailable board models are listed in the boards/ directory.
The default orientation is portrait (240x320). To change to landscape mode, modify the rotation settings in your display configuration.
The application provides a built-in web interface for configuration:
- First Boot: Device creates a WiFi access point for initial setup
- Configuration Portal: Access the HTML configuration interface
- Settings: Configure WiFi credentials and select up to 6 Binance USDT trading pairs
- Save & Restart: Settings are saved and the device connects to your WiFi network
The BOOT button provides several configuration options:
- Short Press (< 5 seconds): Cancel configuration mode and return to normal operation
- Medium Press (5-9 seconds): Enter configuration mode to change WiFi/crypto settings
- Long Press (10+ seconds): Factory reset - clear all stored data
βββ src/ # Main application source code
β βββ main.cpp # Application entry point
β βββ ApplicationController.cpp # Main app controller
β βββ BinanceDataManager.cpp # Cryptocurrency data handling
β βββ NetworkManager.cpp # WiFi and web config management
β βββ DisplayManager.cpp # LVGL UI management
β βββ HardwareController.cpp # Hardware control and sensors
βββ include/ # Header files
β βββ lv_conf.h # LVGL configuration
β βββ constants.h # Hardware constants, colors, and timing intervals
βββ picocss/ # PicoCSS v2 build system for web interface
β βββ scss/minimal.scss # Source SCSS with minimal PicoCSS build
β βββ package.json # Node.js build tools and dependencies
β βββ update-cpp.js # Automated CSS embedding script
βββ boards/ # Hardware board definitions (submodule)
βββ find_binance_symbols.py # Utility to find Binance trading pairs
βββ platformio.ini # Build configuration
- ApplicationController: Main application lifecycle management and WebSocket coordination
- BinanceDataManager: Real-time cryptocurrency data management and chart data fetching
- NetworkManager: WiFi connection, web configuration interface, and reconnection logic
- DisplayManager: LVGL-based user interface and chart rendering using constants from constants.h
- HardwareController: RGB LED status indicators and sensor management using hardware pin constants
- WebSocketManager: Real-time WebSocket connections to Binance API with automatic reconnection
- Hardware Constants: Pin definitions, colors, timing intervals, and system limits defined in
include/constants.h - User Configuration: WiFi credentials and cryptocurrency selections managed through web interface
- Settings Storage: User configurations stored in ESP32 flash memory via NetworkManager
- Unified Constants: All system limits (MAX_COINS, MAX_CANDLESTICKS) centralized in constants.h for consistency
See all available commands with make help. Common commands:
# Using Makefile
make build # Build firmware
make upload-monitor # Upload and monitor (most common)
make clean # Clean build files
make update-deps # Update dependencies
make all # Clean, build, upload, and monitor
# Using uv directly
uv tool run platformio run # Build
uv tool run platformio run -t upload -t monitor # Upload and monitor
uv tool run platformio run -t clean # Clean
uv tool run platformio lib update # Update dependenciesThe project is optimized for ESP32's limited memory:
- Size optimization enabled (
-Os) - Function/data sections (
-ffunction-sections,-fdata-sections) - Unused section removal (
-Wl,--gc-sections) - Disabled C++ exceptions and RTTI
- 32KB LVGL memory pool
- Reduced logging levels
Key LVGL settings in include/lv_conf.h:
- 16-bit RGB565 color depth
- 32KB heap allocation
- 33ms refresh rate (30 FPS)
- All major widgets enabled
- Performance monitoring available
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the existing code style and conventions
- Test your changes on actual hardware when possible
- Update documentation as needed
- Follow existing C++ conventions in the codebase
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and modular
- Use
constwhere appropriate
- Ensure your code builds without warnings
- Test on actual hardware if possible
- Update README.md if you add new features
- Commit with clear, descriptive messages
- Submit a pull request with detailed description
Please include:
- Hardware board model
- PlatformIO version
- Complete error messages
- Steps to reproduce
- Expected vs actual behavior
- Cryptocurrency pairs are automatically converted to uppercase in the web interface
- Access the configuration portal only when needed
- Monitor API usage to avoid rate limits
- Use HTTPS for all API communications
This project is licensed under the MIT License - see the LICENSE file for details.
- LVGL: MIT License
- esp32_smartdisplay: MIT License
- ArduinoJson: MIT License
- ESPAsyncWebServer: LGPL-3.0 License
- PicoCSS: MIT License
- Board Definitions: Various licenses (see
boards/directory)
- Sunton for the affordable ESP32 display boards
- LVGL for the excellent embedded graphics library
- rzeldent for the esp32_smartdisplay library
- Binance for the free WebSocket cryptocurrency API
- PicoCSS for the minimal, semantic CSS framework
- Claude Code for significant contributions to the code and documentation
- The ESP32 and Arduino communities for excellent documentation and support
- Documentation:
- Online API documentation: Check GitHub Pages (automatically generated from code)
- Development notes: See
CLAUDE.mdfor detailed development guidelines
- Issues: Report bugs and feature requests on GitHub Issues
- Discussions: Join the community discussions for help and ideas
- Hardware: Refer to
boards/README.mdfor board-specific information
Happy crypto tracking! ππ







