Heart rate monitoring system design using FRDM K64F and MIT App Inventor II
Dependencies: ESP8266 GroveEarbudSensor mbed
Fork of Heart-rate-monitor by
Diff: main.cpp
- Revision:
- 5:f1b55ff3cda0
- Parent:
- 4:df7309612854
- Child:
- 6:37829af7bfbd
--- a/main.cpp Fri Sep 26 02:39:13 2014 +0000 +++ b/main.cpp Wed Oct 01 21:35:54 2014 +0000 @@ -20,10 +20,6 @@ #include "mbed.h" -// Console -#include "BufferedSerial.h" -BufferedSerial pc(USBTX,USBRX); - // Blinky DigitalOut led(LED1); @@ -35,30 +31,30 @@ // callback for receiving heartrate values void heartrateCallback(float heartrate,void *data) { - pc.printf("Callback: heartrate = %.1f\r\n",heartrate); + printf("Callback: heartrate = %.1f\r\n",heartrate); } int main() { // announce - pc.printf("Grove Earbud Sensor Example v1.0.0\r\n"); + printf("Grove Earbud Sensor Example v1.0.0\r\n"); // allocate the earbud sensor - pc.printf("Allocating earbud sensor instance...\r\n"); + printf("Allocating earbud sensor instance...\r\n"); GroveEarbudSensor earbud(&sensor); // register our callback function - pc.printf("registering callback...\r\n"); + printf("registering callback...\r\n"); earbud.registerCallback(heartrateCallback); // begin main loop - pc.printf("Beginning main loop...\r\n"); + printf("Beginning main loop...\r\n"); while (true) { // blink... led = !led; wait(0.5); // we can also call directly - //pc.printf("Direct: heartrate = %.1f\r\n",earbud.getHeartRate()); + //printf("Direct: heartrate = %.1f\r\n",earbud.getHeartRate()); } } \ No newline at end of file