This article is more than 1 year old

Chronos EZ430: An SDK packing watch for real techies

It's a timepiece, but not as we know it

Having achieved a steady stream of data points, and amused the rest of the office by waving hands repeatedly above the desk, we set about determining a pattern of movements which would trigger our music playback to skip to the next randomly selected track. After some more arcane hand waving we decided the easily thing was a clockwise twist of the wrist after a period of holding the hand vertical.

Catching such a pattern was just a matter of spotting when the hand was vertical, and then noticing when the orientation changed at sufficient speed. For simplicity we're limiting ourselves to one axis, X, the attitude of which is held in the fifth byte received when polling (addressed as 4 given Java's preference for arrays indexed from zero). We count up the number of polls during which the hand is held vertical (between 0xd0 and 0xc0), and then check if the hand is horizontal (>0xf0) immediately afterwards:

if ((readBuffer[4] < 0xd0) && (readBuffer[4] > 0xc0)) {
  clockwiseCounter++;
  if (clockwiseCounter > 6) {
    clockwiseCounter = 6;
  }
} else {
  clockwiseCounter--;
  if (clockwiseCounter < 0) {
    clockwiseCounter = 0;
  }
}
if ((readBuffer[4] > 0xf0) && (clockwiseCounter > 1)) {
  System.out.println("Change Track");
  playNextTrack();
  clockwiseCounter = 0;
}

That was then used to trigger an HTTP request to our music software. We could have accomplished anything but in this instance we just request the next track be played.

It would be a lie to say that colleagues were unanimous in their admiration for such a creation. 'Admiration', in fact, is probably not the right word, but they were unanimous in saying they'd never seen anything like it.

Not that the Chronos is limited to selecting music to play back. Cleverer people have put it to work unlocking doors (using the accelerometers to tap out a pass code) or controlling a robot arm:

We'd like to get some applications running on the watch itself. The supplied SDK is limited to an application size of 16K and one has to pay real money to extend that, but it would be good to replace the buttons with taps with a view to a pocket-watch form factor. But even if all we ever manage is switching tracks with a flick of the wrist that's still worth $50 of our money.

Most people wouldn't be interested in paying $50 plus $16 postage just for the opportunity to make a fool of themselves by waving a loaded wrist in front of colleagues and friends alike, but we know that Reg readers aren't like most people. ®

More about

TIP US OFF

Send us news


Other stories you might like