Advertisement
pleasedontcode

Health Monitoring System

Aug 14th, 2024
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.52 KB | Source Code | 0 0
  1. #include <Wire.h>
  2. #include <Adafruit_Sensor.h>
  3. #include <PulseOximeter.h>
  4. #include <BluetoothSerial.h>
  5.  
  6. PulseOximeter pox;
  7. BluetoothSerial SerialBT;
  8.  
  9. void setup() {
  10.   Serial.begin(115200);
  11.   SerialBT.begin("HealthMonitor");
  12.   pox.begin();
  13. }
  14.  
  15. void loop() {
  16.   pox.update();
  17.   float heartRate = pox.getHeartRate();
  18.   float oxygenLevel = pox.getSpO2();
  19.  
  20.   SerialBT.print("Heart Rate: ");
  21.   SerialBT.println(heartRate);
  22.   SerialBT.print("Oxygen Level: ");
  23.   SerialBT.println(oxygenLevel);
  24.  
  25.   delay(1000);
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement