Problem with library installation

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

Why not install the library using the IDE library manager? That is the most reliable way to install libraries.

How to install Arduino libraries .(version 2 or later).

I tried that too but it didn't work

The only idea - you installed the library incorrectly.

Please indicate where you installed the library? (show the path)
Could you provide the screenshot of the filemanager with library folder open?

thanks
And inside the folder

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.

1 Like

Τ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);
}

I see, you didn't understand. The folder name has nothing to do with the problem.

The library you use doesn't contain a file SparkFun_MAX3010x.h. So the include in the beginning of your code is incorrect:

Consult the library examples to see the correct way to include the library.

Now i understand .Thank you for your help

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.