With the relaunch of the Pebble brand of smarthwatches and the creation of two new devices, I have revisted the platform to investigate how custom watchfaces and applications are built.
I am looking forward to receiving my Pebble Time 2 and testing my watchface on real hardware, if my original Pebble Steel functions well with the new Android software I will investigate how a watchface can be ported to the older device.
- Create a working watchface application.
- Display 24 hour time as a percentage of the elapsed day.
- Display date as a percentage of the elapsed month.
- Display date as a percentage of the elapsed year.
- Integrate a sunrise/sunset API.
- Display sunrise/sunset times, to work with percentage of elapsed day.
- Split into simpler multiple-bar watchface: day, month, year bars.
- Split into new day focussed watchface: day bar with sunrise/sunset.
- Add moon phase into day watchface.
- Add battery status into day watchface.
No known defects.
GitHub Copilot was used to assist in the development of this software.
Note
Other operating systems and versions will work, where versions are specified treat as minimums.
The Pebble SDK ships with a simulator to allow fast feedback loops during development.
If you own a physical Pebble device you can load your watchface on to the device.
I have preordered a new Pebble Time 2 which will be used to test my watchface, I will update the application and documentation with findings.
Install uv, following the installation documentation.
Restart your shell.
Install the Pebble tooling:
uv tool install pebble-tool Install the following packages
pebble package install pebble-packetpebble package install pebble-eventsYou may encounter incompatibility issues with modern versions of Ubuntu.
The errors I encountered are listed below with their resolutions.
Couldn't launch emulator:
qemu-pebble: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory
Solution:
sudo apt update
sudo apt install libsdl1.2-compat-devCouldn't launch emulator:
qemu-pebble: error while loading shared libraries: libfdt.so.1: cannot open shared object file: No such file or directory
Solution:
sudo apt update
sudo apt install libfdt1Clone the repository.
Open in Visual Studio code.
Build the project.
Note
Tasks are configured to build and run the application in the Pebble emulator.
To manually build via the command line:
pebble buildTo manually run the emulator via the command line:
pebble install --emulator emeryEmulator controls:
| Key | Physical button |
|---|---|
| Q | Left button |
| W | Up |
| S | Select |
| D | Down |
The watchface takes the current date and time, and displays:
- the percentage of time elapsed for the current day (how far through the day),
- the percentage of days elapsed for the current month (how far through the month),
- the percentage of days elapsed for the current year (how far through the year).
It overlays the bars with:
- a horizontal line showing the sunrise time (which aligns with the day percentage elapsed bar),
- a horizontal line showing the sunset time (which aligns with the day percentage elapsed bar).
The watchface targets the Emery platform, the screenshot below is from the Emery emulator. This platform has been targeted in anticipation of testing on a Pebble Time 2, which is assumed to use the platform.
Note
The single watchface does not display all information effectively in a usable design.
I am considering splitting the watchface into two designs, one focussed on multiple-bars (day, month, year) and the other focussing on a richer day view (day, sunrise/sunset + other useful information).
The watchface operates without intervention.
i.e. once loaded, the watchface will fetch required data and populate its view.
If the emulator crashes, or struggles to install the application following a build, delete all files in the following location and retry:
/home/[user]/.pebble-sdk/4.5
If the latest changes to code are not reflected in the compiled output, use the pebble clean command to remove temporary build files:
pebble cleanOther troubleshoot tools may be found in the Command Line Tool documentation.
The Rebble community, and their Discord server.
Chris Lewis for his pebble-packet package, recommended by the author to help avoid issues with casting of data sent between watch and phone.
This repository was created primarily for my own exploration of the technologies involved.
I have selected an appropriate license using this tool.
This software is licensed under the MIT license.
More detailed information can be found in the documentation:
