ESP32 Based Pulse-Oximeter using MAX30102
Code for Arduino IDE used in the video is listed below. It targets the Wemos D1 R32 ESP32 board, but can be modified to suit. // Tinker Foundry // Accompanying video: https://youtu.be/xjwSKy6jzTI // Code for ESP32 to interface with MAX30102 breakout board and report blood oxygen level // Refer to https://github.com/DKARDU/bloodoxygen - below code is simplified version // https://www.analog.com/media/en/technical-documentation/data-sheets/MAX30102.pdf // Connections from WEMOS D1 R32 board to MAX30102 Breakout Board as follows: // SCL (ESP32) to SCL (breakout board) // SDA (ESP32) to SDA (breakout board) // 3V3 (ESP32) to VIN (breakout board) // GND (ESP32) to GND (breakout board) #include <Wire.h> #include "MAX30105.h" //sparkfun MAX3010X library MAX30105 particleSensor; double avered = 0 ; double aveir = 0 ; double sumirrms = 0 ; double sumredrms = 0 ; int i = 0 ; int Num = 100 ; // calculate SpO2 by this sampling interval int
Comments
Post a Comment