Hands-On with the Bangle.js

Getting started with Gordon Williams' JavaScript-powered smart watch.

The Bangle.js smart watch. (📷: Alasdair Allan)

Along with the attendees of Nodeconf EU in Ireland I was lucky enough to get my hands on a pre-production model of the Bangle.js smart watch back in November. The watch went on to have a really rather successful Kickstarter campaign and unsurprisingly perhaps, at least if you know Gordon Williams track record, there has been a huge amount of work done in the last month to get it ready to ship on schedule to backers in March.

I’ve been living with the new JavaScript-powered smart watch for a month now, so I sort of thought it was time for a long term review and a hands-on.

Gordon Williams talking about the Bangle.js Smart Watch at NodeConf EU. (📹: NearForm)

If you’re interested in picking up a Bangle.js smart watch yourself, Williams has opened pre-orders at the Espruino shop for people to sign up to get one after he ships to his Kickstarter backers. Although priced at £69.96 (approximately $92) plus shipping the watch is a little bit pricier than it was during the Kickstarter.

Living with the Bangle.js

Physically the watch is pretty large. While I do have fairly small wrists, the round case of the watch is pretty substantial measuring 5.0 cm, that’s just under 2 inches, across and feels big on my wrist—although perhaps not as big as the image above makes it look. However it’s not uncomfortable on my wrist and I’m pretty happy with it overall.

The 350 mAh battery doesn’t quite manage the promised week of standby time, however I’ve generally been getting three or four days out of the watch between charges. The watch charges using the supplied USB magnetic cable, snapping to the two contacts on the back of the watch. Charging is fairly rapid, going from flat to full in around half an hour. But as I mostly put it on charge, and then forget about it on my desk for a couple of hours, so when I get up to go somewhere it’s charged, it’s not really been an issue for me.

I’ve tested the IP 68 rating of the watch. Although I’ve not quite taken it to the 10m limit, I have had the watch down around 5m (that’s approximately 16 ft) for extended periods, and it still works just fine, with no sign of water ingress.

The heart rate sensor also works pretty reliably. Although one thing to note is that the watch comes with a protective plastic film over the back which isn’t totally obvious and is easy to miss—especially since the watch can be charged with it still in place, and hear rate sensor works through it—but the sensor works far more reliably if you remove the plastic film first.

What I’ve found less reliable is the watch’s built-in GPS receiver. Perhaps due to the smaller antenna footprint acquiring the necessary four satellites for a fix can take a much longer time than you’d expect. However I was pleasantly surprised that the watch could still get a fix inside buildings, albeit only near south facing windows.

Surprisingly perhaps, given the protocol’s reputation, I’ve found Bluetooth connections watch work pretty reliably. Sometimes the watch doesn’t appear as discoverable from my laptop, however rebooting it has always solved this problem—and since rebooting takes a handful of seconds it’s not that serious an issue. I’m writing this one off to Bluetooth, rather than something specific with the watch’s firmware or hardware. I might have written a book on Bluetooth, but that only makes me more aware, not less, of the protocol’s failings. Which are many!

There are also a few rough corners with the software, for instance the default clock app initially displays the time one hour forward when initially loaded on boot before polling my time zone and flipping it back an hour. But that’s not just to be expected, that’s sort of the whole point of the watch. If you want a polished smart watch, go buy an Apple Watch or alternatively one of the many Android Wear watches. This one runs JavaScript, and that’s why you’d buy it. If a bug bothers you, you can download the software and fix it yourself.

ℹ️ Information: The first thing you should do when you get your hands on the watch is make sure it is running the latest firmware. Nightly Travis builds of the watch firmware are available to download. To upload the new firmware to the watch put it into DFU mode by pressing the top two buttons (BTN1, BTN2) as you would for a full reboot, and then release them both while the progress bar goes across the screen. Then following the firmware update instructions for the Puck.js board using the nRF Toolbox App on your phone.

Basic Operations

The watch has three physical buttons which, going from the top downward, are referred to in the documentation as BTN1, BTN2, and BTN3. They’re fairly intuitive to use, the top button (BTN1) is Up/Previous, the middle button (BTN2) is ‘select’ and is also used to bring up the main menu while the default clock app is being displayed, while the bottom button (BTN3) is Down/Next.

There are also two ‘virtual’ buttons, referred to as BTN4 and BTN5, which are the left-hand and right-hand side of the watch’s touch screen respectively.

If you run into problems with the watch—for instance it isn’t showing up when you’re looking to connect to it via Bluetooth—you can reset it with a long (approximately 6 second) press of BTN1 + BTN2. When the screen goes blank, release the buttons and the watch will reboot.

If you’re really having problems, keep holding the two buttons down, and the watch will eventually vibrate. You can then release the buttons and it will turn itself off. You can restart the watch by pressing BTN1.

Finally if you want to boot the watch without loading software, for instance in the case where you made changes the broke the default bootloader and need to fix it, you can instead release BTN2 but keep BTN1 held down. The watch will then boot to the Bangle.js logo, and display both the version number of the currently running firmware build along with the Bluetooth MAC address of the watch. This is also the best way I’ve found to make sure that the watch is in a ‘good’ state so that it is discoverable via Bluetooth.

Loading Applications

The “App Store,” or rather the App Loader, for the Bangle.js is predictably just another JavaScript application that runs in a browser. You can go ahead and clone the GitHub repo for the application, add your own app, then submit the changes and your app back as a pull request so that everyone can use it.

If you want to use the Bangle.js as a smart watch, it isn’t necessary for you to write your own applications. You can load existing applications onto the watch using the App Loader without having to touch the development environment at all. Just hit BTN2 to open the menu on your watch, then go into the Settings application to make sure that BLE is on, and the watch is set to be Programmable.

Then go ahead and hit the ‘Connect’ button in the top right hand corner of the App Loader window. So long as you’ve enabled Bluetooth you should see your watch pop up in the pairing list. Hit ‘Pair’ and then select the application you want to upload to the watch.

Pre-built applications range from a simple clock, to a 8-bit version of Flappy Birds after the £100k stretch goal was reached during the last hour of the Kickstarter campaign, adding high-speed graphics modes for games.

Saying, “Hello World”

However if you do want to write your own applications, the first step is always “Hello World.” Just open up the Espruino Web IDE, and boot your watch to the logo screen—by holding BTN1 and BTN2, then releasing BTN2 when the screen blanks. Then go ahead and enter the following in the editor.

Terminal.println("Hello World");

Click on the orange ‘Connect’ icon in the top left of the window, and select ‘Web Bluetooth’ as your port, and pick your watch out of the drop down to pair. Finally hit the ‘Upload’ icon in the middle bar.

You should see “Hello World” appear in the console to the right of the editor in the development environment, and on the watch face.

A Simple Clock

There is a whole bunch of example code now available, including templates for both applications, and widgets—like the widgets that display the current battery level and and Bluetooth connection status.

However perhaps one of the easier to get you started is the Simple Clock.

You can grab the code from GitHub and throw it into the Web IDE, and upload it your watch in just the same way you pushed the Terminal.println() code. However the problem you’re going to almost immediately have is that when you hit BTN1 to unsleep the screen, bad things will happen.

The drawWidgets() method is added by bootloader.js when loading the default clock application, but when you upload an application via the development environment the IDE just resets the watch, and skips running the bootloader completely. At least for now the solution is just to add the code to draw the widgets back in, at the top of your own code.

If you add the widget drawing code to the Simple Clock, everything will just work, and once you have your application you can package it up inside a local copy of the App Loader. Or alternatively, you can stay within the Web IDE and package things ‘inline’ without having to use the loader at all and still live on the watch permanently.

The Bangle.js Emulator

If you weren’t at Nodeconf EU, and didn’t like me manage to get your hands on one of the few other pre-production units floating around, you might now be getting a bit itchy waiting for the hardware to arrive. However it turns out you don’t have to wait till March to start developing apps for the watch.

There is now an emulator that runs in the browser which is running a full Emscripten compile of Espruino so you can develop your own applications while you’re waiting for the hardware. It can even run the 8-bit Flappy Birds clone in the emulator, or TensorFlow Lite for Micro-controllers so you can play around with machine learning.

Wrapping Up

The ‘getting started’ instructions that were published when the initial batch of watches were given out at Nodeconf EU last month are starting to feel a little bit dated. Fortunately other documentation is starting to pick up the slack.

There’s also some really rather intriguing things happening around the watch, for instance there’s now Gadgetbridge support for the watch—and in fact any device that implements the Nordic UART Service—can get notifications from, and interact, with an Android phone. Although the most exciting thing about the watch, for me at least, is still its support for TensorFlow and machine learning.

I’m really rather enjoying playing around with the Bangle.js, and hopefully I’ve given you a taste for what you can expect when the hardware finally ships to backers some time in March next year.

Alasdair Allan
Scientist, author, hacker, maker, and journalist. Building, breaking, and writing. For hire. You can reach me at 📫 alasdair@babilim.co.uk.
Related articles
Sponsored articles
Related articles