Skip to content

Development of a 24 hour watchface for the Pebble line of smartwatches.

License

Notifications You must be signed in to change notification settings

deans-code/rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Rotation

๐ŸŽฅ Background

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.

โœ… Scope

  • 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.

๐Ÿ”ญ Future Gazing

  • 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.

๐Ÿชฒ Known defects

No known defects.

๐Ÿ”ฎ Use of AI

GitHub Copilot was used to assist in the development of this software.

๐Ÿš€ Getting Started

๐Ÿ’ป System Requirements

Software

Ubuntu VS Code Insiders uv

Note

Other operating systems and versions will work, where versions are specified treat as minimums.

Hardware

Pebble

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.

๐Ÿ’พ System Configuration

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-packet
pebble package install pebble-events

Troubleshooting configuration

You may encounter incompatibility issues with modern versions of Ubuntu.

The errors I encountered are listed below with their resolutions.

Error while loading shared libraries: libSDL-1.2.so.0
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-dev
Error while loading shared libraries: libfdt.so.1
Couldn'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 libfdt1

๐Ÿ”ง Development Setup

Clone 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 build

To manually run the emulator via the command line:

pebble install --emulator emery

Emulator controls:

Key Physical button
Q Left button
W Up
S Select
D Down

โšก Features

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.

Screenshot

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).

๐Ÿ“Ž Usage

The watchface operates without intervention.

i.e. once loaded, the watchface will fetch required data and populate its view.

Troubleshooting the emulator

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 clean

Other troubleshoot tools may be found in the Command Line Tool documentation.

๐Ÿ™Œ Thanks

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.

๐Ÿ‘‹ Contributing

This repository was created primarily for my own exploration of the technologies involved.

๐ŸŽ License

I have selected an appropriate license using this tool.

This software is licensed under the MIT license.

๐Ÿ“– Further reading

More detailed information can be found in the documentation:

About

Development of a 24 hour watchface for the Pebble line of smartwatches.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published