Wednesday 20 November 2013

New Pebble firmware & SDK V2 (Beta2) + minor update on project status

Many good news!
New firmware & SDK give new capabilities to the Pebble.
I won't repeat what has been extensively documented elsewhere (eg https://developer.getpebble.com/2/getting-started/) I will only mention that the new firmware enables pairing the pebble to more than one hosts.
That way, the Pebble can be used as Secondary UI  to the "Ship Computer" while still being able to get notifications from the  smart phone.
Pebble paired to 2 hosts
As for the project itself, the hardware part of it is almost compete.
The difficult part is the software, both for reading the peripherals but also the UI.

For example, on the peripherals front, the digital compass in order to be sort of accurate, it has to be either held horizontally or I have to know its angle to the horizontal plane and for that I have to use a accelerometer whose measurements I have to take into account while calculating the heading of the magnetometer.
 The same time, the magnetometer doesn't seem to have the accuracy i was hoping to have... I have two devices pointing at the same direction and they give slightly different readings, but the difference among the two is not constant.

I am not sure of how to handle this issue, I will think of it...

Back on the software, I thought, in order to avoid having to write an iPad native app, at least for the functionality I described for Version 1, instead of implementing Version 1 Primary UI as a native app, to use Javascript instead and implement it over a browser.
That way it would be portable and possibly faster to develop that having the native app into the equation.

Well, so I thought!

In order to do what I wanted to do, I could follow two paths:

1. do everything on the host, send Primary UI browser a static page, doing a meta refresh every 1 or 2 seconds. The graphs would be created statickly using gdlib (http://libgd.bitbucket.org/) or something similar.
 2. Do the metrics collection on the host, use javascript on the client, running a rendering process that would communicate with the metrics-gathering daemon via a TCP socket

The first approach was considered too clumsy to further investigate, it would consume a lot of processing power and bandwith.
The second looked a more viable alternative to the native app.

So, what's the problem?
Can't create sockets on Javascript! The alternative is WebSockets but this is another API I have to learn, in a language (javascript) that I have never seriously used!

Anyway, whoever feels like writing some code and doesn't know what to write for, would be highly welcome!

Actually I am in need of people with knowledge of:
hardware design
low level (register level) system programming (Python)
data collection, storage (Python + SQL)
Secondary UI on Pebble (C)  
UI Daemon possibly in Python
Primary Version 1 User Interface (clocks and measurements) Javascript/HTML5
Primary Version 2 User Interface (Two way communication, maps, waypoints, VMG etc) Objective C

Thanks for reading this.