125 lines
2.7 KiB
Markdown
125 lines
2.7 KiB
Markdown
# Bitcoin Dashboard for Elecrow 7-inch HMI Display
|
|
|
|
A real-time financial dashboard displaying cryptocurrency, precious metals, stocks, and market indices on the Elecrow 7.0-inch ESP32 HMI Display.
|
|
|
|
## Hardware
|
|
|
|
- **Display**: Elecrow 7.0-inch ESP32 HMI Display (Advance series)
|
|
- **Resolution**: 800x480 RGB parallel interface
|
|
- **Touch**: GT911 capacitive touch controller
|
|
- **MCU**: ESP32-S3 with N4R8 module (4MB Flash, 8MB PSRAM)
|
|
|
|
## Features
|
|
|
|
- Real-time price data from Yahoo Finance API
|
|
- Auto-refresh every 5 minutes
|
|
- Touch to manual refresh
|
|
- WiFi credentials stored in persistent memory
|
|
- Antialiased fonts (DejaVu family)
|
|
|
|
## Displayed Assets
|
|
|
|
| Column | Assets |
|
|
|--------|--------|
|
|
| Hard Money | Bitcoin (BTC/USD), Gold, Silver |
|
|
| Stocks | MSTR, STRC |
|
|
| Indices | NASDAQ, DOW, S&P 500 |
|
|
|
|
## Color Scheme
|
|
|
|
| Asset | Color | Hex |
|
|
|-------|-------|-----|
|
|
| Bitcoin | Orange | `#F7931A` |
|
|
| Gold | Gold | `#FFD700` |
|
|
| Silver | Silver | `#C0C0C0` |
|
|
| Stocks/Indices | Dollar Green | `#00A86B` |
|
|
| Status Bar | Bitcoin Orange | `#F7931A` |
|
|
|
|
## Software Stack
|
|
|
|
- **Framework**: Arduino (PlatformIO)
|
|
- **Display Library**: LovyanGFX v1.2.19
|
|
- **Fonts**: DejaVu (antialiased)
|
|
|
|
## Building
|
|
|
|
```bash
|
|
cd /home/chad/Documents/PlatformIO/Projects/bitcoin_dashboard
|
|
pio run -t upload
|
|
```
|
|
|
|
## PlatformIO Configuration
|
|
|
|
- **Platform**: espressif32@6.8.1
|
|
- **Board**: esp32-s3-devkitc-1
|
|
- **Partition**: huge_app.csv (3MB app, no OTA)
|
|
- **Flash Mode**: QIO @ 80MHz
|
|
- **PSRAM**: OPI (8MB)
|
|
|
|
## Data Source
|
|
|
|
Yahoo Finance API:
|
|
```
|
|
https://query1.finance.yahoo.com/v8/finance/chart/{SYMBOL}?interval=1d&range=1d
|
|
```
|
|
|
|
### Symbol Mapping
|
|
|
|
| Display | Yahoo Symbol |
|
|
|---------|--------------|
|
|
| Bitcoin | BTC-USD |
|
|
| Gold | GC=F |
|
|
| Silver | SI=F |
|
|
| MSTR | MSTR |
|
|
| STRC | STRC |
|
|
| NASDAQ | ^IXIC |
|
|
| DOW | ^DJI |
|
|
| S&P 500 | ^GSPC |
|
|
|
|
## Pin Configuration
|
|
|
|
### RGB Display Interface
|
|
|
|
| Signal | GPIO |
|
|
|--------|------|
|
|
| D0-D15 | 15, 7, 6, 5, 4, 9, 46, 3, 8, 16, 1, 14, 21, 47, 48, 45 |
|
|
| HSYNC | GPIO 39 |
|
|
| VSYNC | GPIO 40 |
|
|
| DE | GPIO 41 |
|
|
| PCLK | GPIO 0 |
|
|
| Backlight | GPIO 2 |
|
|
|
|
### Touch Controller (GT911)
|
|
|
|
| Signal | GPIO |
|
|
|--------|------|
|
|
| SDA | GPIO 19 |
|
|
| SCL | GPIO 20 |
|
|
| I2C Address | 0x14 |
|
|
|
|
## WiFi Setup
|
|
|
|
WiFi credentials are stored in ESP32 preferences (persistent storage):
|
|
|
|
```cpp
|
|
preferences.begin("wifi", true);
|
|
preferences.putString("ssid", "your_ssid");
|
|
preferences.putString("password", "your_password");
|
|
preferences.end();
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
bitcoin_dashboard/
|
|
├── src/
|
|
│ └── main.cpp # Main application
|
|
├── docs/
|
|
│ └── README.md # This file
|
|
├── platformio.ini # PlatformIO configuration
|
|
└── .gitignore
|
|
```
|
|
|
|
## License
|
|
|
|
MIT
|