Hi! I’m Fernando Fonseca, I’m trying to compile the example code for the Bar30 pressure sensor in Arduino Mega but I have this error:
"In file included from pressure_sensor_test.ino:2:0:C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:44:9: error: 'constexpr' does not name a type static constexpr float Pa = 100.0f; ^C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:44:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:45:9: error: 'constexpr' does not name a type static constexpr float bar = 0.001f; ^C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:45:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:46:9: error: 'constexpr' does not name a type static constexpr float mbar = 1.0f; ^C:\Users\Fernando\Documents\Arduino\libraries\BlueRobotics_MS5837_Library-master/MS5837.h:46:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11Error de compilación"
It compiles for Arduino Due but not for Arduino MEGA, How can I solve It?
i´m trying with the arduino mega too, and have the same errors of Fonz. what is the level converter?do someone have a video making proof with the sensor?my email is chaviv_85@hotmail.com
Please make sure you are using the most recent version of Arduino for it to compile correctly.
The level converter changes the 5V signal level from the Arduino to 3.3V signal level for the sensor. This is required as the sensor is not rated to handle 5V signals. Here is a level converter that will work well:
What exactly do you want a video of? Can you explain?
The Arduino has a 3.3V pin, but that is for power only. The SDA and SCL signals for I2C are still sent at 5V, which could damage the sensor. I know it’s a bit confusing, but I would strongly recommend getting a logic level converter.
That is a cool video. We’ll try to get something similar. We frequently test them in a cup of water and you can clearly and accurately measure the depth of the cup.
We’ll try to make that more clear on our product page! We’re also working on a custom level converter that you can plug the sensor directly into. That’ll make it much easier.