View previous topic :: View next topic |
Author |
Message |
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Wed Jan 12, 2022 9:23 am Post subject: |
|
|
I think your program is working fine.
It is possible that the sensor is faulty and should be replaced.
Or maybe you purchased a BMP280. |
|
Back to top |
|
|
matjazs
Joined: 08 Nov 2016 Posts: 86
|
Posted: Wed Jan 12, 2022 5:53 pm Post subject: |
|
|
Thanks for the help.
Yes, modules can be defects. I bought them on Aliexpress and replaced all three I have - the same result.
I will also order the BMP280. |
|
Back to top |
|
|
matjazs
Joined: 08 Nov 2016 Posts: 86
|
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Thu Jan 13, 2022 12:39 am Post subject: |
|
|
If the three modules have the same symptoms, I think the one you bought is the BMP280.
BME280: Temperature, humidity, and atmospheric pressure. (ID:60h)
BMP280: Temperature and atmospheric pressure. (ID:58h)
The prices of BME280 and BMP280 are also very different.
I think you bought it by mistake or the seller shipped it by mistake. |
|
Back to top |
|
|
matjazs
Joined: 08 Nov 2016 Posts: 86
|
Posted: Thu Jan 13, 2022 9:12 am Post subject: |
|
|
O-Family thank you.
Yes, you are right. My modules are cheap. That means I have BMP280 and not BME280.
This is also the reason that humidity don't work.
I change &H60 with &H58.
Code: | Temp(1) = &HD0 ' ID register address
I2creceive Slave , Temp(1) , 1 , 1
'ID BME280-&60H BMP280-&H58
If Temp(1) = &H58 Then
Print "Sensor found" ' ID register must return $60
' Lcd_text "Sensor found" , 88 , 120 , Darkgreen , White
Else
Print "Sensor not found"
' Lcd_text "Sensor not found" , 64 , 120 , Red , White
Goto Not_exist
End If |
so it can now recognize the module.
I will now order the BME280.
I have another question.
The pressure must be in the range of 10000 pascal. Which unit is mm? I read about 749 to 751. |
|
Back to top |
|
|
O-Family
Joined: 23 May 2010 Posts: 320 Location: Japan
|
Posted: Thu Jan 13, 2022 10:38 am Post subject: |
|
|
[mm] stands for millimeter of mercury [mmHg].
1 Pascal = 0.00750062 mmHg
If you omit the calculation below, it is the Pascal value.
Pressure = Press * 0.0075006
[XXXXXX]Pa -> [XXXX.XX]hPa |
|
Back to top |
|
|
matjazs
Joined: 08 Nov 2016 Posts: 86
|
Posted: Thu Jan 13, 2022 10:53 am Post subject: |
|
|
Thank you very much for your help. |
|
Back to top |
|
|
|