• Stars
    star
    450
  • Rank 94,165 (Top 2 %)
  • Language
    C
  • Created 10 months ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Smartwatch firmware for the LILYGO T-Wrist E-Paper ESP32 development board

banner

qpaperOS is a smartwatch firmware implementation for the LILYGO T-Wrist E-Paper ESP32 development board. This repositoy houses the qpaperOS source code along with 3D models and the FreeCAD file of the smartwatch case to make your very own qpaper!

The Product

screenshot

More photos of the complete watch can be found under assets/photos/ (https://github.com/qewer33/qpaperOS/tree/main/assets/photos)

qpaper is meant to be a minimal and lighweight smartwatch that does what it needs to do: always display time. The low power E-Paper screen of the qpaper allows it to always display the time and other information without having the display blank. The ESP32 wakes up every minute to update the display to show the correct time. More information about how the firmware works can be found in the next section.

qpaper has a battery life of approx. ~3-4 days with a 250 mAh battery. This number is way lower than it should be (the battery should ideally last more than a week but I sometimes even get 2 days for some reason) and I'm not sure if it's a fault of the firmware of if the board is wasting the battery somehow, need to debug.

Assembly

The outer sheell/case of the qpaper is meant to be 3D printed and assembled with 4 short M2 screws. The 3D models and FreeCAD file for the case can be found under assets/3d/ (https://github.com/qewer33/qpaperOS/tree/main/assets/3d)

Required parts for assembly:

  • LILYGO T-Wrist E-Paper ESP32 development board
  • 3D printed "Shell" piece
  • 3D printed "Bottom Plate" piece
  • 3D printed "Buttons" piece
  • 250 mAh 1S lipo battery
  • Half-size uFl GPS antenna (not required for the non-GPS version of the development board)
  • 4x short M2/M1.6/M1.4 screws
  • 22mm watch strap (compatible with Huawei GT2/GT3 straps)

Uploading the firmware

Clone this git repository and open it in VSCode. Make sure you have the PlatformIO extension installed. Connect the USB-C cable to your computer and to the T-U2T. Connect the T-U2T to the watch and click the "PlatformIO: Upload" button in the status bar.

Connecting the watch to WiFi

Install the "ESPTouch" app on your phone, open it and type your WiFi password. Long press the watch user button (top right of the case) to open the applications menu. Navigate to the "Connect to WiFi" app and long press user button to open it. Press "Connect" on the ESPTouch app and wait. Your watch should now be connected to the WiFi network that your phone is connected to. If the connection times out, try again. The watch will remember the SSID and password of the network and periodically try to connect to it to update time via NTP.

The Firmware

Warning

qpaperOS is not yet finished, the information here might be inaccurate

qpaperOS is the firmware part of the qpaper project. It is developed to work with the LILYGO T-Wrist E-Paper ESP32 development board. It uses the espressif-esp32-arduino framework and PlatformIO for development.

Below are features that are implemented or planned:

  • Display time and date
  • Display battery percentage
  • Have the ESP32 MCU on deep sleep and wakeup every minute to update the display for power saving
  • Apps and app system
    • About (minimal example app)
    • WiFi Smartconfig (connect the watch to WiFi via your phone)
    • GPS Sync
  • Themes and theme system
  • GPS functionality
  • GPS based step counter
  • Weather display
  • Islamic prayer times display

Apps

Apps live under the src/apps directory. Each app has it's own subdirectory and consists of 3 (or 2, one of them is optional) files.

src/
    apps/
        appname/
            app_appname.cpp
            app_appname.h
            app_appname_res.h  # optional

The app_appname.h file is the header file of the app. It contains the class and the extern instance definition of the app. Apps should extend the App class defined in src/apps.h. The methods that are going to be used by the app should be overriden methods from the App class. The instance should be an instance of the newly defined app class wrapped in an std::unique_pointer. There are 5 methods that apps can override from the App class:

  • setup(): Runs before the app gets started. Useful for initializing variable defaults or loading preferences.
  • drawUI(GxEPD_Class *display): Runs every frame when the app is running. This method should draw the user interface of the app using display.
  • exit(): Runs when the app gets exited. Useful for saving preferences and such.
  • buttonClick(): Runs when the user button gets clicked while in the app.
  • buttonDoubleClick(): Runs when the user button gets double clicked while in the app.

The app_appname.cpp file is the source file of the app. The source file should define the instance and implement the necessary app methods. The app constructor takes 2 argumnets: the first argument String name is the name and the second argument uint16_t* icon is the icon resource of the app.

The app_appname_res.h file contains the custom resources that are used by the app. These resources can be fonts, icons etc. This file is not necessary if the app doesn't have any custom resources. The app icon should go in src/resources/app_icons.h, not the app resource file.

The finished app should be included in src/apps.cpp and should be added to the apps array in the initApps() function.

You can take a look at the source code of the "About" app in apps/about for an example of a minimal app.

More Repositories

1

Exquisite

Easy window layout management for KDE Plasma
QML
168
star
2

leaf-kde

A forest green dark & light theme for the KDE Plasma desktop
Ruby
64
star
3

ClearClock

A simple and clean date/time plasmoid for your KDE desktop
QML
41
star
4

qlock-os

Smartwatch firmware for LILYGO T-Display-S3
C
14
star
5

qewer33.github.io

My personal website built with Svelte and p5.js
Svelte
13
star
6

image-collage-filter

A python script to make images that consist of more images!
Python
11
star
7

WickedRPS

A battlefield of rocks, papers and scissors
JavaScript
10
star
8

simple-plasmoid-template

A simple KDE Plasma plasmoid (widget) template
QML
7
star
9

Fonky

A Google Fonts frontend for the KDE Plasma desktop
QML
6
star
10

cloudflare-url-shortener

A very simple URL shortener built with Rust and Cloudflare Workers
Rust
5
star
11

sus_runner

sus game
Rust
4
star
12

neovim-config

My personal Neovim configuration files
Lua
3
star
13

generatory

A unique tool to aid game developers and designers on creating generative assets
GDScript
3
star
14

BashNotes

A simple bash script for managing notes
Shell
3
star
15

ascii_table_creator_3000

an interactive Ruby script that helps you create text tables right in your terminal!
Ruby
3
star
16

cli-ssic-games

My implementations of some classic games such as minesweeper or snake for the CLI in Ruby
Ruby
3
star
17

qewer33-blog

My personal blog
Astro
2
star
18

QDev-Boards

A series of development boards that are inexpensive, simple and easy to order and assemble for beginner hobbyists
HTML
2
star
19

VClicker

A simple, cross-platform mouse clicking utility made with Python and Qt Quick.
QML
2
star
20

Sorus-Website

CSS
2
star
21

Sorus-Installer

Java
1
star
22

personal-website

My personal portfolio website made with p5.js and TypeScript
HTML
1
star