Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "PulseSensor.h" 00003 00004 Serial pc(USBTX, USBRX); 00005 00006 00007 /** Print the data in a format that can be parsed by the 00008 * Processing application available here: http://pulsesensor.myshopify.com/pages/code-and-guide 00009 */ 00010 void sendDataToProcessing(char symbol, int data) 00011 { 00012 if(symbol == 'B') pc.printf("%c%d\r\n", symbol, data); 00013 } 00014 00015 00016 00017 int main() { 00018 00019 PulseSensor sensor(A0, sendDataToProcessing); 00020 00021 pc.baud(115200); 00022 00023 sensor.start(); 00024 00025 while(1) { 00026 } 00027 }
Generated on Wed Jul 13 2022 19:22:57 by
1.7.2