BME280!
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
BME280!
Hi
Strange. I was following and looking here in fora this afternoon to see if something new. And yes, I saw that Leigh (used my Ipad) have fixed the BME280 component. I gave him thump up, Will now one hour later try to test the component. But now there is nothing.
I had really looked forward to test this...
BR Jorgen
Strange. I was following and looking here in fora this afternoon to see if something new. And yes, I saw that Leigh (used my Ipad) have fixed the BME280 component. I gave him thump up, Will now one hour later try to test the component. But now there is nothing.
I had really looked forward to test this...
BR Jorgen
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: BME280!
Hi, sorry, I realised after I posted it that I needed to check something, there could be a bug, so I deleted the post.
I need to check it tomorrow when I'm back in work.
I will re-post once I've checked it.
I need to check it tomorrow when I'm back in work.
I will re-post once I've checked it.
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
-
- Posts: 190
- Joined: Mon Jul 07, 2014 9:38 am
- Has thanked: 30 times
- Been thanked: 77 times
- Contact:
Re: BME280!
Hi Jorgen,
Just by curiosity, did you try to test the " BME280_2.fcpx" component from here (you may rename it as you want)?
viewtopic.php?f=7&t=19494#p84986
Just by curiosity, did you try to test the " BME280_2.fcpx" component from here (you may rename it as you want)?
viewtopic.php?f=7&t=19494#p84986
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: BME280!
I'm still only getting 0.0000 for all readings. Either the component still has a bug or I'm doing something silly with my flow chart
1 in 10 people understand binary, the other one doesn't !
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: BME280!
That might be down to the Device Address.
The original component, and viki2000 one, use the bit shifted address, as sent in the data byte, e.g. 0xEE
For the "official" Matrix component I posted, this was changed to use the (7 bit) address as read from the datasheet, e.g. 0x77
Edit: Here's my demo/test, if it helps
The original component, and viki2000 one, use the bit shifted address, as sent in the data byte, e.g. 0xEE
For the "official" Matrix component I posted, this was changed to use the (7 bit) address as read from the datasheet, e.g. 0x77
Edit: Here's my demo/test, if it helps
- Attachments
-
- Pressure Sensor BME280 Demo.fcfx
- (14.56 KiB) Downloaded 263 times
-
- Posts: 190
- Joined: Mon Jul 07, 2014 9:38 am
- Has thanked: 30 times
- Been thanked: 77 times
- Contact:
Re: BME280!
I have tested this time the above code with the new packed component (that has resolution 0-5 for float) and in the same time the component BME280_2.fcpx" from here (viewtopic.php?f=7&t=19494#p84986 ).
I have used dsPIC33FJ128GP802 with OLED 120x64 SH1106.
My component works, the one from Leigh (viewtopic.php?f=7&t=19494&start=25#p85312 ) does not work for me, I guess because of improper I2C address provided for the component. In my case I need 0x76 and it seem only 0x77 is packed inside the component. The I2C address should be visible to the user and changed as needed 0x77 or 0x76.
Below is the test code used.
I have used dsPIC33FJ128GP802 with OLED 120x64 SH1106.
My component works, the one from Leigh (viewtopic.php?f=7&t=19494&start=25#p85312 ) does not work for me, I guess because of improper I2C address provided for the component. In my case I need 0x76 and it seem only 0x77 is packed inside the component. The I2C address should be visible to the user and changed as needed 0x77 or 0x76.
Below is the test code used.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: BME280!
Thanks for the feedback, I thought I had made the Device Address configurable, I'll check that
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: BME280!
Hi viki2000,
The issue is that the second sensor is not my BME280 component.
Both our components have the same GUID, as they are derived from the original.
So they cannot co-exist in Flowcode.
To test one, the other will need to be temporarily removed from the components directory.
Better still, give your component a new GUID:
Load the source project for it, go to File->Component Management->Setup->Advanced->GUID Edit->New->OK
Save and re-export
Thanks
Leigh
The issue is that the second sensor is not my BME280 component.
Both our components have the same GUID, as they are derived from the original.
So they cannot co-exist in Flowcode.
To test one, the other will need to be temporarily removed from the components directory.
Better still, give your component a new GUID:
Load the source project for it, go to File->Component Management->Setup->Advanced->GUID Edit->New->OK
Save and re-export
Thanks
Leigh
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: BME280!
Hi viki and leigh and John!
Sorry all, I have not tested these two component yet. My work take all my sparetime
I hope I get some time this evening, and you hear from me..
Thank’s for your work.
Br Jorgen
Sorry all, I have not tested these two component yet. My work take all my sparetime
I hope I get some time this evening, and you hear from me..
Thank’s for your work.
Br Jorgen
-
- Posts: 190
- Joined: Mon Jul 07, 2014 9:38 am
- Has thanked: 30 times
- Been thanked: 77 times
- Contact:
Re: BME280!
Hi Leigh,
You are right, I realized that unique GUID later after I have done the tests below.
The I2C address appeared now in the component that you provided and the compensation Integer and Float – I like that.
Here are few more notes with test done in mean time, before I have read your reply.
In the code of the component, at the Global-Constant we have I2C_RD_ADDR=0xED and I2C_WR_ADDR=0xEC.
When we click right and we search List Occurrences, then I2C_RD_ADDR is not used and I2C_WR_ADDR is present only on Reset subroutine.
But these are constants, fixed values. Shouldn’t be these variables dependent by the Slave Address?
I mean, when I set up the address 0xEC for Slave Address, then use I2C_WR_ADDR=0xEC and I2C_RD_ADDR=0xED and when I set up the address 0xEE for Slave Address, then use I2C_WR_ADDR=0xEE and I2C_RD_ADDR=0xEF. Then instead of constants we may use variables. Am I wrong?
Actually is enough to use the Slave Address in Reset Macro instead of I2C_WR_ADDR constant.
You click right on 3D system panel, on the square component, Properties and then we get the window with Panel, Properties and the last property listed is Slave Address and there we can choose 0xEC or 0xEE.
In the code for component we can edit Slave Address and replace there 236 0xEC with 118 0x76 and next line 238 0xEE with 119 0x77. Then in the code instead of Slave Address we use for calculation (Slave Address *2), because 0x76*2=0xEC and 0x77*2=0xEE.
Below is my trial with the code of the component (BME280_3.fcfx) using 0x76 and 0x77 for Salve Address, then the component packed (BME280_3.fcpx) and my working test code (dsPIC33FJ128GP802_BME280.fcfx) with OLED. It contains your BME280 component and mine and it works fine for me with both.
Original GUID:
a9eb79b0-1d24-4acf-aade-d3639aa800c7
My new GUID:
9d95fb45-641e-4779-96d6-ca2f21876c7d
What do you think about next improvements?
- To have an altitude calculation macro based on “SEALEVELPRESSURE_HPA (1013.25)”
- To have a component macro function to take a force measurement and implement SLEEP mode for sensor.
- To have the parameters of the components oversampling and normal/forced mode to be exposed and listed in the settings of the component.
If there are portable applications, where the power consumption matters, then forced mode + sleep is helpful as initial setting instead of regular pooling, without necessity to write a new initialization macro using the write register.
Then if it is needed a better precision with downside of longer time of measurements or contrary faster measurements with lower precision, then it would be good to have access to the oversampling in the initial settings.
You are right, I realized that unique GUID later after I have done the tests below.
The I2C address appeared now in the component that you provided and the compensation Integer and Float – I like that.
Here are few more notes with test done in mean time, before I have read your reply.
In the code of the component, at the Global-Constant we have I2C_RD_ADDR=0xED and I2C_WR_ADDR=0xEC.
When we click right and we search List Occurrences, then I2C_RD_ADDR is not used and I2C_WR_ADDR is present only on Reset subroutine.
But these are constants, fixed values. Shouldn’t be these variables dependent by the Slave Address?
I mean, when I set up the address 0xEC for Slave Address, then use I2C_WR_ADDR=0xEC and I2C_RD_ADDR=0xED and when I set up the address 0xEE for Slave Address, then use I2C_WR_ADDR=0xEE and I2C_RD_ADDR=0xEF. Then instead of constants we may use variables. Am I wrong?
Actually is enough to use the Slave Address in Reset Macro instead of I2C_WR_ADDR constant.
You click right on 3D system panel, on the square component, Properties and then we get the window with Panel, Properties and the last property listed is Slave Address and there we can choose 0xEC or 0xEE.
In the code for component we can edit Slave Address and replace there 236 0xEC with 118 0x76 and next line 238 0xEE with 119 0x77. Then in the code instead of Slave Address we use for calculation (Slave Address *2), because 0x76*2=0xEC and 0x77*2=0xEE.
Below is my trial with the code of the component (BME280_3.fcfx) using 0x76 and 0x77 for Salve Address, then the component packed (BME280_3.fcpx) and my working test code (dsPIC33FJ128GP802_BME280.fcfx) with OLED. It contains your BME280 component and mine and it works fine for me with both.
Original GUID:
a9eb79b0-1d24-4acf-aade-d3639aa800c7
My new GUID:
9d95fb45-641e-4779-96d6-ca2f21876c7d
What do you think about next improvements?
- To have an altitude calculation macro based on “SEALEVELPRESSURE_HPA (1013.25)”
- To have a component macro function to take a force measurement and implement SLEEP mode for sensor.
- To have the parameters of the components oversampling and normal/forced mode to be exposed and listed in the settings of the component.
If there are portable applications, where the power consumption matters, then forced mode + sleep is helpful as initial setting instead of regular pooling, without necessity to write a new initialization macro using the write register.
Then if it is needed a better precision with downside of longer time of measurements or contrary faster measurements with lower precision, then it would be good to have access to the oversampling in the initial settings.
- Attachments
-
- dsPIC33FJ128GP802_BME280.fcfx
- (15.6 KiB) Downloaded 225 times
-
- BME280_3.fcpx
- (4.75 KiB) Downloaded 206 times
-
- BME280_3.fcfx
- (42.81 KiB) Downloaded 206 times
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: BME280!
Hi Leigh and Viki!
Super. How lucky you can be.
I changed Leigh´s program to an Arduino Mega 2650, and it work perfect, nice job. Thank´s.
Viki I also change your program pic161829_BME280_3.FCX to an Arduino Mega 2650. I disable the OSCON Ccode, and it work also perfect. Thank´s.
By a quick compare, the data is equal.
I copy your BME280_3.fcpx to the component lib. But I can´t find it in my "sensor drop down list? SOLVED!
Looking forward to john's test.....
Br Jorgen
Super. How lucky you can be.
I changed Leigh´s program to an Arduino Mega 2650, and it work perfect, nice job. Thank´s.
Viki I also change your program pic161829_BME280_3.FCX to an Arduino Mega 2650. I disable the OSCON Ccode, and it work also perfect. Thank´s.
By a quick compare, the data is equal.
I copy your BME280_3.fcpx to the component lib. But I can´t find it in my "sensor drop down list? SOLVED!
Looking forward to john's test.....
Br Jorgen
- Attachments
-
- PIC16F1829_BME280_3Mega2650.fcfx
- (48.86 KiB) Downloaded 167 times
-
- Pressure Sensor BME280 DemoMega2650.fcfx
- (14.44 KiB) Downloaded 173 times
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: BME280!
Hi again.
Hereby a small test program from me with viki´s component. Later I make one with Leigh´s.
Br Jorgen
Hereby a small test program from me with viki´s component. Later I make one with Leigh´s.
Br Jorgen
- Attachments
-
- BME ny.fcfx
- (16.93 KiB) Downloaded 173 times
-
- Posts: 71
- Joined: Thu Aug 10, 2017 2:04 pm
- Has thanked: 25 times
- Been thanked: 36 times
- Contact:
Re: BME280!
Hello viki2000,viki2000 wrote: ...
I have used dsPIC33FJ128GP802 with OLED 120x64 SH1106
...
I've opened a post regarding a display with driver SH1106 (viewtopic.php?f=64&t=19846) but still didn't get any answer from FC team.
Your post is the only one I found were this display was used successfully!
If you don't mind I have 2 question then:
1) Are you using the standard component from FC7?
2) Which display are you using: is it a 4 pins I2C like mine?
Thanks in advance!
Regards
Giuseppe
-
- Posts: 190
- Joined: Mon Jul 07, 2014 9:38 am
- Has thanked: 30 times
- Been thanked: 77 times
- Contact:
Re: BME280!
Hello Giuseppe,
I was not online during the last 3 months. Maybe I will have some time during the following weeks to look at some project with microcontrollers.
I have tested 4-5 different types of OLEDs, I2C and SPI.
The SH1106 component was made by Ben (nice guy) after I sent him one display and was published here and later included as standard component inside the FC:
http://www.matrixtsl.com/mmforums/viewt ... 56&t=16595
http://www.matrixtsl.com/mmforums/viewt ... 63&t=18240
I have seen your OLED was faulty, at least you know the problem:
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19846
The standard I2C SH1106 component inside FC7 should work with your display.
I was not online during the last 3 months. Maybe I will have some time during the following weeks to look at some project with microcontrollers.
I have tested 4-5 different types of OLEDs, I2C and SPI.
The SH1106 component was made by Ben (nice guy) after I sent him one display and was published here and later included as standard component inside the FC:
http://www.matrixtsl.com/mmforums/viewt ... 56&t=16595
http://www.matrixtsl.com/mmforums/viewt ... 63&t=18240
I have seen your OLED was faulty, at least you know the problem:
http://www.matrixtsl.com/mmforums/viewt ... 64&t=19846
The standard I2C SH1106 component inside FC7 should work with your display.
-
- Posts: 71
- Joined: Thu Aug 10, 2017 2:04 pm
- Has thanked: 25 times
- Been thanked: 36 times
- Contact:
Re: BME280!
Hello wiki2000,
you have seen my post and no problem then: I had a faulty display. Everything works fine.
Thanks for your replay!
Regards
Giuseppe
you have seen my post and no problem then: I had a faulty display. Everything works fine.
Thanks for your replay!
Regards
Giuseppe