![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
PULSE_SENSOR_LCD16X2
Dependencies: PulseSensor TextLCD_AND_PULSE_SENSOR
Diff: main.cpp
- Revision:
- 0:8d3802709c6c
- Child:
- 1:52ef36eb7a73
diff -r 000000000000 -r 8d3802709c6c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Nov 12 03:35:57 2017 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "PulseSensor.h" + +Serial pc(USBTX, USBRX); + + +/** Print the data in a format that can be parsed by the + * Processing application available here: http://pulsesensor.myshopify.com/pages/code-and-guide + */ +void sendDataToProcessing(char symbol, int data) +{ + if(symbol == 'B') pc.printf("%c%d\r\n", symbol, data); +} + + + +int main() { + + PulseSensor sensor(A0, sendDataToProcessing); + + pc.baud(115200); + + sensor.start(); + + while(1) { + } +}