BMP280 when reading pressure, it's reading Temp and pressure

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
lucibel
Posts: 172
http://meble-kuchenne.info.pl
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

I checked with logic analyser and it show that BMP280 component is reading both Pressure and Temperature when request is to read pressure only. But only pressure data are store.
Pressure read.jpg
Pressure read.jpg (34.58 KiB) Viewed 2982 times
Pressure R.jpg
Pressure R.jpg (17.21 KiB) Viewed 2982 times
while for the temperature it is good, only the temperature is read.
Temperature read.jpg
Temperature read.jpg (38.63 KiB) Viewed 2982 times
Can be good to have a new macro able to read both temperature and pressure in same time :D
Seb

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by medelec35 »

Hi Seb.
Thanks for the good spot.
I have updated the BMP280 to just read pressure and attached the component for you to try.
The comment should be placed in C:\ProgramData\MatrixTSL\FlowcodeV9\Components
If you are happy with the component, I will arrange for it to be pushed onto the update system.
Attachments
Grove_Barometer_Sensor_BMP280.fcpx
(7.83 KiB) Downloaded 92 times
Martin

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

Hi,
It work's but why there is 5 Val now?
5 Val.jpg
5 Val.jpg (37.72 KiB) Viewed 2974 times
Seb

kersing
Valued Contributor
Posts: 162
Joined: Wed Dec 02, 2020 7:28 pm
Has thanked: 66 times
Been thanked: 58 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by kersing »

medelec35 wrote:
Thu Feb 17, 2022 11:18 am
I have updated the BMP280 to just read pressure
Is that a valid option? I seem to recall the temperature is required for compensation calculations but may-be I’m mixing up devices…

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

Need Pressure, altitude pressure and temperature of course.
As you can see on the picture I sent to you there is 5 Val form Val0 to Val5, why ?
5 Val.jpg
5 Val.jpg (44.89 KiB) Viewed 2965 times
Last edited by lucibel on Thu Feb 17, 2022 2:24 pm, edited 1 time in total.
Seb

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

I understand your meaning Now !
Is that a valid option? I seem to recall the temperature is required for compensation calculations but may-be I’m mixing up devices…
I'm checking !
Seb

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

You are right kersing, to calculate pressure, need Temperature too.
So finally need both pressure and temperature to calculate pressure !
Sorry Medelec
Capture d’écran 2022-02-17 152344.jpg
Capture d’écran 2022-02-17 152344.jpg (63.58 KiB) Viewed 2964 times
!
Seb

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by medelec35 »

kersing wrote:
Thu Feb 17, 2022 1:23 pm
Is that a valid option?
Thanks Jac.
Thinking about it pressure is related to temperature, so it makes sense to keep it in.
lucibel wrote:
Thu Feb 17, 2022 2:10 pm
As you can see on the picture I sent to you there is 5 Val form Val0 to Val5, why ?
5
That is odd.
I did not change it from how is was.
I'm looking into it.
Martin

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

this is mine
Capture d’écran 2022-02-17 173229.jpg
Capture d’écran 2022-02-17 173229.jpg (5.01 KiB) Viewed 2957 times
Capture d’écran 2022-02-17 172545.jpg
Capture d’écran 2022-02-17 172545.jpg (15 KiB) Viewed 2957 times
Seb

lucibel
Posts: 172
Joined: Thu Sep 23, 2021 3:44 pm
Location: France
Has thanked: 29 times
Been thanked: 22 times

Re: BMP280 when reading pressure, it's reading Temp and pressure

Post by lucibel »

This what you asked me to try end of January then you updated the library with version 9
Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED
Post by medelec35 » Mon Jan 31, 2022 10:56 pm

Hi Seb,
Thank you for the spot.
Can you give the attached component a try, please?
In file explorer address bar, paste this:
CODE: SELECT ALL

C:\ProgramData\MatrixTSL\FlowcodeV9\Components
Save the attached file into the above hidden folder.
Just select ok to replace the current file.
If you got Flowcode running when the file was placed in the components directory, you must select the reload icon before compiling again.
If it works for you the component will be added to the updates.
ATTACHMENTS
Grove_Barometer_Sensor_BMP280.fcpx
(7.59 KiB) Downloaded 16 times
Martin
Seb

Post Reply