This repo contains code and parts (3D-printable and optionally lasercuttable) for a presentation display for the OpenBikeSensor.
The code is supposed to be built and flashed using platformio.
The display case can be built entirely 3D-Printed or with a case mostly made of lasercut plywood. Building the case and hardware is documented here.
- Power the device via the non-data USB-C connector. It works with the one on the ESP but running it that way long-time on high brighness will wreck the power circuitry of the ESP.
- The power supply should be USB-C PD capable or similar with at least 2A of permissible current draw at 5V, up to 3A in white text mode.
- If the power circuitry on the ESP module is shot, it can still be used - power needs to be supplied via the separate connector while flashing.
- Button 1 on GPIO 4
- Pressed during boot/power up switches to the alternate color mode (rainbow/white) of the display.
- Pressed during logo display switches between scrolling banner and static logo.
- Pressed during distance display shows/hides the display content.
- Button 2 on GPIO 2
- Pressed during boot/power up switches to the "text scroller" mode, skipping bluetooth and displaying a long string of text as a scroller instead. Meant for use during CriticalMass type events.
- Pressed during operation increases brightness.
- Button 3 on GPIO 15 decreases Brightness.
Open your shell in the root of this project (folder with platformio.ini).
-
Create and activate a virtual environment and install platformio inside it (to avoid messing with your system environment):
-
macOS/Linux (bash):
python3 -m venv .venv .venv/bin/python3 -m pip install platformio
-
Windows (PowerShell):
py -m venv .venv .\.venv\Scripts\python -m pip install platformio
-
Note
-
Activate the virtual environment in each new terminal session before running pio commands.
- macOS/Linux (bash):
source .venv/bin/activate - Windows (PowerShell):
.\.venv\Scripts\Activate.ps1
- macOS/Linux (bash):
-
To deactivate when you’re done:
deactivate
or just close the terminal.
- Build the project:
pio run
After connecting the ESP32 board to your computer:
-
Flash to the connected board
- If the led string starts at the top left:
pio run --target upload -e topleft
- If the LED string starts at the bottom right:
pio run --target upload -e bottomright
- If the led string starts at the top left:
-
If needed for debugging or defvelopment: Monitor serial output:
pio device monitor