My first one-day project after the creation of this site, Wait Times for Pebble was inspired by two things: the former "Disneyworld Wait Times" app for the platform, and playing around a little more with the API provided by themeparks.wiki. I ended up completing it in a day's time, in mostly one sitting, thanks to the robustness of the API provided.

It was interesting going back to the Pebble development ecosystem after ~4 years of not developing anything. You'll note that my last pebble project was the FuelRod Locator, back in 2017. While I had used a lot of C in the mean-time, it's a whole different beast to be using C for something other than just standard OS libraries. Pebble's system, while powerful and well-documented, is still a little to wrap one's brain around. On top of that, the toolchain is somewhat... broken by time. Still powered by Python 2.7, composed of libraries that no longer are updated, it's a challenge getting everything working correctly. Luckily, I found a guide on another site (Writing a Pebble app in 2020 Part 2 – Installing the SDK – Willow Systems) which, with a bit of tweaking to get it working with WSL2 on windows, ended up successfully getting everything set-up.

Pebble's platform worked really well for this project, too - in short, the functionality is split between two different components: the C code, which runs directly on the watch itself and is responsible for displaying data, and a phone-side JavaScript file. While not all pebble apps have an associated JavaScript component, if any app wants to make use of configuration or - as in my case - internet connectivity, the script component is required.

The watch and phone components interact using key-value pairs over Bluetooth - it's pretty simple, and straightforward to use. However. Those keys are sometimes transformed into integers during the compilation process, which the program then uses after it has been installed. But sometimes they're not. This is... weird and inconvenient. In fact, I brought this up with some folks in the official Pebble development discord, and they mentioned that this was actually a bug in the Android implementation of the app. A little bit of extra javascript, and we had a patch working.

After a bit of extra development to polish up the user experience and add in some redundancy (and colors!), the app was done.

The source code is available on github (thomasstoeckert/waittimes (github.com)), and you can download the app from the Rebble Appstore here Wait Times | App (rebble.io)