Developing apps for the Pebble smart watch

by Tom van ZummerenJune 18, 2013

Pebble

In this blog I want to talk about Pebble. A watch that can connect to your smart phone (both iPhone and Android) via Bluetooth to do all sorts of cool stuff a regular watch can’t do. Among the cool things you can do with it is install apps, which you can write yourself. As a geek and iPhone owner, I find this possibility especially interesting! I want to give an impression of what Pebble is, what it can do and how you can get started developing apps for this watch!

About Pebble

Pebble is the first smart watch that gained a lot of popularity very fast. It started as a project on Kickstarter at the beginning of 2012. Kickstarter is a crowd funding site which helps people with great ideas get the money they need to bring that idea into reality! If you donate to a project on Kickstarter you are guaranteed to be one of the first people that gets one. Pebble set it’s goal to $100.000. But they reached that goal within a few hours! It continued to grow until they had $10.000.000 at the end of the 30 day donation period!

At the beginning of this year they finally started shipping Pebbles to all Kickstarter backers. At the moment of writing they are still not finished shipping it to all people, because there are just so many that donated! Luckily I was one of the first that donated to this project so I already got mine a couple of months ago!

What can Pebble do?

Think of Pebble like a down-scaled smart phone you don’t have to get out of your pocket to use. It can run apps and communicate with your smart phone. Pebble has a 144×168 pixels e-ink screen that can only display black and white pixels, but it renders animations at 30 frames per second. It connects to apps on your iPhone or Android device to be able to do stuff with GPS or the internet for example, or just to act as a second-screen to your smart phone app.

Main features

Right now Pebble can do four useful things straight out-of-the-box:

  1. It can display all notifications you already receive on your smart phone so you don’t have to get your smart phone out of your pocket for every message/e-mail/whatever you receive. Of course you still need to when you want to send messages.
  2. You can control your music that’s playing on your smart phone and see what song it is you hear. I use this especially when I am listening to music on the public transport. It is usually too crowded to get my iPhone out of my pocket.
  3. Use it as an alarm clock by configuring alarms.
  4. Display the time (shocking!!) by choosing from many different watch faces.

Other (hardware) features

  • Backlight, which turns on when you shake your wrist or receive a notification. This makes it possible to look at the display at night.
  • Motion sensor, currently it is only used to enable the backlight. But in the future, also Pebble apps can use this sensor. This is not yet the case.
  • Vibration, a short vibration pulse is used when the watch receives a notification. This way you know when a notification arrives even when you’re not looking at your watch.
  • Pebble comes with a plastic watch strap that looks a little cheap. But you can attach any watch strap you like.
  • Water proof (5 ATM), so you can easily wear it in the rain, while doing the dishes or in the shower. The power connector works with magnets (similar to Macbook), so there is no hole that can leak water into the watch.
  • Install software updates and apps over the air using Bluetooth.
  • Available in black, red, white, orange and grey!

Apps

With the help of (third party) watch faces and/or apps Pebble can do a lot more!

  • Install additional watch faces (for free) from the Pebble store using the iOS/Android app
  • See the distance and speed while you’re doing running excersises using RunKeeper for iOS and Android.
  • Display the current temperature in your area
  • Use it as a golf rangefinder
  • See today’s appointments from your calendar (I’m currently developing an app to do this actually)
  • Play Snake and Tetris 😛 Yes really, someone built it…
  • … anything you can think of, I guess the sky is the limit

See http://www.mypebblefaces.com for all kinds of cool Pebble app ideas. The site contains both concepts and downloadable apps that you can actually install on your Pebble right away!

Difference between watch apps and watch faces

Pebble offers two types of apps: “watch apps” and “watch faces”. They are essentially the same, with some exceptions.

Watch faces

  • Used mainly to display the time in a unique way
  • Can be configured as the default watch face, which means it will automatically return to it when you haven’t touched any buttons on the Pebble for a while. Or when you press the back-button a few times.

Watch apps

  • Can do anything a watch face can do
  • Usually not meant to display time, but they can do it if they want!
  • To run an app, you have to select it manually from the menu
  • Unlike watch faces, watch apps can respond to the physical buttons on the Pebble
  • In the future only watch apps can read to the motion sensor
  • Watch apps can trigger a vibration pulse
  • Watch apps can communicate with iPhone/Android apps.

How does Pebble work?

pebble-buttons
Pebble has 4 buttons. The one on the left is the back button. The three on the right are: up, select and down. With the up, down and select buttons you navigate through the menus and you can go up the menu tree using the back button. By default Pebble shows the default watch face. With the up and down buttons you switch between all installed watch faces. When you press the select button you enter the main menu. From the menu you can go to things like music control, settings but also all installed apps are listed here. With the selection button you can open any of the listed menu options. With the back button you can always go back to where you came from.

How can you get one?

You will have to order it via http://getpebble.com, since it is not yet available in physical stores. But it will take a long time before you can will receive your order. At the moment of writing this blog they are still delivering watches to Kickstarter backers only. Once they finish that, they finally start shipping orders placed via the website. If you can’t bear to wait, your best bet is to check for second hand Pebbles on Ebay.

The Pebble SDK

Pebble recently released an SDK to create apps for Pebble. It is still at a very early stage so it does not have a simulator yet for example and you have to do things like compiling, pairing via bluetooth and installing the app on your watch from the command line.

Pebble development is pure C

It’s pure C. I find this kind of a fun challenge, to be able to write apps in a very limited language like C. Also the fact that it’s not object oriented is very limiting. Although the Pebble SDK tries to mimic objects by using structs. Structs can only hold data, not logic. So you pass in this struct to several global functions to execute logic.

http://developer.getpebble.com is the starting point if you want to create your own apps. The folks at Pebble created a really nice SDK for us. They made it possible to work with all kinds of UI elements that might be familiar if you have ever worked with UI frameworks before. Examples: Window, Clicks, Animation, ActionBarLayer, BitmapLayer, MenuLayer, ScrollLayer, SimpleMenuLayer, TextLayer, etc. A “layer” is something similar to a “view” in other frameworks like UIKit on iOS, or a “component” in something like Google Web Toolkit (GWT).

Cool stuff other people are creating

Check out the Pebble forums to see what other people are working on. Everyone is sharing their code so you can try out what they are working on, on your Pebble. And like I mentioned earlier, on http://www.mypebblefaces.com you can find and install finished watch apps and watch faces. Here are some of the apps you can download, which I think are really creative, original and/or funny:

Conclusion

I like the idea of a smart watch in general. I am not saying Pebble is “it”, but it is the first gadget that demonstrates the whole smart watch concept pretty nicely. I believe that in approximately ten years from now almost everyone will be wearing one and cannot imagine life without it. It will most certainly not be a Pebble people are wearing, but maybe an iWatch, Google Watch or Windows Watch? Don’t believe me? Look back in ten years time and think of how many people even owned a mobile phone, let alone smart phones. Then compare it to today, everyone owns a mobile phone nowadays and most of them are smart phones. People can’t live without them. I think the same thing will happen to the smart watch.

I hope I inspired some of you to get a Pebble yourself and start writing apps for it too. If not, I hope you enjoyed reading this blog anyway 🙂