Find file History
Latest commit d255227 Jan 4, 2017 @abock abock HeartRateMonitor: add features, fix bugs!
This is a general overhaul of the sample code with a few major
highlights:

  1. Refactor HeartRateMonitor such that it no longer directly
     derives from CBPeripheralDelegate; this ensures the public
     delegate API does not _bleed_ into HRM wrapper object API,
     yielding a cleaner public API. This also corrects a possible
     delegate disposal issue. Should fix:
       https://bugzilla.xamarin.com/show_bug.cgi?id=49285

  2. Only create HeartRateMonitor objects when actually connecting
     to a peripheral, and ensure that only one instance of a
     peripheral is added to the peripheral list. Previously when
     any discovery event occurred, the same peripheral may have
     been added to the list multiple times, with each addition
     creating a new HeartRateMonitor for the peripheral again.

  3. Add some console logging for the major BTLE events.

  4. Add UI for showing RSSI. This helped me determine that my HRM
     was actually junked over the years I've had it, so I bought a
     new one.

  5. Added a disconnect button.

  6. Use C# 6 features in areas where refactoring took place, clean
     up white space issues.
Permalink
..
Failed to load latest commit information.
Resources Added HeartRateMonitor sample Aug 9, 2013
Screenshots
AppDelegate.cs Mac samples migrated to unified Nov 21, 2014
AppDelegate.designer.cs Mac samples migrated to unified Nov 21, 2014
HeartBeat.cs
HeartBeatEventArgs.cs
HeartRateMonitor.cs
HeartRateMonitor.csproj Mac samples migrated to unified Nov 21, 2014
HeartRateMonitor.sln Added HeartRateMonitor sample Aug 9, 2013
HeartRateMonitorLocation.cs Added HeartRateMonitor sample Aug 9, 2013
HeartRateMonitorTableDataSource.cs HeartRateMonitor: add features, fix bugs! Jan 4, 2017
Info.plist Mac samples migrated to unified Nov 21, 2014
Main.cs Mac samples migrated to unified Nov 21, 2014
MainMenu.xib Added HeartRateMonitor sample Aug 9, 2013
MainWindow.cs Mac samples migrated to unified Nov 21, 2014
MainWindow.designer.cs
MainWindow.xib HeartRateMonitor: add features, fix bugs! Jan 4, 2017
MainWindowController.cs
Metadata.xml
README.md Updated Mac Samples README files Aug 20, 2014

README.md

HeartRateMonitor

The CoreBluetooth framework provides the classes needed for your iOS and Mac apps to communicate with devices that are equipped with Bluetooth low energy wireless technology, such as heart rate monitors, cycling cadence sensors, and temperature monitors.

This sample demonstrates: discovering, connecting to, and retrieving heart rate data from Bluetooth LE heart rate monitors.

It shows the location of the monitor (chest, wrist, foot, etc.), the current heart rate in beats per minute, and animates a heart beating at the same speed reported by the connected device.