The main idea of this exercise is to monitor the heart rate of somebody, and alert somebody else when the heart rate is out of set range.
Part 1. Report heart rate to AWS
I got an ANT+ Heart Rate Sensor and USB ANT+ stick. So I use ANT+ library to receive the heart rate and AWS.IoT.Data library to report to AWS IoT device shadow. Data is like:
{
"state":{
"reported": {
"HeartRate":65
}
}
}
The heart rate is reported every 5 seconds. For testing easily, I added a simulation mode.
Part 2. Set the rule of alerting
Then I set a rule to publish to specific Topic while the heart rate is out of range, here the range is 40 to 180.
Part 3. Alarm
The alarm is a LED controlled by the program runs on Win IoT 10 on Pi 2. The program subscribes to Alarm Topic.
Result
Comments