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 ...
Below is the code corresponding to this video. For ESP32 C-code, start with Arduino sketches for the ESP32 Camera board as the template; this will make life much easier as the sketches will include the dependencies... you just need to modify the .ino file with the new code. Also, you will want to make sure you have the latest ESP32 files installed through the Arduino IDE boards manager - there may be some incompatibilities with the camera configuration options otherwise. Available from "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json". ESP32 C-Code for upload using Arduino IDE: Master ESP32 Camera Code: // Tinker Foundry // Master camera device // C-Code for ESP32 Stereo camera example - this is Master device code // Connect to slave ESP32 camera device via Serial2 UART (RXD2 and TXD2) for device to device image data transfer // Takes serial input from Serial interface to capture images and read back #include <dummy.h> #inclu...
Comments
Post a Comment