Skip to content

TTGO T-Wristband, using ESP32's Arduino Framework

License

Notifications You must be signed in to change notification settings

marf41/TTGO-T-Wristband

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP: Fork

Based on work of TioRuben. WIP.

WIP:

  • Interface change - upper half always visible,
  • Trying to add DMP library,
  • Adding FreeRTOS tasks (ESP hangs on TFT clear from task?),

Changes:

  • Portrait orientation.
  • User interface: submenus support added. Long touch for enter and action, single touch for next option.
  • OTA page: added wristband IP and remaining time.
  • Temperature page changed to quaternion and yaw, pitch and roll values display (WIP, strange readings), and submenu.
  • MQTT for data sync,
  • Wake-up on charging, constantly awake, and in OTA mode.

Original README below.


WIP: TTGO T-Wristband Example

First steps with TTGO T-Wristband. Product page.

Developed with PlatformIO

Includes a paged interface framework.

Disclaimer: Still work in progress. Currently I'm facing issues regarding battery duration (You can follow the issue in the manufacturer's repo). PRs are welcome.

User interface

  • Single touch: change page
  • Long touch: page action
  • Led: Charging status

Currently available pages

  • CET/CEST time, action: connect to wifi and update via NTP
  • UTC time, action: connect to wifi and update via NTP
  • Battery status. Action: OTA mode.
  • Compass, action: calibrate magnetometer.
  • Temperature: from the MPU9250 temp register.
  • OTA: long touch to enter OTA mode, to load firmware from PlatformIO.

Build and Flashing

First of all, install PlatformIO with your favourite IDE (i.e. VSCode). Follow this instructions.

Clone the repo

git clone https://github.com/TioRuben/TTGO-T-Wristband.git

Open cloned folder with your PlatformIO IDE (in the example, with VSCode)

cd TTGO-T-Wristband
code .

In the first flash, edit platformio.ini and comment all upload config (upload_protocol, upload_port, upload_flags):

[...]
  -DLOAD_GFXFF=1
  -DSMOOTH_FONT=1
  -DSPI_FREQUENCY=27000000
;upload_protocol = espota
;upload_port = 192.168.0.46
;upload_flags =
;    --auth=wristbandpass
monitor_speed = 115200
lib_ldf_mode = deep+
lib_deps =
[...]

Connect wristband via USB with the supplied daughter board. In Windows 10, drivers are installed automatically. I guess with other OS will be automatically installed too.

After plugging wristband, press the arrow button at the bottom of VSCode

Upload Button

PlatformIO will build and upload the binaries to the TTGO T-Wristband.

OTA Upload

After first flashing, you can use OTA upload. First of all, go to battery or OTA page in the wristband. Then maintain the wristband button pressed. If your Wifi is still not configured, you will see an screen asking you to connect to the wristband AP. Connect to It and follow the instructions in the captive portal to configure wifi (more info: WifiManager).

Once configured, you will see the "waiting for ota" message in the screen. Find your wristband IP Address, uncomment the platformio.ini lines you commented before and enter the IP address in the upload_port config.

[...]
  -DLOAD_GFXFF=1
  -DSMOOTH_FONT=1
  -DSPI_FREQUENCY=27000000
upload_protocol = espota
upload_port = [YOUR_IP_ADDRESS]
upload_flags =
    --auth=wristbandpass
monitor_speed = 115200
lib_ldf_mode = deep+
lib_deps =
[...]

It's supposed to work with hostnames, but sometimes fails.

Press again the upload button in PlatformIO

Upload Button

The project will compile and upload to the wristband.

Follow repo to get more updates

ToDo list

  • UTC Time
  • Port ADC calibration from Lilygo example
  • Finish compass
  • Add magnetometer calibration action
  • Add MPU temperature measurement page
  • Wake on motion interrupt. Wakes the wristband if big movements (ie when moving the arm to watch the time).
  • Refactor page framework to work with RTOS tasks
  • Charging animation
  • Prevent deep sleep when charging to feedback the charging status (via LED)
  • Bluetooth
  • "Next appointment" page
  • Change lcd brightness depending on day/night time

About

TTGO T-Wristband, using ESP32's Arduino Framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 53.9%
  • C++ 45.9%
  • Other 0.2%