How nishad2m8/btc-ticker works
Project type and purpose
• This is an embedded IoT/UI application targeting the LilyGo T-Display-AMOLED ESP32 board (PlatformIO project). Its purpose is to fetch real-time Bitcoin data over Wi-Fi (via Binance WebSocket and NTP), render charts and text on an AMOLED display using the LVGL graphics library, and allow Wi-Fi provisioning via a QR code.
File structure
• Top-level:
• boards/: custom PlatformIO board definition.
• lib/: reusable libraries:
– LV_Helper: LVGL setup/wrappers and configuration.
– LilyGo_AMOLED: low-level display driver and board abstractions.
– RM67162_AMOLED_SPI: SPI driver for the RM67162 OLED panel.
– initSequence: display initialization sequences.
– ui/: LVGL-based UI components (screens, fonts, images, events).
• src/: application code:
– BinanceWebSocket.{cpp,h}: manages WebSocket connection to Binance.
– BinanceCandleStick.{cpp,h}: fetches candlestick data.
– WiFiProvHelper/Screen.{cpp,h}: Wi-Fi provisioning logic & UI.
– TimeHelper.{cpp,h}: NTP client and time zone logic.
– Config.h: user-configurable settings (e.g., time zone).
– main.cpp: setup() and loop(), glue code that initializes hardware, LVGL, Wi-Fi, data streams, and drives UI updates.
• platformio.ini: build configuration, board selection, library dependencies.
Extract insights from the README
• Graphics: LVGL library for UI.
• Connectivity: Wi-Fi setup via QR code (provisioning); real-time data via Binance WebSocket; NTP for clock.
• LilyGo AMOLED, driver RM67162 over SPI.
• Features: live Bitcoin price ticker, candlestick chart, date/time, Wi-Fi provisioning.
Final advice
• Be exhaustive: break out each library as its own block if it encapsulates significant functionality.
• Initialization sequence (boot → drivers → LVGL → provisioning/data streams).
• Event channels (e.g., callback lines) distinctly from synchronous calls.