Have a Pebble smartwatch, want to make an app but aren't a coder? CloudPebble might be a good place to start.
Over 300,000 Pebble smartwatches were sold in 2013, and as a result the monochrome crowdfunded watch has become one of the major smartwatch platforms. Earlier this year the company launched app stores on both iOS and Android, and as a result there has been an explosion in apps available for running on the watch… but what if you want to write an app yourself?
How much of an l33t haX0r do you have to be?
It turns out that it is relatively easy if you’re moderately nerdy.
That’s the position I’m in. Whilst I’m not a programmer by trade or even training, I’ve done some hobbyist website building in the past. I’m the sort of person that you might ask to fix your router (but please don’t).
This essentially means that I’m enough of a nerd that when I get a new gadget, I’ll download the software development kit (SDK) and install it, ready to code… only to give up in frustration after ten minutes because I can’t figure out what the hell I’m supposed to be doing.
Brilliantly though, it turns out that with Pebble getting started coding is a (comparative) breeze. Last night I wrote my own functional and useful Pebble app – and all it took was six hours. I’m feeling a little smug today as a result.
Okay, I’m interested. So where do I even start?
Getting started is easy – you don’t even have to download anything. CloudPebble is what it sounds like – a web app to code in the cloud. All you have to do is login with your Pebble account and you’re half way there.
Next you have to enable developer mode on your phone – which on the iPhone is simply a case of going into the Apple Settings app, scrolling to Pebble, and pressing a button to enable it.
Then it all just… works. Cleverly from the web app, you can hit a “play” button that will compile the app and send it to your Pebble phone app (which must remain open), which will then automatically load it on to your watch for testing.
You can even talk back to the developers log – so if you build your code to send messages back for debugging purposes, you can watch in real time as the app will report back.
What programming language do I need to use? Is it hard?
This is the really clever bit. Usually Pebble apps have to be written in a language called C – which isn’t exactly user friendly. Brilliantly though back in March, CloudPebble added support for SimplyJS – which acts as a middleman and allows you to instead write code in the much more user friendly Javascript.
Okay, so it doesn’t look too friendly – but it does mean that if you’ve ever dabbled into Javascript when coding HTML, coding an app for Pebble should be almost as straightforward.
SimpleJS’s creator has helpfully taken several key Pebble features – like detecting button presses, requesting data from a webpage and so on – all you have to do is assemble something meaningful.
So what have you managed to code?
In London, every bus stop has a unique five digit code that you can tap into the Transport for London website that will tell you when your bus is going to arrive. Brilliantly, TfL have made this data available for developers to play with – which meant I was able to take it and produce a simple app that would show me on my Pebble how long until the bus.
I even managed to make it refresh every ten seconds – and unlike every other bus app, this works to the nearest second.
It wasn’t without challenges – the data was provided in a non-standard format (it looks like JSON, but isn’t), so I had to chop it out by manipulating the string data – then feed it all into a multidimensional array… then sort the array by time so the nearest bus would be listed first, before finally displaying it on the screen. Phew.
But I managed it – despite having no real programming skills. If you’re a Pebble owner… have a go! Its easier than it looks!