Sensor MS5837 Compile Error

Although Richard had a similar topic, my issue seems different so I created a new topic. I am running an Arduino Mega2560 using Arduino 1.0.6.

I receive the following error when I try to compile the pressure sensor example code:

error: ISO C++ forbids declaration of ‘constexpr’ with no type

error: expected ‘;’ before ‘float’

It seems like the error starting in the MS5837.h library. One thing I noticed is that the sensor library calls out the arduino.h library which I do not have. I thought about loading the arduino library, but it specifies a half dozen more libraries.

I’m hoping there is an easy solution to declare the ‘constexpr’ type without loading more libraries.

Any ideas?

Hi Terry,

Is it possible to use a newer version of the Arduino software? They’ve made some big changes since 1.0.6. If not, there are some quick modifications that can be made to the library to fix this.

Let me know if you’d like me to explain those.

Best,

Rusty

Rusty,

The updated Arduino software did the trick.

Thanks.

 

Terry