I need to find out if changing something in the BME280 library would change the numbers on the display from “mb” to “inHg” or change it by writing a few lines inside the sketch. I looked everywhere to find this question with no luck for the answer. Right now the display shows the number 91800. I have several BME280 sensors and they all shows pretty much the same numbers. it appears that it’s measuring in Pascals.Thanks for your help!
Hey @jcann9960!
Which BME280 board are you using, and which library are you using? It is a popular module and many companies have adapted it with their own PCB/library.
Hi, I am using the BME280 sensor to monitor temperature, humidity and barometric pressure. The library is Adafruit_bme280.h
Hey
From the Adafruit Github, I could not find any mention of “mb”, the pressure is displayed in hPa (hectopascal).
I’m sure I have to write more to my sketch to do a conversion from pascals ti inHg.
Well, if you want to convert hPa to inHg change this line:
Serial.print(bme.readPressure() / 100.0F);
to
Serial.print((bme.readPressure() / 100.0F)*0.03);
One hectopascal is equal to 0.03 inches of mercury (inHg).
Thank you! I knew there was a way I don’t program so it would be difficult
If you are to play around with such modules, I strongly suggest that you learn to program.
We have a short introduction on the subject if you want: https://community.robotshop.com/tutorials/series/arduino-5-minute-tutorials
There are plenty of ressources online to get you started in no time!
I thought doing that but after programming for my wireless weather station, I may never use it again. I’m not much of a computer programmer.
Thanks, works perfectly. Have spent a full 24hrs. looking like [jcann9960]
I’ve got 1 left to change/ altitude from meters to feet, can you help
Hey @Too_old_to_code!
If you simply need to convert meter to feet, you will have to multiply your result in meter by 3.28084
Thats correct but I don’t know exactly how to add it in code.
Someone gave me the 2 // lines but not sure how modify my lower 3 lines with them
//float meters2feet(float meters) {
//return meters * 0.3048;
Serial.print("Approx. Altitude = ");
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(" m");