Sunday, February 16, 2014

The final prototype for now

Front View
Back View

Finally got the Teensy Version soldered down.  This is using a Sparkfun bluesmirf, silver, modem.
The switch on the left is for powering from the battery or through a USB port.
The battery is 1350 mAh.  This is good for 11 hours.

This configuration is for use with the Metawatch, which is now working great.  At least 3 days without a charge on the watch, and it no longer freezes.  I would attribute this to the bluetooth dongle.  The Bluesmirf is configured to automatically reconnect.  You do this from the modem itself, don't waste time trying to get the Arduino to do this.  The modem handles ALL of the connection details, you just have a pipe from the Arduino to it to pass information.  I also tried the Bluesmirf "Gold", reconnect never worked, and I didn't notice an increase in range.  It has a much more recent firmware version.

This link is a good place to start for details on how to deal with the Metawatch and the BlueSmirf.  This will get you up to speed on how to program the Modem as well as the watch.  Although this example shows controlling the connection process from the Arduino, don't be tempted.  The BlueSmirf is meant to do that on it's own.

The hardest part of this, software wise, is creating and sending a 96x96 packet representing your display to the watch.

This would be an example of how the binary representation of a few pixels gets turned into Hex, that gets sent to the Metawatch in 16 byte packets.  I found some font definition files on the internet that gave me the Hex for all the numbers and arrows I needed.  
Ex. this is "8":
0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e

When I finally got this to work, I had a microscopic font, on it's side, and upside down.  After a couple of bit operations, it then took me a while to realize that if I just sent each line twice, I could enlarge the font to a decent size.  

With all that squared away, I'm going to add a small graph and I'm thinking about a predictive feature.  A report of how long it would be before I'm over 180 or under 80, depending on which way the wind is blowing.  Probably will be a up or down arrow, and the number of minutes.


  1. Hi Don,

    I have been asked to speak at a diabetes education event coming up in April in Texas for a couple of hundred families and wonder if we could talk about the best way to share your technology with the attendees? If so please send email to me at kevinlmcmahon at gmail - It looks like you're making excellent progress.

  2. Hi Don, are you monitoring DexReciever battery? Have you measured miliAmps it is drawing from USB? Is your DexReciever able to stop charging (get response NOT_CHARGING from ReadBatteryState)? My DexReciever even with battery level response 100 it is still charging :(

    1. Just for my little Dex Angel