A wearable speedometer for Electric Unicycles (EUCs), based on ESP32, and using the Arduino core and developed with PlatformIO on VSCode.
This is intended to be run on a TTGO T-Wristband.
It is intended to support all major brands of Electric Unicycle, and to connect directly, without requiring an app or other device. Currently only Gotway/Begode, Veteran, and Kingsong wheels are supported, however.
When your new TTGO T-Wristband arrives, it will have the manufacturer firmware installed on it. In order to run the EUC Speedo firmware instead, you will need to flash it to the device using a programmer.
After the initial flash, software updates can be be uploaded over a WiFi connection using the app's builtin Over the Air (OTA) updater.
Once the EUC Speedo is up and running on the device, a double press on the button will activate the internal WiFi access point, connect to that and use a web browser to navigate to the IP address on the screen. You will see the settings page and links to configure the UI. From there you can choose what data is displayed on the screen and how, and also change what the button does.
Alternatively, a double press on the button will activate a bluetooth scan, causing it to connect to any Gotway/Begode, Veteran or Kingsong EUCs that are active nearby, and the default UI will display the speed of the connected device.
pip install esptool
esptool --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x00 path/to/0x00.bin
, replacing path/to/0x00.bin
with the path to the binary downloaded earlier.After the initial flash, it is well worth keeping the programmer in case of errors in the firmware, which can make OTA updates impossible.
By default, a double press on the button will activate the internal web server, accessible through a WiFi access point called 'EUC-Speedo'. Once activated, the LED will flash, and the IP address of the server will be printed to the screen. Connecting to the access point and navigating to the IP address in a web browser will display the general settings page.
The basic settings and OTA updates are available from this page, as well as the UI Settings.
The app supports multiple UI screens, all of which are completely configurable. The list in the general settings page allows the creation and deletion of these UI screens, as well as the ability to change their order.
Pressing 'edit' on one of these screens will open the UI Settings page.
On the left are the general settings for this screen:
In the center is the Draw Queue:
Each UI element is listed in the order that they are drawn. Elements further down the list are 'in front' of the previous elements. Their order can be changed or they can be deleted, which will be immediately updated on the device's screen. The 'Add Element' button opens the UI Element creation form. Occasionally an 'empty' type may appear. This is an error type and won't affect the UI.
Selecting from each of the drop downs in order, a UI Element can be configured to display data on the screen. Dynamic colour types allow any colour in the UI element to change based on a given data type.
The available data types are:
On the right are the test data.
Each data type that is displayed by a UI element on this screen will be displayed in the list, allowing the user to update them and see the results in real time on the device.
The TTGO T-Wristband comes with three battery sizes, 40mAh, 55mAh, and 105mAh. The largest version is the only one tested, and with the screen running and bluetooth connected, it reliably ran for between one hour and one hour twenty minutes.
The screen is only just bright enough to read in direct sunlight. This is mostly due to the case, which has a tinted window for the screen, causing it to appear dimmer.
The following open source projects have been essential for this project: