Vignesh Ganesan
Published © Apache-2.0

Oxygen Saturation Detector in Blood

Configuring the Hexiwear's MAX30101 into SPO2 mode and finding the oxygen saturation level in blood!!

BeginnerWork in progress1 hour2,087
Oxygen Saturation Detector in Blood

Things used in this project

Hardware components

Hexiwear
NXP Hexiwear
×1

Story

Read more

Code

Untitled file

C/C++
#include "mbed.h"
#include "MAX30101.h"


DigitalOut led1(LED_BLUE);

Serial pc(USBTX, USBRX);// Initialize Serial port

MAX30101 SPO2(PTB1, PTB0);

int main() {
    
    pc.printf("MAX301010 sensor test....\r\n\r\n");
    wait(0.5);
    
    SPO2.enable();
    
    while (1) {
        led1 = !led1;
        // Example data printing
        pc.printf("ID 0x%02x\r\n", SPO2.getRevisionID());
        
        Thread::wait(500);
    }
}

Credits

Vignesh Ganesan

Vignesh Ganesan

3 projects • 13 followers
Student(Engineer) Socialist, Ideologist & Sports freak!!

Comments