This project demonstrates a real-time system for monitoring heart rate (bpm) โค๏ธ and blood oxygen levels (SpO2) ๐ฉธ using the MAX30100 pulse oximeter sensor, ESP32 microcontroller, and Firebase Realtime Database โ๏ธ. The system reads health metrics, sends the data to Firebase, and allows cloud storage and visualization.

- 
Sensor Integration ๐๏ธ:
- The MAX30100 sensor is initialized to collect heart rate and SpO2 data.
 - A callback function detects heartbeats and updates readings.
 
 - 
Connectivity ๐ก:
- The ESP32 is configured to connect to a Wi-Fi network.
 - Firebase is integrated for data storage.
 
 - 
Data Transmission ๐:
- Sensor readings are checked for validity.
 - Valid data is transmitted to Firebase at regular intervals (every 2 seconds).
 
 - 
Visualization ๐:
- Data stored in Firebase can be visualized using Firebase's integrated dashboard or third-party analytics tools.
 
 
- ๐ ESP32 Dev Kit
 - ๐ฉบ MAX30100 Pulse Oximeter Sensor
 - ๐ช Jumper Wires
 - โ๏ธ Breadboard
 
| ESP32 Pin | MAX30100 Pin | 
|---|---|
| 3.3V | VCC | 
| GND | GND | 
| SDA (GPIO21) | SDA | 
| SCL (GPIO22) | SCL | 
- 
Hardware Setup ๐งฉ:
- Connect the MAX30100 sensor to the ESP32 as per the pin diagram.
 - Ensure secure and proper connections.
 
 - 
Software Setup ๐ป:
- Install the required libraries:
FirebaseESP32๐ฅMAX30100_PulseOximeter๐
 - Update the Wi-Fi and Firebase credentials in the code.
 - Upload the code to the ESP32 using the Arduino IDE.
 
 - Install the required libraries:
 - 
Firebase Setup ๐:
- Create a Firebase project.
 - Set up a Realtime Database and copy its URL.
 - Obtain the database secret (legacy token) for authentication.
 
 - 
Run the System ๐:
- Power the ESP32.
 - Monitor the serial output for sensor readings and Firebase updates.
 
 
- Integration with Mobile Applications ๐ฑ:
- Create a mobile app for real-time health monitoring.
 
 - Advanced Analytics ๐ค:
- Utilize machine learning to analyze trends in health data.
 
 - Wearable Device โ:
- Design a compact, battery-operated wearable version of the system.
 
 - Additional Metrics ๐:
- Include more sensors to track other health parameters like blood pressure.
 
 
- Real-time Monitoring โฑ๏ธ: Logs and displays SpO2 and heart rate data continuously.
 - Cloud Storage โ๏ธ: Data is securely stored and accessible via Firebase.
 - Scalability ๐ ๏ธ: The project can be extended to multiple users with minimal changes.
 
- Sensor Initialization โก:
- Issue: MAX30100 sensor failed to initialize properly.
 - Solution: Verified wiring and ensured the library was correctly installed.
 
 - Firebase Integration ๐:
- Issue: Data upload failed during testing.
 - Solution: Confirmed correct Firebase credentials and ensured stable Wi-Fi.
 
 

