diff --git a/public/images/apps/crypto.png b/public/images/apps/crypto.png new file mode 100644 index 0000000..84c1e0e Binary files /dev/null and b/public/images/apps/crypto.png differ diff --git a/public/images/apps/stocks.png b/public/images/apps/stocks.png new file mode 100644 index 0000000..d639a2a Binary files /dev/null and b/public/images/apps/stocks.png differ diff --git a/public/images/apps/weather.png b/public/images/apps/weather.png new file mode 100644 index 0000000..8f05252 Binary files /dev/null and b/public/images/apps/weather.png differ diff --git a/public/images/apps/wifi.png b/public/images/apps/wifi.png new file mode 100644 index 0000000..99ad791 Binary files /dev/null and b/public/images/apps/wifi.png differ diff --git a/src/content/apps/crypto.mdx b/src/content/apps/crypto.mdx new file mode 100644 index 0000000..047d314 --- /dev/null +++ b/src/content/apps/crypto.mdx @@ -0,0 +1,102 @@ +--- +title: "Crypto Tracker" +description: "Real-time cryptocurrency price tracker. Displays Bitcoin, Ethereum, Dogecoin, and Ripple prices with live updates." +icon: "/images/apps/crypto.png" +category: "utility" +preloaded: false +customizable: true +fileLocation: "/apps/crypto" +--- + +# Crypto Tracker + +Track real-time cryptocurrency prices directly on your Badger 2350. Displays live prices for Bitcoin (BTC), Ethereum (ETH), Dogecoin (DOGE), and Ripple (XRP) with price changes and percentage movements. + +## Features + +- **Live Price Updates**: Real-time cryptocurrency prices from Yahoo Finance API +- **Four Major Cryptos**: Bitcoin, Ethereum, Dogecoin, and Ripple tracking +- **Price Change Indicators**: Green for gains, red for losses with percentage changes +- **Auto-Refresh**: Automatically updates prices every 60 seconds +- **Manual Refresh**: Press B button to refresh prices on demand +- **WiFi Integration**: Connects to WiFi using credentials from `/secrets.py` +- **Clean UI**: GitHub-themed dark interface with color-coded price movements + +## Tracked Cryptocurrencies + +- **Bitcoin (BTC-USD)**: The original cryptocurrency +- **Ethereum (ETH-USD)**: Smart contract platform +- **Dogecoin (DOGE-USD)**: The people's crypto +- **Ripple (XRP-USD)**: Digital payment protocol + +## Controls + +- **B Button**: Manually refresh cryptocurrency prices +- Auto-refresh occurs every 60 seconds when connected + +## Install + +1. Copy the `crypto/` folder to `/apps/crypto/` on the BADGER drive while in USB storage mode +2. Ensure `/secrets.py` is configured with WiFi credentials (see Configuration below) +3. Eject, reboot, and launch Crypto Tracker from the menu + +## File Layout + +``` +/apps/crypto/ + ├── __init__.py # Main app with API integration and price display + └── icon.png # App icon for the launcher +``` + +## Configuration + +Create or edit `/secrets.py` on your badge: + +```python +# WiFi credentials +WIFI_SSID = "YourNetworkName" +WIFI_PASSWORD = "YourPassword" + +# Your GitHub username (optional for this app) +GITHUB_USERNAME = "yourusername" +``` + +**Required Variables:** +- `WIFI_SSID`: Your WiFi network name +- `WIFI_PASSWORD`: Your WiFi password + +## How It Works + +1. **WiFi Connection**: Connects to WiFi using credentials from `/secrets.py` +2. **Price Fetching**: Queries Yahoo Finance API for each cryptocurrency +3. **Real-time Display**: Shows current price, daily change, and percentage movement +4. **Auto-refresh**: Updates every 60 seconds automatically +5. **Color Coding**: Green text for positive changes, red for negative, gray for no change + +## Technical Details + +- Uses Yahoo Finance public API (no API key required) +- Implements efficient memory management with garbage collection +- 60-second WiFi connection timeout +- Handles network errors gracefully with error messages +- Price formatting adapts based on crypto value (more decimals for sub-$1 coins) + +## Troubleshooting + +**"No WiFi Config" message:** +- Edit `/secrets.py` with your WiFi credentials +- Ensure WIFI_SSID and WIFI_PASSWORD are set correctly + +**"Connection Failed" message:** +- Verify WiFi credentials are correct +- Check that your network is 2.4GHz (Badger 2350 doesn't support 5GHz) +- Move closer to your WiFi router + +**Prices showing as $0.00:** +- Check internet connection +- API may be temporarily unavailable - wait and refresh +- Press B button to manually retry fetching + +## Source + +GitHub repository: [Add your repository URL here] diff --git a/src/content/apps/stocks.mdx b/src/content/apps/stocks.mdx new file mode 100644 index 0000000..80bf807 --- /dev/null +++ b/src/content/apps/stocks.mdx @@ -0,0 +1,125 @@ +--- +title: "Stock Tracker" +description: "Real-time stock market tracker. Monitor S&P 500, Microsoft, Figma, and Apple stock prices with live market data." +icon: "/images/apps/stocks.png" +category: "utility" +preloaded: false +customizable: true +fileLocation: "/apps/stocks" +--- + +# Stock Tracker + +Monitor real-time stock market prices on your Badger 2350. Track S&P 500 (VOO), Microsoft (MSFT), Figma (FIG), and Apple (AAPL) with live price updates and percentage changes. + +## Features + +- **Live Stock Prices**: Real-time market data from Yahoo Finance API +- **Major Tech Stocks**: Track MSFT, AAPL, and FIG alongside S&P 500 index +- **Price Movement**: Color-coded gains (green) and losses (red) with percentages +- **Auto-Refresh**: Automatically updates prices every 60 seconds +- **Manual Refresh**: Press B button to refresh prices on demand +- **WiFi Integration**: Connects using credentials from `/secrets.py` +- **Market-Ready UI**: Clean GitHub-themed interface with professional stock display + +## Tracked Stocks + +- **VOO**: Vanguard S&P 500 ETF (Market Index) +- **MSFT**: Microsoft Corporation +- **FIG**: Figma Inc. +- **AAPL**: Apple Inc. + +## Controls + +- **B Button**: Manually refresh stock prices +- Auto-refresh occurs every 60 seconds when connected + +## Install + +1. Copy the `stocks/` folder to `/apps/stocks/` on the BADGER drive while in USB storage mode +2. Ensure `/secrets.py` is configured with WiFi credentials (see Configuration below) +3. Eject, reboot, and launch Stock Tracker from the menu + +## File Layout + +``` +/apps/stocks/ + ├── __init__.py # Main app with market data integration + └── icon.png # App icon for the launcher +``` + +## Configuration + +Create or edit `/secrets.py` on your badge: + +```python +# WiFi credentials +WIFI_SSID = "YourNetworkName" +WIFI_PASSWORD = "YourPassword" + +# Your GitHub username (optional for this app) +GITHUB_USERNAME = "yourusername" +``` + +**Required Variables:** +- `WIFI_SSID`: Your WiFi network name +- `WIFI_PASSWORD`: Your WiFi password + +## How It Works + +1. **WiFi Connection**: Connects to WiFi using credentials from `/secrets.py` +2. **Market Data Fetching**: Queries Yahoo Finance API for each stock symbol +3. **Real-time Display**: Shows current price, daily change, and percentage movement +4. **Auto-refresh**: Updates every 60 seconds during market hours +5. **Color Coding**: Green for gains, red for losses, gray for unchanged + +## Technical Details + +- Uses Yahoo Finance public API (no API key required) +- Efficient memory management with garbage collection +- 60-second WiFi connection timeout +- Graceful error handling with clear status messages +- Price formatting with appropriate decimal places +- Displays after-hours prices when markets are closed + +## Market Hours Note + +Stock prices update in real-time during market hours (9:30 AM - 4:00 PM ET, Monday-Friday). Outside market hours, the app displays the most recent closing prices. + +## Troubleshooting + +**"No WiFi Config" message:** +- Edit `/secrets.py` with your WiFi credentials +- Ensure WIFI_SSID and WIFI_PASSWORD are set correctly + +**"Connection Failed" message:** +- Verify WiFi credentials are correct +- Check that your network is 2.4GHz (Badger 2350 doesn't support 5GHz) +- Move closer to your WiFi router + +**Prices showing as $0.00:** +- Check internet connection +- Stock symbol may be invalid or delisted +- API may be temporarily unavailable - press B to retry + +**Prices not updating:** +- Markets may be closed (weekends, holidays, after-hours) +- Press B button to manually refresh +- Check WiFi connection status + +## Customization + +Edit the `STOCKS` list in `__init__.py` to track different stocks: + +```python +STOCKS = [ + ("GOOGL", "Google"), + ("TSLA", "Tesla"), + ("NVDA", "NVIDIA"), + ("META", "Meta") +] +``` + +## Source + +GitHub repository: [Add your repository URL here] diff --git a/src/content/apps/weather.mdx b/src/content/apps/weather.mdx new file mode 100644 index 0000000..35b4bc9 --- /dev/null +++ b/src/content/apps/weather.mdx @@ -0,0 +1,143 @@ +--- +title: "Weather" +description: "Real-time weather information with auto-location detection. Displays temperature, humidity, wind speed, and current conditions." +icon: "/images/apps/weather.png" +category: "utility" +preloaded: false +customizable: true +fileLocation: "/apps/weather" +--- + +# Weather + +Get real-time weather information on your Badger 2350. Automatically detects your location and displays current temperature, humidity, wind speed, and weather conditions. + +## Features + +- **Auto-Location Detection**: Automatically detects your location from IP address +- **Current Weather**: Real-time temperature, humidity, and wind speed +- **Weather Conditions**: Clear descriptions of current weather (Clear, Cloudy, Rain, etc.) +- **No API Key Required**: Uses free Open-Meteo weather API +- **Auto-Refresh**: Updates weather data every 60 seconds +- **Manual Refresh**: Press B button to refresh weather on demand +- **WiFi Integration**: Connects using credentials from `/secrets.py` +- **Clean Display**: GitHub-themed interface with color-coded weather info + +## Weather Data + +- **Temperature**: Displayed in Fahrenheit +- **Humidity**: Relative humidity percentage +- **Wind Speed**: Current wind speed in mph +- **Conditions**: Weather description (Clear, Cloudy, Rain, Snow, etc.) +- **Location**: Auto-detected city name + +## Controls + +- **B Button**: Manually refresh weather data +- Auto-refresh occurs every 60 seconds when connected + +## Install + +1. Copy the `weather/` folder to `/apps/weather/` on the BADGER drive while in USB storage mode +2. Ensure `/secrets.py` is configured with WiFi credentials (see Configuration below) +3. Eject, reboot, and launch Weather from the menu + +## File Layout + +``` +/apps/weather/ + ├── __init__.py # Main app with weather API and location detection + └── icon.png # App icon for the launcher +``` + +## Configuration + +Create or edit `/secrets.py` on your badge: + +```python +# WiFi credentials +WIFI_SSID = "YourNetworkName" +WIFI_PASSWORD = "YourPassword" + +# Your GitHub username (optional for this app) +GITHUB_USERNAME = "yourusername" +``` + +**Required Variables:** +- `WIFI_SSID`: Your WiFi network name +- `WIFI_PASSWORD`: Your WiFi password + +## How It Works + +1. **WiFi Connection**: Connects to WiFi using credentials from `/secrets.py` +2. **Location Detection**: Automatically detects location from IP using ipapi.co +3. **Weather Fetching**: Queries Open-Meteo API with detected coordinates +4. **Real-time Display**: Shows temperature, humidity, wind, and conditions +5. **Auto-refresh**: Updates every 60 seconds automatically +6. **Fallback Location**: Defaults to San Francisco if detection fails + +## Technical Details + +- Uses Open-Meteo free weather API (no API key required) +- Location detection via ipapi.co (free IP geolocation) +- WMO (World Meteorological Organization) weather codes +- Temperature in Fahrenheit, wind speed in mph +- Efficient memory management with garbage collection +- 60-second WiFi connection timeout +- Graceful error handling with status messages + +## Weather Conditions + +The app interprets WMO weather codes to display clear conditions: +- **Clear**: Clear skies +- **Partly Cloudy**: Some cloud cover +- **Cloudy**: Overcast +- **Fog**: Foggy conditions +- **Drizzle/Rain**: Light or heavy rain +- **Snow**: Snow or freezing conditions +- **Thunderstorm**: Stormy weather + +## Location Detection + +The app automatically detects your location using your IP address. This means: +- ✅ No manual configuration needed +- ✅ Works anywhere with WiFi +- ✅ Updates if you travel to a new location +- ⚠️ May be less accurate than GPS (usually city-level accuracy) +- ⚠️ Falls back to San Francisco if detection fails + +## Troubleshooting + +**"No Configuration" message:** +- Edit `/secrets.py` with your WiFi credentials +- Ensure WIFI_SSID and WIFI_PASSWORD are set correctly + +**"Location detection failed":** +- App will default to San Francisco weather +- Check internet connection +- Press B button to retry + +**Weather data not displaying:** +- Check WiFi connection +- Verify internet connectivity +- API may be temporarily unavailable - wait and refresh + +**Wrong location detected:** +- Location is based on IP address (VPN may affect this) +- You can manually edit the code to set LATITUDE/LONGITUDE + +## Customization + +To use a specific location instead of auto-detection, edit `__init__.py`: + +```python +# Set your desired location +LATITUDE = 40.7128 # New York City +LONGITUDE = -74.0060 +LOCATION_NAME = "New York" +location_detected = True # Skip auto-detection +``` + +## Source + +GitHub repository: [Add your repository URL here] diff --git a/src/content/apps/wifi.mdx b/src/content/apps/wifi.mdx new file mode 100644 index 0000000..e456799 --- /dev/null +++ b/src/content/apps/wifi.mdx @@ -0,0 +1,155 @@ +--- +title: "WiFi Settings" +description: "View and manage WiFi connection settings. Displays network name, connection status, and credentials from secrets.py." +icon: "/images/apps/wifi.png" +category: "utility" +preloaded: false +customizable: false +fileLocation: "/apps/wifi" +--- + +# WiFi Settings + +A utility app for viewing and managing WiFi connection settings on your Badger 2350. Displays your network configuration, connection status, and provides real-time connection monitoring. + +## Features + +- **Settings Display**: View configured WiFi SSID and password (masked) +- **Connection Status**: Real-time WiFi connection status monitoring +- **GitHub Username**: Displays configured GitHub username +- **Password Masking**: Securely displays password with masking (first 2 and last 2 chars visible) +- **Auto-Connect**: Automatically attempts to connect to configured network +- **Retry Logic**: Smart retry with 15-second delays after failed attempts +- **Status Indicators**: Color-coded connection status (green=connected, red=failed) +- **Configuration Helper**: Guides you to edit settings via USB mode + +## Display Information + +- **Network**: Configured WiFi SSID (network name) +- **Password**: Masked password display (e.g., "ab******89") +- **GitHub User**: Configured GitHub username +- **Status**: Current connection state with color indicators + +## Connection States + +- **Connected** (Green): Successfully connected to WiFi +- **Connecting...** (Yellow/Phosphor): Connection attempt in progress +- **Connection failed** (Red): Connection attempt timed out +- **Retry in Xs** (Gray): Waiting before next connection attempt +- **Not Connected** (Gray): No connection attempt yet + +## Install + +1. Copy the `wifi/` folder to `/apps/wifi/` on the BADGER drive while in USB storage mode +2. Ensure `/secrets.py` is configured with WiFi credentials (see Configuration below) +3. Eject, reboot, and launch WiFi Settings from the menu + +## File Layout + +``` +/apps/wifi/ + ├── __init__.py # WiFi settings viewer and connection monitor + └── icon.png # App icon for the launcher +``` + +## Configuration + +Create or edit `/secrets.py` on your badge: + +```python +# WiFi credentials +WIFI_SSID = "YourNetworkName" +WIFI_PASSWORD = "YourPassword" + +# Your GitHub username +GITHUB_USERNAME = "yourusername" +``` + +**Required Variables:** +- `WIFI_SSID`: Your WiFi network name +- `WIFI_PASSWORD`: Your WiFi password +- `GITHUB_USERNAME`: Your GitHub username (optional) + +## How It Works + +1. **Settings Loading**: Reads WiFi credentials from `/secrets.py` +2. **Display**: Shows network name, masked password, and GitHub username +3. **Connection Monitoring**: Continuously checks WiFi connection status +4. **Auto-Connect**: Attempts to connect if not already connected +5. **Smart Retry**: Waits 15 seconds between failed connection attempts +6. **Status Updates**: Real-time color-coded status display + +## Technical Details + +- Password masking for security (shows first/last 2 chars only) +- 15-second timeout per connection attempt +- 15-second retry delay after failed attempts +- Text wrapping for long messages +- Centered text rendering for clean UI +- Color-coded status indicators +- SSID truncation for long network names (20 char max display) + +## Use Cases + +**Check Configuration:** +- Verify WiFi settings are loaded correctly +- Check GitHub username configuration +- See which network the badge is configured for + +**Monitor Connection:** +- Watch connection status in real-time +- Troubleshoot connection issues +- Verify successful connection before using WiFi apps + +**Configuration Guide:** +- Provides instructions if `/secrets.py` is missing +- Guides users to edit settings via USB disk mode + +## Security Note + +The WiFi Settings app masks your password for security: +- Passwords under 4 characters: fully masked (****) +- Longer passwords: shows first 2 and last 2 chars (ab****89) +- This prevents shoulder-surfing while confirming settings + +## Troubleshooting + +**"No Configuration" message:** +- `/secrets.py` file is missing from the badge +- Mount badge in USB mode +- Create `/secrets.py` with WiFi credentials + +**"Connection failed" status:** +- Verify WiFi password is correct +- Check that SSID matches your network name exactly +- Ensure network is 2.4GHz (Badger doesn't support 5GHz) +- Check WiFi router is powered on and in range + +**"Retry in Xs" displayed:** +- Previous connection attempt failed +- App is waiting before retrying automatically +- Wait for countdown or restart app to retry immediately + +**Long SSID cut off:** +- SSIDs longer than 20 characters are truncated with "..." +- This is display-only; full SSID is used for connection + +## Best Practices + +1. **Use USB Mode to Edit**: Always edit `/secrets.py` via USB disk mode +2. **Double-Check Credentials**: Verify SSID and password are exact +3. **Test After Changes**: Launch WiFi Settings app after editing secrets +4. **Monitor Connection**: Watch the status to confirm successful connection +5. **Use with Other Apps**: Check WiFi Settings before using weather, stocks, or crypto apps + +## Related Apps + +WiFi Settings is designed to work alongside WiFi-dependent apps: +- **Crypto Tracker**: Requires WiFi for price data +- **Stock Tracker**: Requires WiFi for market data +- **Weather**: Requires WiFi for weather data +- **Badge**: Requires WiFi for GitHub profile data + +## Source + +GitHub repository: [Add your repository URL here]