Bradley Kohler
/
PulseRate
MAX30100 pulse rate sensor
main.cpp
- Committer:
- kohlerba
- Date:
- 2017-08-23
- Revision:
- 2:d329886938f1
- Parent:
- 0:faf977308bdc
- Child:
- 3:fa37b0c705b3
File content as of revision 2:d329886938f1:
#include "mbed.h" #include "MAX30100.h" DigitalOut led(LED1); Serial pc(USBTX, USBRX); // tx, rx MAX30100 max; int main() { max.begin(pw1600, i50, sr100); max.setLEDs(pw1600, i27, i50); int partID = max.getPartID(); if(partID == POR_PART_ID){ pc.printf("MAX30100 is online...\n\r"); } else{ pc.printf("MAX30100 is offline...\n\r"); pc.printf("Value is %d\n\r",partID); pc.printf("Should be %d\n\r",POR_PART_ID); while(1){ wait(1); } } int revID = max.getRevID(); pc.printf("RevID is %d\n\r",revID); //max.setLEDs(pw1600, i50, i14); return 1; }