This the code for a custom PCB that shows in real time what TriMet MAX stations have a train at them. Details regarding the board can be found here. More detail into how this was made, can be found here
For those looking for how to flash their boards, please see below.
- Install Arduino IDE
- Add the ablity to install the ESP32 board info
- Open the Arduino IDE and open the prefrences window
File->Prefrences
- Paste
https://dl.espressif.com/dl/package_esp32_index.json
into theAdditinal Board Manager URLs
section - Close the IDE and reopen it
- Install the board info for the ESP32
- Select the target board
Tools->Board->ESP32 Arduino->DOIT ESP32 DEVKIT V1
- Install the NeoPixel library
- Download this repository as a zip For those that know how to do so, you can also clone the repository
- Unzip the zip folder to
C:\Users\[USR-NAME]\Documents\Arduino
- Open the IDE and open the
TransitTracker.ino
File->Open
and navigate to the folderC:\Users\[USR-NAME]\Documents\Arduino\Portland-Transit-Tracker_Code-master\TransitTracker
- Click on the file called
TransitTracker.ino
and clickOpen
- Once the code is open, click the little down arrow at the top right and click
New Tab
- Name the tab
config.h
- Go to the tab that was just created, and paste in the following code
- Replace
WIFI-SSID-HERE
with the name of your WIFI network name - Replace
WIFI-PASSWORD-HERE
with your WIFI password - Replace
API-KEY-HERE
the API key you got earlier - Your code should look similar to this
- Now save by clicking the check mark in the top left or by hitting
CTRL+S
const char* WIFI_SSID = "WIFI-SSID-HERE";
const char* WIFI_PSWD = "WIFI-PASSWORD-HERE";
const char* API_KEY = "API-KEY-HERE";
const char* WIFI_SSID = "WifiName";
const char* WIFI_PSWD = "Password123";
const char* API_KEY = "ABCDEF1234";
- Plug the ESP32 into the computer
- Open the IDE and select the proper COM port
Tools->Port
- If you have multiple options to pick from, you can disconnect the ESP32 and re-open the menu; the entry that disappears should be the ESP32. Reconnect the board and select that serial port.
- Click the upload button (shown below)
- A message like below will indicate a successful flash
- Unplug the ESP32 from the computer and remove the cable from the ESP32
- Follow the instructions that came with the board
- Back up instructions can be found LINK TBD