How to install the Badgeware Tufty Weatherstation

What you'll need:

What you might want:

Step 1: Setting up your Tufty

Connect your badge to your computer with a USB cable and press the RESET button twice to enable disk mode. This'll make the badge show up as a USB drive in your computer's file explorer. Open it, and open secrets.py in a code editor. It should look something like this:

WIFI_SSID = ""
WIFI_PASSWORD = ""
REGION = "eu"  # Options are us, cuba, eu, moldova, lebanon, egypt, chile, australia, nz
TIMEZONE = 0 # Offset from GMT as number of hours, i.e. 0, 1, -7 etc.

Fill in the WIFI_SSID with your wi-fi network's name and WIFI_PASSWORD. Fill in the region accordingly, and the timezone you should put in here is probably (based off your browser metadata):

Decimal timezone offsets are not supported in weatherstation, though don't worry if your timezone is not by an hour offset because this plays a minor role in the app.

Step 2: Downloading and configuring

Run:

git clone https://github.com/nouxinf/weatherstation.git
cd weatherstation

Below you'll be able to configure options like what temperature unit to use and what locations to use and whether to add a nickname. If you don't add a nickname weatherstation will automatically generate one through OpenStreetMap Nominatim e.g. Manhattan, NYC.

Locations
Locations list:
		Your generated options.json will go here...
	

Open up options.json in a text editor and paste in the above.

Step 3: Putting it on the badge

Fortunately, weatherstation is an app and not a firmware for the Tufty. This means you can keep all your other MicroPython apps without having to wipe the badge. To copy it over to your badge, open up load.py in a text editor. It should have something like this:

import os
import glob
import shutil

SOURCE_DIR = "."
APP_PATH = "F:/apps/"
INSTALL_PATH = "weatherstation/"
...

Change F:/apps/ to wherever your apps folder is in the filesystem. Don't change any other part of the file unless you know what you're doing.

Now press the RESET button twice on the badge while connected to your PC to enable disk mode. Then run:

python load.py

Wait for it to stop transferring data then press RESET again to boot into the menu. Use the buttons to navigate towards the bottom where you'll see a cloud with sun icon. Select it with B and you're in!