Tuesday, May 29, 2018

Another try with the VivoSmart




Resurrected my iPhone app, which hasn't seen a phone in 3 years, last used with iOS 8.3.
BLE works better, whatever version we're on now.  Lot's of cleanup, this was some of the nastiest code I've written, getting closer to looking like my Pebble app.  Still Xcode is foreign, and it took me almost as long to convince it I was a registered developer as it did to get it working again.

All this came about because I started messing around with all these $30 fitness trackers.  The information is out there to pair directly with one and send notifications to it (the Mii Fit anyway).
So, as a preliminary step, I wanted to get notifications working with the phone again and see if this was going to work.  Future may include a ble nano /cc2500 combo, direct to band.  Although I'd like to find something better than the nano, I really need a device that can do both central and peripheral.
Normally the device is Central to the Band, but it needs to be Peripheral to the iPhone for calibrations (or whenever I want a front end).

And down that rabbit hole.  None of the cheapies handle a basic notification.  With allot of work I can spoof a phone call and get the info to the Mii, but it'll take me days.
Knowing the VivoSmart worked well in the past, I bought the VivoSmart3.  I am having a real good time with it.  I can't prevent the Vivo from vibrating when it receives a notification, so that caused me to rethink what I was doing.

Tired of always looking at the numbers, I realized I could let the phone do all the work for me.  If BG is stable between 90 and 160, am I going to do anything?, No.  So, the new app, if BG is between 90 and 160 AND the slope of glucose change is less than 1.5, then just send Good, once.  Now I go hours with a wristband that's quiet.  When things get lousy, it starts sending me data, and the vibration is useful.  The vibration isn't nearly strong enough to wake me at night, the phone gets that task.

Also, and here's the bigger item, I'm playing around with just displaying the estimated glucose rather than what the Dex (if I had a Dex) would display.  See above example, real time glucose is 154, based on the slope of change, it's really 163 (ie. what it will be in 10 minutes).  I've been using this for years, but only to estimate how long until I'm at a critical value(countdown above), which is 80 or 180.  33 minutes until 180 in the above example.  I thought, why bother with that, and just show the value.

Cuts down on allot of thinking on my part.  I show estimated glucose and the countdown value.  If I'm already over 180 or under 80, I display the Rate.  It's like before this tech existed, I feel good and I can just ignore the disease until the device buzzes.

It's fun to have a fitness band that I can actually use the functionality on, as well as track glucose.  Battery life is a 3+  days.