Notes by Dan Wilcox (@danomatika) for IACD 2015
The Pebble Watch
Developer Links (seriously, everything is here, read them):
- http://developer.getpebble.com/docs/c/ — the Pebble C API
CloudPebble is an online app IDE (Integrated Development Environment) for the Pebble Smartwatch. Using CloudPebble, you create projects, write code, and compile your app online. Running the app compiles and sends it from the CloudPebble website to your Pebble through the Pebble Smartwatch iOS/Android app running on your phone. Kind of convoluted but it works as long as both your phone and computer are online and the watch and phone are paired.
To reiterate: You write the code for your Pebble watch in a web browser, using the (online) CloudPebble IDE. The compilation of your code is done in the cloud; a binary is created on a Linux server somewhere. That binary is loaded onto the Pebble watch through a special App on your phone. Your phone must be connected to the Internet (to fetch the binary) as well as paired (via bluetooth) with the Pebble Watch.
CloudPebble -> *internet* -> Mobile Phone -> *bluetooth* -> Pebble Smartwatch
Note: In order for this to work, your phone must have an internet connection, the Pebble Smartwatch iOS/Android app should be running, and the watch must be paired to your phone.
Setting up CloudPebble with your watch:
- Sign up for a Pebble account on CloudPebble
- Install the Pebble Smartwatch App on your iOS or Android smartphone, and log in
- Follow the instructions to pair the watch and the phone; make sure to enable notifications
- Go ahead and update the watch to the latest OS version
- Enable Developer Mode in your phone’s app settings, then enable the Developer Connection from the main screen
Pebble Development Using CloudPebble
You can create two types of programs using the Pebble SDK:
- WatchApp: a regular app started from the main menu
- WatchFace: a custom watch face
SDK documentation (your dear friend):
Log in to CloudPebble and create a new project, either C or Pebble.js. Currently, there are a large number of C project templates, while there is only one template for Pebble.js. Chose one and open your project, then select a source file from the left menu bar. There should now be a Run button in the upper right of the text editor. Hit that to compile the app and run it on the watch. If everything is set up correctly, your app will be installed to the watch and started.
If you are using images and other resource files, they can be added using the menu item on the left panel.
Note: You can only have up to 8 apps loaded on a Pebble at a time. Apps can be swapped on and off the watch using the Pebble Smartwatch iOS/Android app.
- Various people are having their Pebble talk to a Raspberry PI: https://www.adafruit.com/blog/2013/06/03/using-a-raspberrypi-and-pebble-watch-to-control-your-home-theater-raspberry_pi-pebble-raspberrypi-pebble/
- Super Hacker Stuff: libpebble, via https://github.com/Hexxeh/libpebble