Page 1 of 2

ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Mon Jan 31, 2022 6:41 pm
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 127 times
Thx for you prompt reply

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Mon Jan 31, 2022 9:56 pm
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.

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Tue Feb 01, 2022 9:31 am
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 3642 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 3642 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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 7:11 am
by lucibel
hi
please also check the altitude calculation who is wrong
thx

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 9:46 am
by medelec35
Hi.
The altitude (in feet) is not that much different from this website calculator:
Altitude.png
Altitude.png (75.12 KiB) Viewed 3620 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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 2:58 pm
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

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 3:20 pm
by medelec35
I have not had time to look into it yet.
As soon as I do, I will post a reply regarding it.

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 5:21 pm
by lucibel
ok thx

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 5:27 pm
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.

Re: ESP32 TTGO+ BMP280 temp sensor BUIL FAILED

Posted: Wed Feb 02, 2022 5:57 pm
by lucibel
serial.jpg
serial.jpg (83.77 KiB) Viewed 3591 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