Pebble Time JS Tutorial

I recently won a Hackathon and the price was a Pebble time. I tried out the Pebble Time and instantly felt that these kind of devices have potential. I feel like a smart watch is an extension of myself. I will try to make a mind map app to extend my mind and become awesomer.

My first feeling using the Pebble Time API is that it’s hard to get a simple hello world. I will try to document how I wrote my first hello world on the Pebble time.

Since Pebble.JS is still in beta, I recommend watching Robert C Martins Clean Architecture lecture. If we have a clean architecture then we can decouple from the framework itself.

Step 1 – Pebble SDK

Download and install

http://developer.getpebble.com/sdk/install/

Step 2 – Developer Connection:

Setup the developer connection, for more instructions go to:

http://developer.getpebble.com/guides/publishing-tools/developer-connection/

Step 3 – Clone:

PebbleJS is at the writing time in Beta.

https://github.com/pebble/pebblejs/

SSH

git clone git@github.com:pebble/pebblejs.git

HTTP

git clone https://github.com/pebble/pebblejs.git

Step 4: Build, install & run

Navigate to project map in a terminal or command prompt.

You need to build the project first. Then you need to install it. To do this, write:

pebble build
pebble install --phone <ip>

You will find the ip to your phone in the developer window, for more info at advice step 1.

Step 5: Code

Editing the app.js is pretty straight forward.

http://developer.getpebble.com/guides/js-apps/
http://developer.getpebble.com/docs/js/

Step 6: Debugging

Debugging can be done by listening to your phone or emulator. More information is available at: http://developer.getpebble.com/guides/pebble-apps/debugging/debugging-guide/

pebble logs --phone=<ip>