Skip to content

skruglewicz/MyBPM

Repository files navigation

Beats Per Minute (High-level app)

This application demonstrates how I connected a Heart Rate Sensor to the net Azure Sphere MT3620 Starter Kit and display Beats Per Minute on an attached OLED Display. The application samples and displays the output from The heart Rate sensor. It uses the MT3620 analog-to-digital converter (ADC) to sample the signal.

The sample uses the following Azure Sphere libraries and requires beta APIs.

Library Purpose
adc Manages ADCs
log Displays messages in the Visual Studio Device Output window during debugging
eventloop Invoke handlers for timer events

Contents

File/folder Description
ADC_HighLevelApp Source code and project files
README.md This readme file
Hardware Azure Sphere Hardware Definition

Prerequisites

The sample requires the following hardware:

Avnet Azure Sphere MT3620 Starter Kit

Heart Sensor

SSD1306 128x64 Yellow Blue SSD1306 I2C OLED Display eg. this one for $6.99 from Amazon...

Note: By default, this sample targetsAvnet Azure Sphere MT3620 Starter Kit hardware. To build the sample for different Azure Sphere hardware, change the Target Hardware Definition Directory in the project properties. For detailed instructions, see the README file in the Hardware folder.

Prepare the sample

  1. Ensure that your Azure Sphere device is connected to your computer, and your computer is connected to the internet.

  2. Even if you've performed this setup previously, ensure that you have Azure Sphere SDK version 20.01 or above. At the command prompt, run azsphere show-version to check. Install the Azure Sphere SDK for Windows or Linux as needed.

  3. Enable application development, if you have not already done so, by entering the following line at the command prompt:

    azsphere device enable-development

  4. Clone the Beats Per Minute repo and find the ADC_HighLevelApp sample in the ADC folder.

Set up the ADC connections

Attach 3 leads tfrom the Heart Rate Sensor o following 3  pins on the Click 1 header.
AN -- Purple
+5v -- 5V - RED
GND -- GND BLACK

Build and run the sample

See the following Azure Sphere Quickstarts to learn how to build and deploy this sample:

Observe the output

Remote debugging from host 192.168.35.1, port 65262 ADC application starting. OLED found! 2 77 0 600 -1000 4 76 0 600 -1000 6 76 0 600 -1000 8 75 0 600 -1000 10 78 0 600 -1000 12 76 0 600 -1000

About

ELEMENT14 Contest entry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages