Emily Lam
Created April 10, 2020 © MIT

My Heartbeat

My Heartbeat uses real time heart beat information to detect irregular heartbeats and cool down users experiencing hot flashes.

AdvancedWork in progress3 hours24
My Heartbeat

Things used in this project

Hardware components

Echo Show (2nd Gen)
Amazon Alexa Echo Show (2nd Gen)
×1
Amazon Alexa Echo Buttons
×1

Software apps and online services

Alexa Skills Kit
Amazon Alexa Alexa Skills Kit

Story

Read more

Schematics

My Heartbeat

Code

Start Fan

JavaScript
This is a GET call that uses a virtual button to an Amazon Alexa routine to turn on the fan which is connected to a WeMo switch.
    function startFan(){
        var ACCESS_CODE = JSON.parse('<%- accessCode %>');

        var xhr = new XMLHttpRequest();
        var url = "https://api.virtualbuttons.com/v1?virtualButton=1&accessCode=" + ACCESS_CODE;

        xhr.onreadystatechange = function () {
            if (this.readyState != 4) return;

            if (this.status == 200) {
                var data = JSON.parse(this.responseText);
            }
        };

        xhr.open('GET', url, true);
        xhr.send();
    }

heartbeat.json

JSON
Data from Fitbit Intraday Heartbeat API
[{
    "dateTime" : "02/17/15 05:28:10",
    "value" : {
      "bpm" : 91,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:28:25",
    "value" : {
      "bpm" : 91,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:28:30",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:28:40",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:28:55",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:00",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:15",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:20",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:35",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:40",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:29:50",
    "value" : {
      "bpm" : 91,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:30:05",
    "value" : {
      "bpm" : 92,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:30:15",
    "value" : {
      "bpm" : 92,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:30:20",
    "value" : {
      "bpm" : 91,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:30:30",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:30:45",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:30:50",
    "value" : {
      "bpm" : 92,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:00",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:10",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:20",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:30",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:45",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:31:50",
    "value" : {
      "bpm" : 87,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:00",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:10",
    "value" : {
      "bpm" : 87,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:20",
    "value" : {
      "bpm" : 86,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:30",
    "value" : {
      "bpm" : 87,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:45",
    "value" : {
      "bpm" : 87,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:32:50",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:33:00",
    "value" : {
      "bpm" : 89,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:33:10",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:33:25",
    "value" : {
      "bpm" : 90,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:33:30",
    "value" : {
      "bpm" : 88,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:33:40",
    "value" : {
      "bpm" : 88,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:33:55",
    "value" : {
      "bpm" : 89,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:34:05",
    "value" : {
      "bpm" : 91,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:34:15",
    "value" : {
      "bpm" : 92,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:34:20",
    "value" : {
      "bpm" : 109,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:34:25",
    "value" : {
      "bpm" : 114,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:34:30",
    "value" : {
      "bpm" : 114,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:34:35",
    "value" : {
      "bpm" : 115,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:34:40",
    "value" : {
      "bpm" : 113,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:34:45",
    "value" : {
      "bpm" : 115,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:34:50",
    "value" : {
      "bpm" : 116,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:35:05",
    "value" : {
      "bpm" : 116,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:35:10",
    "value" : {
      "bpm" : 115,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:35:15",
    "value" : {
      "bpm" : 113,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:35:20",
    "value" : {
      "bpm" : 108,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:35:25",
    "value" : {
      "bpm" : 99,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:35:30",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:35:35",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:35:45",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:35:50",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:35:55",
    "value" : {
      "bpm" : 79,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:36:00",
    "value" : {
      "bpm" : 80,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:36:05",
    "value" : {
      "bpm" : 82,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:36:10",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:36:15",
    "value" : {
      "bpm" : 83,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:36:25",
    "value" : {
      "bpm" : 82,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:36:30",
    "value" : {
      "bpm" : 85,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:36:35",
    "value" : {
      "bpm" : 87,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:36:45",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:36:55",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:05",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:10",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:15",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:20",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:25",
    "value" : {
      "bpm" : 82,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:37:30",
    "value" : {
      "bpm" : 87,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:37:35",
    "value" : {
      "bpm" : 92,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:37:45",
    "value" : {
      "bpm" : 94,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:37:50",
    "value" : {
      "bpm" : 93,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:00",
    "value" : {
      "bpm" : 94,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:05",
    "value" : {
      "bpm" : 93,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:10",
    "value" : {
      "bpm" : 90,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:15",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:20",
    "value" : {
      "bpm" : 95,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:25",
    "value" : {
      "bpm" : 96,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:38:30",
    "value" : {
      "bpm" : 96,
      "confidence" : 0
    }
  },{
    "dateTime" : "02/17/15 05:38:35",
    "value" : {
      "bpm" : 93,
      "confidence" : 0
    }
  },{
    "dateTime" : "02/17/15 05:38:45",
    "value" : {
      "bpm" : 110,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:38:50",
    "value" : {
      "bpm" : 111,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:38:55",
    "value" : {
      "bpm" : 112,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:39:10",
    "value" : {
      "bpm" : 112,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:39:15",
    "value" : {
      "bpm" : 111,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:39:20",
    "value" : {
      "bpm" : 110,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:39:25",
    "value" : {
      "bpm" : 116,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:30",
    "value" : {
      "bpm" : 108,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:35",
    "value" : {
      "bpm" : 107,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:40",
    "value" : {
      "bpm" : 97,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:45",
    "value" : {
      "bpm" : 101,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:50",
    "value" : {
      "bpm" : 96,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:39:55",
    "value" : {
      "bpm" : 100,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:00",
    "value" : {
      "bpm" : 101,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:05",
    "value" : {
      "bpm" : 96,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:10",
    "value" : {
      "bpm" : 91,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:15",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:20",
    "value" : {
      "bpm" : 92,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:30",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:35",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:40",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:45",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:50",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:40:55",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:00",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:05",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:10",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:15",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:25",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:35",
    "value" : {
      "bpm" : 87,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:41:40",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:41:45",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:00",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:05",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:10",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:15",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:30",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:35",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:40",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:45",
    "value" : {
      "bpm" : 91,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:50",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:42:55",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:00",
    "value" : {
      "bpm" : 80,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:05",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:10",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:25",
    "value" : {
      "bpm" : 83,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:30",
    "value" : {
      "bpm" : 82,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:40",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:45",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:50",
    "value" : {
      "bpm" : 91,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:43:55",
    "value" : {
      "bpm" : 93,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:00",
    "value" : {
      "bpm" : 94,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:05",
    "value" : {
      "bpm" : 95,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:10",
    "value" : {
      "bpm" : 94,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:15",
    "value" : {
      "bpm" : 93,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:20",
    "value" : {
      "bpm" : 94,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:30",
    "value" : {
      "bpm" : 93,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:35",
    "value" : {
      "bpm" : 92,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:40",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:50",
    "value" : {
      "bpm" : 89,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:44:55",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:00",
    "value" : {
      "bpm" : 82,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:10",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:15",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:20",
    "value" : {
      "bpm" : 86,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:45:25",
    "value" : {
      "bpm" : 86,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:45:30",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:45",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:50",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:45:55",
    "value" : {
      "bpm" : 86,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:46:00",
    "value" : {
      "bpm" : 87,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:46:05",
    "value" : {
      "bpm" : 90,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:46:10",
    "value" : {
      "bpm" : 84,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:46:25",
    "value" : {
      "bpm" : 83,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:46:30",
    "value" : {
      "bpm" : 85,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:46:35",
    "value" : {
      "bpm" : 86,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:46:40",
    "value" : {
      "bpm" : 85,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:46:45",
    "value" : {
      "bpm" : 85,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:46:50",
    "value" : {
      "bpm" : 86,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:46:55",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:47:00",
    "value" : {
      "bpm" : 90,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:47:05",
    "value" : {
      "bpm" : 91,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:47:10",
    "value" : {
      "bpm" : 90,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:47:15",
    "value" : {
      "bpm" : 88,
      "confidence" : 1
    }
  },{
    "dateTime" : "02/17/15 05:47:20",
    "value" : {
      "bpm" : 101,
      "confidence" : 3
    }
  },{
    "dateTime" : "02/17/15 05:47:25",
    "value" : {
      "bpm" : 103,
      "confidence" : 2
    }
  },{
    "dateTime" : "02/17/15 05:47:35",
    "value" : {
      "bpm" : 104,
...

This file has been truncated, please download it to see its full contents.

Analyze heartbeat

JavaScript
Analyze the heartbeat data
// Analyze heartbeat
function analyzeHeartbeat(){
    var NOTIFY_CODE = JSON.parse('<%- notifyCode %>');
    var chartData = chart.data.datasets[0].data;
    var sum = chartData[chartData.length - 1];
    for (let i = chartData.length - 2 ; i > chartData.length - 6; i--) {
        sum += chartData[i];
    }
    var average = Math.floor(sum/5);

    var msg = "Over the past five readings your average heart rate is " + average + " bpm. It is more elevated than usual. If you continue to experience irregular heart beats please consult a doctor.";

    document.getElementById('heartbeatMsg').innerHTML = msg;
};

My Heartbeat

Credits

Emily Lam

Emily Lam

4 projects • 0 followers

Comments