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 |
File/folder | Description |
---|---|
ADC_HighLevelApp | Source code and project files |
README.md | This readme file |
Hardware | Azure Sphere Hardware Definition |
The sample requires the following hardware:
• Avnet Azure Sphere MT3620 Starter Kit
• 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.
-
Ensure that your Azure Sphere device is connected to your computer, and your computer is connected to the internet.
-
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.
-
Enable application development, if you have not already done so, by entering the following line at the command prompt:
azsphere device enable-development
-
Clone the Beats Per Minute repo and find the ADC_HighLevelApp sample in the ADC folder.
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
See the following Azure Sphere Quickstarts to learn how to build and deploy this sample:
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