I download the #include<SparkFun_MAX3010x.h> library manually following the instructions but it keeps showing me this message C:\Users\chrysa\Documents\Arduino\test_black3\test_black3.ino:2:10: fatal error: SparkFun_MAX3010x.h: No such file or directory #include <SparkFun_MAX3010x.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: SparkFun_MAX3010x.h: No such file or directory.
Any idea what could be wrong
Navigate into the directory that you showed in post #5; is there a file called SparkFun_MAX3010x.h? The answer is "No" !!
Next look at the examples that come with the library; I did check one and it includes MAX30105.h !!
PS
Next time please post your code when you get errors. Instructions how to post code (and error messages) correctly using code tags can be found in How to get the best out of this forum; please read it again.
Τhank you for your help. I changed the name of the folder, but despite this, it still doesn't show the correct name in manage libraries and it keeps showing the same error.I also write my code below.
#include <Wire.h>
#include <SparkFun_MAX3010x.h>
#include <SoftwareSerial.h>
// Create an instance of the MAX3010x library
SparkFun_MAX3010x particleSensor;
// Create a SoftwareSerial instance for Bluetooth communication
SoftwareSerial BTserial(2, 3); // RX, TX
void setup() {
// Initialize the serial communication for debugging
Serial.begin(9600);
// Initialize the Bluetooth communication
BTserial.begin(9600);
// Initialize the MAX3010x library
if (particleSensor.begin() != true) {
Serial.println("MAX3010x sensor not found.");
while (1) {
delay(10);
}
}
// Configure the sensor
particleSensor.setup();
particleSensor.setMode(SPARKFUN_MAX3010x_MODE_HR_SPO2);
particleSensor.setLEDCurrent(SPARKFUN_MAX3010x_LED_CURR_7_6MA);
particleSensor.setSampleAveraging(SPARKFUN_MAX3010x_SAMPLEAVG_8);
particleSensor.setLEDMode(SPARKFUN_MAX3010x_LED_MODE_RED_IR_ON);
particleSensor.setFilterMode(SPARKFUN_MAX3010x_FILTER_MODE_IIR_4X);
}
void loop() {
// Check if there is any data available
if (particleSensor.available()) {
// Read the heart rate and blood oxygen level
uint32_t hr = particleSensor.getHeartRate();
uint32_t spo2 = particleSensor.getSpO2();
// Print the data to the serial monitor
Serial.print("Heart rate: ");
Serial.print(hr);
Serial.print(" bpm / SpO2: ");
Serial.print(spo2);
Serial.println(" %");
// Print the data to the Bluetooth module
BTserial.print("Heart rate: ");
BTserial.print(hr);
BTserial.print(" bpm / SpO2: ");
BTserial.print(spo2);
BTserial.println(" %");
}
// Wait for a short period of time before checking again
delay(100);
}