Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/content/hacks/badge-custom-username.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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`.

<img src={sitePath('/images/hacks/github-handle/settings-locked.png')} alt="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.
Expand All @@ -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`.

<img src={sitePath('/images/hacks/github-handle/settings-locked.png')} alt="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 <a href={sitePath('/hack/connect-wifi/')}>Connect to Wi-Fi</a>.
Expand Down
Loading