Pivothead Controlled From My Pebble

HTML Fusion / by Philippe Lewicki

A few months back I got the new Pivothead prototype and developer's kit. After experimenting with the Pivothead developer samples I decided I wanted to write an application to control the glasses from my Pebble watch.

Today I made progress creating a Pebble application that would enable me to control my Pivothead glasses.

Pivothead Smart

Pivothead

The Pivothead sunglasses are wearable electronics that does one thing, but does it well, take pictures and video. The glasses do not have a HUD (Heads Up Display), no fancy screen, just LED indicators. It's similar to a GoPro, but less awkward to mount to your head.

For this experiment I am using the Pivothead Smart prototype. They still look like the previous Durango model, but have new firmware that allows developers to control the glasses remotely as well as to stream live footage over WiFi.

Pebble

The Pebble is an awesome, simple and low cost smartwatch. Even better, it's very developer friendly. The API is mainly in C and include example to create companion apps in Android and iOS.

Pebble

First Attempt

C is a fine language but my preference today is Javascript so I started with the CloudPebble which is pretty cool. Cloud Pebble allows you to write a JS or C application and deploy it to your Pebble watch directly from their website.
The CloudPebble IDE makes it easy to create simple applications for the Pebble that communicate with the internet.

Unfortunately the Pivothead requires the controling device to be connected to the WiFi network that is broadcast by the glasses. This prevented me from using the CloudPebble website for deploying the Pebble application.

Second Attempt

I then decided to directly create my own simply.js javascript app and host it on the glasses' local WiFi network.

The theory sounded good, but the the simply.js application on the Pebble phone application contained internet dependencies and was totaly confused when connected to the glasses WiFi network, even with an internet connection bridge.
That made simply.js not work on the glasses local WiFi network.

Next step

I have installed the C SDK on my Linux Ubuntu and I'm now creating a hybrid C / Javascript app.
Using this guide:
https://developer.getpebble.com/2/guides/javascript-guide.html

I got some code to compile but haven't had time to test.

Stay tune for the results...