ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post and discuss new components that you have created.
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

ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

Hello,
Could you check the BMP280 component it can not be compiled with ESP32.
only added Init macro make failed compile.
BMP280_O.fcfx
(12.57 KiB) Downloaded 123 times
Thx for you prompt reply
Seb

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by medelec35 »

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 119 times
Martin

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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

Hello Martin,
Thx yes now can be compiled and value can be read from sensor but ,
I saw a strange problem when make a string calculation before to send the string to UART.
That calculation result is wrong even if in simulation the result is good.

Code: Select all

SerialString = "/*Sensor," + SAlt + "," + Spressure + "," + STemp + "*/"
simulation result
string from UART console in debug mode.jpg
string from UART console in debug mode.jpg (10.2 KiB) Viewed 3564 times
But When send the String SerialString to device from UART, there is always only 22 characters sent
I did different test with different begining of the String to see how it affect the calculation as you can see there is always 22 characters
/*BarometricSensor,9*/ is 22 characters
/*Sensor,982.88,977.*/ is 22 characters
/*B,976.7,1009.58,20*/ is 22 characters
as you can see, the 2 end characters "*/" are present but the middle is missing
Then I did a test without the 2 last characters

Code: Select all

SerialString = "/*Sensor," + SAlt + "," + Spressure + "," + STemp
result is 25 characters : /*Sensor,983.73,977.20.93
then Changed the beginning of the string "sensor" by "BarometricSensor" to increase the string length
result is 25 characters : /*BarometricSensor,920.74
console1.jpg
console1.jpg (41.01 KiB) Viewed 3564 times
The string is always incomplete and If the string is without "*/" at the end, the length is 25 if with "*/" the length is 22 characters

I did a test with a different way of the string calculation

Code: Select all

SerialString = "/*Sensor,"
SerialString = SerialString + SAlt
SerialString = SerialString + ","
SerialString = SerialString + Spressure
SerialString = SerialString + ","
SerialString = SerialString + STemp
SerialString = SerialString + "*/"
With this way, the string is complete: /*Sensor,984.57,977.68,20.83*/
Even is the beginning of the string is longer
10:08:57.205 -> /*BarometricSensor,982.32,977.74,20.84*/

Could you check what is the problem please . May be there is a link with TMP String Size.
thx
Attachments
BMP280_Orig.fcfx
(21.54 KiB) Downloaded 113 times
Seb

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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

hi
please also check the altitude calculation who is wrong
thx
Seb

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by medelec35 »

Hi.
The altitude (in feet) is not that much different from this website calculator:
Altitude.png
Altitude.png (75.12 KiB) Viewed 3542 times
The Altitude is just a calculation purely based on the pressure reading.
As the pressure changes, it won't show a true fixed height above sea level.
Note, the Average sea-level pressure is 1013.25 mbar, so at that pressure, the Altitude reading will be around 0.
What I did was if I wanted to measure the difference in altitude, I would tare the altitude to 0 then any pressure change would then be converted to Altitude.
The example that shows that, can be found here
Martin

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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

thx
But you didn't reply to my previous remarks and questions to this topic sir
viewtopic.php?p=5603&sid=b76f0dfd815efa ... f45b#p5603
Seb

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by medelec35 »

I have not had time to look into it yet.
As soon as I do, I will post a reply regarding it.
Martin

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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

ok thx
Seb

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 469 times

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by medelec35 »

Could it be your terminal software?
I just tried your flowchart with both Tera Term and RealTerm
The results for both when sending via TTGO:

Code: Select all

String values:20.21 ; 1012.48 ; 25.49
/*BarometricSensor,20.21,1012.48,25.49*/
Altitude:20.207380; Pressure:1012.480000; Temperature:25.490000
&

Code: Select all

String values:19.93 ; 1012.62 ; 25.36
BarometricSensor,19.93,1012.62,25.36
Altitude:19.934228; Pressure:1012.620000; Temperature:25.360000
All looks complete to me.
Martin

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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Post by lucibel »

serial.jpg
serial.jpg (83.77 KiB) Viewed 3513 times
did you tried with the 1st calculation enabled and the second calculation disabled ?
From my side I also tried with Putty and result is wrong too
Seb

Post Reply