The new Microsoft Band 2 incorporates 11 sensor which includes the usual GPS, heart rate, and step sensors needed for health monitoring but also included are some hidden features that make this embedded platform ideal for other activities.
I am not going to get into the reviews, there are plenty of other bloggers out there for that. I do like the fact that is an open platform and you can write your own apps using Microsoft’ s published SDK for the Band 2.
The Band SDK works with, and runs on your smart phone be it Android, Apple Phone or Windows Phone. You can write your app to run on one or all the targeted phones.You will need the Microsoft Health App initially installed on your phone as it will use this to connect and manage the features on the Band. The Band establishes a Bluetooth connection to your phone and basically acts as a head-end display unit and a sensor provider publishing data to the phone.
You have several host development platform options available to write your app. You can use Android Studio and pull the Android Band package from the Google store. Or for cross-platform development I prefer Visual Studio/Xamarin. Xamarin allows you to actually develop and target all three platforms simultaneously, all using the C# programming language. Again, there is lots of information and several helpful videos on the Xamarin web site to help you get started in cross-platform mobile development.
What sparked my interest was the barometric pressure transducer. Atmospheric pressure is one way of determining altitude and believe it or not it is remarkably accurate. As an avid skydiver, I thought it would be cool to develop an app that mimics my regular altimeter gear I use quite regularly. The pressure measurement technique has several advantages over using say GSP like quick update rates, the ability to zero to AGL (Above Ground Level) and the fact it does not rely on a satellite signal.
Using the following atmospheric model you can convert from pressure to altitude:
Halt = (1 – ( Psta /1013.25)0.190284 ) X 145366.45
Where Halt is in feet and pressure is in hectopascals or millibars.
In C# this equation would look like this:
altitudeAGL = (int)(((1 - Math.Pow (pReading / 1013.25, 0.190284)) * 145366.45) - zeroAGL);
This assumes an offset (zeroeAGL) which is calculated when the program is initially started and is done while on the ground. A good skydiver will always “zero” their altimeter at the start of a jump before getting on the plane as things like the current weather can introduce small changes is ambient pressure.
Once you work through the details of installing the Microsoft Health App, connecting to the Band and pulling the sensor readings the next step would be displaying the calculated results. I initially displayed the altitude on the phone, just as a sanity check. After I was sure my calculations were correct I dug into pushing the results to the BAND’s display.
I created a custom “Tile” to be displayed on the main start strip.
I also created a “Pull Altitude” feature you can set. When you pass through this altitude the haptics, or vibration notification, is activated alerting you it is time to pull your ripcord.
Of course this is just a proof of concept now but could be expanded to incorporate more advanced features like total freefall time, freefall speed, opening altitude etc.features found in some of the more advanced (and expensive) skydiving equipment. The other sensors, like the accelerometer and gyro can also be incorporated to calculate things like glide-slope, a parameter of particular interest to the wing-suit skydiving community.
I published all the code on my github home page. Feel free to experiment.
Blue Skies
Re: Windows Embedded Compact 2013 on Beaglebone gets IoT sample
Please contact me regarding a full installation of this BSP for WINCE2013, and what is necessary for...
-- Aaron Peterson
Re: BeagleBone BSP code clean up
Hi David, Interest in the fully version of the image. Please let me know the commercials. I need clarification...
-- CB
Re: BeagleBone BSP gets several improvements
Hi David, How can I get a full version (without reboot) of your image available for demonstration?
-- Marco Aurélio Braun
Re: Low power operation on the community IoT Beaglebone BSP (Part 1)
Hello , dvescovi . Because of Job , I use your Beaglebone black BSP which is helpful for me . I want...
-- KevinHsu
Re: Yet Another Gotcha: Compact 7 Update
Hi David, Would you please contact me regarding the wince7 BSP for the BBB? I have a few LCD Capes...
-- trialsrideraz
Seems MS may have posed a new updated ISO on MSDN. For those without a subscription, you are still out...
-- dvescovi
Re: Power management on the Beaglebone part 2–Battery
Hi David, First of all thanks for this, blog it's been very useful. Before I go ahead and solder anything...
-- Juanes1220
Re: More improvements for Beaglebone BSP
Thank you for the fixes. The latest version builds under WEC7! Yay! Next .. have to try deploying it...
-- OzFlipper
Of course, I meant the WEC2013 SDK ... see what happens when you work with too many bits at the same...
Hi David. First, thank you for what must have been a huge amount of work. I have been trying to install...