SpO2Algorithm.h
Arduino/SpO2Algorithm.h
#ifndef SPO2_ALGORITHM_H
#define SPO2_ALGORITHM_H
#include <stdint.h>
#define SPO2_BUFFER_SIZE 100
class SpO2Algorithm {
public:
SpO2Algorithm();
void addSample(uint32_t red, uint32_t ir);
uint8_t getSpO2();
bool isDataReady();
void reset();
private:
uint32_t _redBuffer[SPO2_BUFFER_SIZE];
uint32_t _irBuffer[SPO2_BUFFER_SIZE];
uint8_t _bufferIndex;
bool _dataReady;
float calculateRatio();
float calculateACComponent(uint32_t *buffer);
float calculateDCComponent(uint32_t *buffer);
};
#endif
Articles liés
lv_conf.h
lv_conf.h — c source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/lv_conf.h).
Lire l'article →2.4_max30102.cpp
2.4_max30102.cpp — cpp source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/src/Combination/2.4_and_max30102_test/2.4_max30102.cpp).
Lire l'article →bluetooth.cpp
bluetooth.cpp — cpp source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/src/Test_components/bluetooth_test/bluetooth.cpp).
Lire l'article →ec11.cpp
ec11.cpp — cpp source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/src/Test_components/button_test/ec11.cpp).
Lire l'article →1.69_inch_display.cpp
1.69_inch_display.cpp — cpp source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/src/Test_components/display_test/1.69_inch_display/1.69_inch_display.cpp).
Lire l'article →2.4_inch_display.cpp
2.4_inch_display.cpp — cpp source code from the Arduino learning materials (Arduino/CCIT4080_CL05_PKPD_Group2/src/Test_components/display_test/2.4_inch_display/2.4_inch_display.cpp).
Lire l'article →