Pressure sensor program example won't compile

I have the proper MS5837 master_ library in my Arduino library folder, but I keep getting a compile error. Has anyone actually run the sensor program yet?

What is your error? You should delete the ‘-master’ part from the directory.

-Jacob

This is the file I downloaded from GitHub into the Arduino library:

BlueRobotics_MS5837_Library_master.

I get a “compile error” as soon as the compiler sees this: #include “MS5837.h”

Have you run the example program? Did it work for you?

Thanks, Richard

Can you see the BR library from the arduino menu File->Examples?

I have not run the program, and my ide on this computer doesn’t support c11 so I have some other issues with compiling, but it finds MS5837.h just fine.

Hi Richard,

Can you try downloading the library from the Arduino Library Manager? Go to Sketch > Include Library > Manage Libraries…, then search for “MS5837”. Our library will show up and you can install if from there.

If you’d like to continue with the current path, then please send the compile error so we can figure out what is wrong.

-Rusty

@Rusty-

"Can you try downloading the library from the Arduino Library Manager? Go to Sketch > Include Library > Manage Libraries…, then search for “MS5837”. Our library will show up and you can install if from there. "

Not there!

Here’s my directory:

This PC>Documents>Arduino>libraries>
BlueRobotics_MS5837_Library-master

MS5837 H File

I run the Adafruit LSM303 compass library from this directory just fine.

The compile error is exit status 1

Thanks, Richard

p.s. How do I keep from getting a double space in posts when I press Enter for a new line?

 

Please, I need some help here.

Let me know if you can see the library from the arduino file menu. Also paste the entire output from the console when you try to compile. exit status 1 just means that the compiler returned an error, what the error actually is, will be mentioned somewhere above that line.
-Jacob

@Richard,

What version of Arduino are you using?

As Jacob said, please try to copy and paste the entire build error or take a screenshot so that we can see what the error is.

Best,

Rusty

I am using version 1.6.7 of the IDE.

<span style=“color: #000000; font-family: Calibri;”>Arduino: 1.6.7 (Windows 10), Board: “Arduino Mini, ATmega328”</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”>C:\Users\richa\OneDrive\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master\examples\MS5837_Example\MS5837_Example.ino:38:20: fatal error: MS5837.h: No such file or directory</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”> #include “MS5837.h”</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”> ^</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”>compilation terminated.</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”>exit status 1</span>

<span style=“color: #000000; font-family: Calibri;”>Error compiling.</span>

<span style=“color: #000000; font-family: Calibri;”> </span>

<span style=“color: #000000; font-family: Calibri;”> This report would have more information with</span>

<span style=“color: #000000; font-family: Calibri;”> “Show verbose output during compilation”</span>

<span style=“color: #000000; font-family: Calibri;”> enabled in File > Preferences.</span>

 

Rusty/Jacob,

When I follow the directory path stated in the compile error I find MS5837.h just fine. I don’t understand why the compiler is not seeing it.

Richard

Try changing line 38 to
#include “C:\Users\richa\OneDrive\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master\MS5837.h”

Still get a compile error:

#include expects “FILENAME” or <FILENAME>”

Do you have quotation marks around the path, exactly like in my post above? If so, delete them and type them again. If you copied and pasted from my post, the character code is different for the quotation marks in the post, and those that the compiler expects. (make sure the quotes are straight up and down lines, and not the curly stylized quotes)

Still gives me the same error! Should also work with < … >, but doesn’t.

I went to properties for the MS5837 file and the path shown is exactly what we’re trying.

Another issue is why the IDE is not recognizing this in the libraries manager.

 

Richard,

I have a couple more things to check.

  1. What board do you have selected during compilation? (In the Tools > Boards menu)

  2. Can you turn on verbose compile output in the setting menu? Attached is what that looks like in my IDE on Mac.

I’m not sure why you don’t see the libraries in the library manager. I just installed a fresh copy of Arduino and installed the library from the manager. It compiled for Arduino Uno just fine.

-Rusty

I have solved the problem. Thank you for your assistance. I was choosing “open” for the Github download, which automatically unzips the file and places it in the Downloads directory, which makes it unavailable to the IDE library. By leaving it as a zip file and letting the IDE library manager unzip the file it is properly placed in the library. I am new to using Windows 10, which I like okay, but I am still on a learning curve with respect to files management. Aaaargh!

Glad to hear it! I’m still curious why it wasn’t in the Arduino Library Manager…

-Rusty

Rusty,

What is an MS5837-30BA library? This now exists on the IDE library menu titled “Contributed libraries”. Even though I have erased all MS5837 associated files from my computer this “library” still exists with no associated files in my directories. If I click on it a #include <MS5837.h> statement is automatically inserted in the current program being edited, and it compiles fine.

This whole thing with library management is a mess, that I don’t understand.

Hi Richard,

If the library is showing up in the “Contributed Libraries” section then it is probably still in your Arduino libraries folder. If you imported the library into Arduino as a zip file then it copies that library to the libraries folder.

I think you’ll find the files there and you can delete them if you want to remove the library.

-Rusty