From a5391931b25ed09af33dc60ee31c8969a23b0731 Mon Sep 17 00:00:00 2001 From: Pj Metz Date: Tue, 1 Dec 2026 16:01:54 -0800 Subject: [PATCH] docs: put VS Code first in badge settings guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6041409a-2e6e-4a40-900b-8d80edf16f77 --- src/content/hacks/badge-custom-username.mdx | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/content/hacks/badge-custom-username.mdx b/src/content/hacks/badge-custom-username.mdx index a42f647..69c410a 100644 --- a/src/content/hacks/badge-custom-username.mdx +++ b/src/content/hacks/badge-custom-username.mdx @@ -14,7 +14,7 @@ featured: 1 import { sitePath } from '@/lib/site-path' -Use the **Settings** app to configure the badge without writing code. It stores your Wi-Fi connection, GitHub username, contact card, and display brightness. +Configure your badge over USB in VS Code, or use the **Settings** app on the badge. Set your Wi-Fi connection, GitHub username, contact card, and display brightness. The available settings are: @@ -33,7 +33,29 @@ The available settings are: - A 2.4 GHz Wi-Fi network for online apps (see [Wi-Fi](#wi-fi) below) - For the USB method: a USB-C data cable and [VS Code](https://code.visualstudio.com/) or any text editor -## Option 1: Use the Settings app +## Option 1: Edit `secrets.py` in VS Code + +1. **Connect the badge to your computer** with a USB-C data cable. +2. **Enter USB mode.** Double-tap the badge's reset button, or open the **Mass Storage** app from the menu. The screen shows **USB Disk Mode** and a drive named **BADGER** appears on your computer. +3. **Open the drive in VS Code.** Choose `File → Open Folder...` and select **BADGER**. +4. **Edit `secrets.py`** at the root of the drive: + ```python + WIFI_SSID = "HYB-26" + WIFI_PASSWORD = "..." + GITHUB_USERNAME = "your-handle" + CONTACT_NAME = "Your Name" + CONTACT_LINKEDIN = "your-linkedin-handle" + REGION = "us" # Options are us, cuba, eu, moldova, lebanon, egypt, chile, australia, nz + TIMEZONE = -7 # Offset from GMT as number of hours, i.e. 0, 1, -7 etc. + ``` + Keep the quotes, and leave any text setting you do not use as `""`. `REGION` and `TIMEZONE` are additional computer-edited settings used by apps such as Clock. Change the backlight from the Settings app. +5. **Save the file and eject BADGER** (Finder: click ⏏; Windows: **Safely Remove Hardware**). The badge restarts automatically. If it doesn't, press reset once. + +Values you set in `secrets.py` take priority over the Settings app. Settings shows those fields with a padlock and **locked**. To edit them on the badge again, set them back to `""` in `secrets.py`. + +Settings app showing a locked GitHub username set in secrets.py + +## Option 2: Use the Settings app 1. Open **Settings** from the menu. 2. Use **Up** and **Down** to move through the settings. @@ -59,28 +81,6 @@ The available settings are: The screenshots show the GitHub username workflow, but the same keyboard and save controls apply to every text field. -## Option 2: Edit `secrets.py` in VS Code - -1. **Connect the badge to your computer** with a USB-C data cable. -2. **Enter USB mode.** Double-tap the badge's reset button, or open the **Mass Storage** app from the menu. The screen shows **USB Disk Mode** and a drive named **BADGER** appears on your computer. -3. **Open the drive in VS Code.** Choose `File → Open Folder...` and select **BADGER**. -4. **Edit `secrets.py`** at the root of the drive: - ```python - WIFI_SSID = "HYB-26" - WIFI_PASSWORD = "..." - GITHUB_USERNAME = "your-handle" - CONTACT_NAME = "Your Name" - CONTACT_LINKEDIN = "your-linkedin-handle" - REGION = "us" # Options are us, cuba, eu, moldova, lebanon, egypt, chile, australia, nz - TIMEZONE = -7 # Offset from GMT as number of hours, i.e. 0, 1, -7 etc. - ``` - Keep the quotes, and leave any text setting you do not use as `""`. `REGION` and `TIMEZONE` are additional computer-edited settings used by apps such as Clock. Change the backlight from the Settings app. -5. **Save the file and eject BADGER** (Finder: click ⏏; Windows: **Safely Remove Hardware**). The badge restarts automatically. If it doesn't, press reset once. - -Values you set in `secrets.py` take priority over the Settings app. Settings shows those fields with a padlock and **locked**. To edit them on the badge again, set them back to `""` in `secrets.py`. - -Settings app showing a locked GitHub username set in secrets.py - ## Wi-Fi Your badge comes set up for the **HYB-26** network in the **Hack Your Badge** area. The badge only supports **2.4 GHz** Wi-Fi, so it can't join the main conference network, which prefers 5 GHz. To use your home Wi-Fi or your phone's hotspot, see Connect to Wi-Fi.