This project contains the source code to create your own Washington DC Metro sign. It was written using CircuitPython targeting the Adafruit Matrix Portal and is optimized for 64x32 RGB LED matrices.
- An Adafruit Matrix Portal - $24.99
- A 64x32 RGB LED matrix compatible with the Matrix Portal - $39.99 to $84.99
- A USB-C power supply (15w phone adapters should work fine)
- A USB-C cable that can connect your computer/power supply to the board
- A small phillips head screwdriver
- A hot glue gun (optional)
- Tape (optional)
-
Use a hot glue gun to cover the sharp screws on the right-hand side of the 64x32 LED matrix. This step is optional, but it will prevent wire chafing later on.
-
Lightly screw in the phillips head screws into the posts on the Matrix Portal. These only need to go down about 60% of the way.
-
Using the power cable provided with 64x32 matrix, slide the prong for the red power cable between the post and the screw on the port labeled 5v. Tighten down this screw all the way using your screwdriver. Repeat the same for the black power cable and the GND port.
-
Connect the Matrix Portal to the large connector on the left-hand side of the back of the 64x32 matrix.
-
Plug one of the power connectors into the right-hand side of the 64x32 matrix.
-
You can use masking tape (or painter's tape) to prevent the cables from flopping around.
-
Connect the board to your computer using a USB C cable. Double click the button on the board labeled RESET. The board should mount onto your computer as a storage volume, most likely named MATRIXBOOT.
-
Flash your Matrix Portal with the latest release of CircuitPython 6.
- Download the firmware from Adafruit.
- Drag the downloaded .uf2 file into the root of the MATRIXBOOT volume.
- The board will automatically flash the version of CircuitPython and remount as CIRCUITPY.
- If something goes wrong, refer to the Adafruit Documentation.
-
Decompress the lib.zip file from this repository into the root of the CIRCUITPY volume. There should be one folder named lib, with a plethora of files underneath. You can delete lib.zip from the CIRCUITPY volume, as it's no longer needed.
-
Copy all of the Python files from src in this repository into the root of the CIRCUITPY volume.
-
The board should now light up with a loading screen, but we've still got some work to do.
- Create a WMATA developer account on WMATA's Developer Website.
- After your account is created, add the Default Tier subscription to your account on this page.
- After doing this, you will be redirected to your profile.
- Under the Subscriptions section on your profile, select the show button beside the Primary Key. This is the key that allows the board to communicate with WMATA.
- Open the config.py file located in the root of the CIRCUITPY volume.
- Fill in your WiFi SSID and password under the Network Configuration section.
- Under the Metro Configuration section:
- Select your station and lines from the Metro Station Codes table, and set the metro_station_code value to the corresponding value in the table.
- For train_group, the value needs to be either '1' or '2'. This determines which platform's arrival times will be displayed. This value isn't well documented by WMATA, so your best bet is to try one value, and if it's the wrong direction, use the other value.
- Set the metro_api_key value to the API key you got from Part 3.
- At the end, the first part of your configuration file should look similar this:
#########################
# Network Configuration #
#########################
# WIFI Network SSID
'wifi_ssid': 'Grindr Pickup Zone',
# WIFI Password
'wifi_password': 'MyMetroBoardBringsTheBoisToTheNavyYard',
#########################
# Metro Configuration #
#########################
# Metro Station Code
'metro_station_code': 'D02',
# Metro Train Group
'train_group': '2',
# API Key for WMATA
'metro_api_key': 'd3adb33fd3adb33fd3adb33f',
- After you save this file, your board should refresh and connect to WMATA.
If something goes wrong, take a peek at the Adafruit Documentation. Additionally, you can connect to the board using a serial connection to gain access to its logging.
Name | Lines | Code |
---|---|---|
Addison Road-Seat Pleasant | BL, SV | G03 |
Anacostia | GR | F06 |
Archives-Navy Memorial-Penn Quarter | GR, YL | F02 |
Arlington Cemetery | BL | C06 |
Ballston-MU | OR, SV | K04 |
Benning Road | BL, SV | G01 |
Bethesda | RD | A09 |
Braddock Road | BL, YL | C12 |
Branch Ave | GR | F11 |
Brookland-CUA | RD | B05 |
Capitol Heights | BL, SV | G02 |
Capitol South | BL, OR, SV | D05 |
Cheverly | OR | D11 |
Clarendon | OR, SV | K02 |
Cleveland Park | RD | A05 |
College Park-U of Md | GR | E09 |
Columbia Heights | GR, YL | E04 |
Congress Heights | GR | F07 |
Court House | OR, SV | K01 |
Crystal City | BL, YL | C09 |
Deanwood | OR | D10 |
Dunn Loring-Merrifield | OR | K07 |
Dupont Circle | RD | A03 |
East Falls Church | OR, SV | K05 |
Eastern Market | BL, OR, SV | D06 |
Eisenhower Avenue | YL | C14 |
Farragut North | RD | A02 |
Farragut West | BL, OR, SV | C03 |
Federal Center SW | BL, OR, SV | D04 |
Federal Triangle | BL, OR, SV | D01 |
Foggy Bottom-GWU | BL, OR, SV | C04 |
Forest Glen | RD | B09 |
Fort Totten | RD | B06 |
Fort Totten | GR, YL | E06 |
Franconia-Springfield | BL | J03 |
Friendship Heights | RD | A08 |
Gallery Pl-Chinatown | RD | B01 |
Gallery Pl-Chinatown | GR, YL | F01 |
Georgia Ave-Petworth | GR, YL | E05 |
Glenmont | RD | B11 |
Greenbelt | GR | E10 |
Greensboro | SV | N03 |
Grosvenor-Strathmore | RD | A11 |
Huntington | YL | C15 |
Judiciary Square | RD | B02 |
King St-Old Town | BL, YL | C13 |
L'Enfant Plaza | BL, OR, SV | D03 |
L'Enfant Plaza | GR, YL | F03 |
Landover | OR | D12 |
Largo Town Center | BL, SV | G05 |
McLean | SV | N01 |
McPherson Square | BL, OR, SV | C02 |
Medical Center | RD | A10 |
Metro Center | RD | A01 |
Metro Center | BL, OR, SV | C01 |
Minnesota Ave | OR | D09 |
Morgan Boulevard | BL, SV | G04 |
Mt Vernon Sq 7th St-Convention Center | GR, YL | E01 |
Navy Yard-Ballpark | GR | F05 |
Naylor Road | GR | F09 |
New Carrollton | OR | D13 |
NoMa-Gallaudet U | RD | B35 |
Pentagon | BL, YL | C07 |
Pentagon City | BL, YL | C08 |
Potomac Ave | BL, OR, SV | D07 |
Prince George's Plaza | GR | E08 |
Rhode Island Ave-Brentwood | RD | B04 |
Rockville | RD | A14 |
Ronald Reagan Washington National Airport | BL, YL | C10 |
Rosslyn | BL, OR, SV | C05 |
Shady Grove | RD | A15 |
Shaw-Howard U | GR, YL | E02 |
Silver Spring | RD | B08 |
Smithsonian | BL, OR, SV | D02 |
Southern Avenue | GR | F08 |
Spring Hill | SV | N04 |
Stadium-Armory | BL, OR, SV | D08 |
Suitland | GR | F10 |
Takoma | RD | B07 |
Tenleytown-AU | RD | A07 |
Twinbrook | RD | A13 |
Tysons Corner | SV | N02 |
U Street/African-Amer Civil War Memorial/Cardozo | GR, YL | E03 |
Union Station | RD | B03 |
Van Dorn Street | BL | J02 |
Van Ness-UDC | RD | A06 |
Vienna/Fairfax-GMU | OR | K08 |
Virginia Square-GMU | OR, SV | K03 |
Waterfront | GR | F04 |
West Falls Church-VT/UVA | OR | K06 |
West Hyattsville | GR | E07 |
Wheaton | RD | B10 |
White Flint | RD | A12 |
Wiehle-Reston East | SV | N06 |
Woodley Park-Zoo/Adams Morgan | RD | A04 |