Adafruit BME280 library [PORTED]


#41

Basically i was trying SPI interface with the example .ino provided by particle. With no success, i wanted to shift to I2C but even your the code provided by you is not working.I think its the problem of the I2C address but performed the I2C scanner and used different address like 0 D0, 077 and 0*76 no luck.
Even used some pull up resistors of 4.7 k for I2C interface between 3v3 to SCA AND SCL and CSB to 3V3 but no luck.
(P.S. my sensor is GY-BME/P280.)


#42

Alright i will need more information in order to help you. Please show the code you are using and also draw the circuit of the connection you are using between the BME280 and the particle device.

Even used some pull up resistors of 4.7 k for I2C interface between 3v3 to SCA AND SCL and CSB to 3V3 but no luck.

I don’t quite understand how you are connecting the sensor to the particle device. Infact this connection sounds completely wrong. You connect 3V3 to the power pin of the sensor only. SDA of the sensor connects to SDA of yhe particle device and SCL of the sensor connects to SCL of the particle device.:face_with_raised_eyebrow:
Also can you provide a link for the version of the BME280 sensor you are using. Are you using the particle photon ? Also when you ran your I2C scanner which address did the sensor respond to ?

P.S you only need 2 connections for data transmission with I2C: SDA and SCL.


#43

Don’t know whats happening but after i tested my photon with example ino of web ide named bmetest.ino its been breathing green.
Now i am trying to get results on electron so hope i will succeed.
For the connection, as stated by @https://www.electronicwings.com/particle/particle-photon-board.


#44

Basically i was trying SPI interface with the example .ino provided by particle.

You said you were using the example for SPI here. I have no idea what example you are referring to and it will be easier to help you if you put all the information here for us to see.

For I2C you only need 4 connections: 2 for power and 2 for communication and nothing else. Did you try connecting it the same i suggested which is also the way its suggested in the website for the I2C connection ( SDA photon to SDA BME280 and SCL photon to SCL BME280)? VCC of the sensor connects to 3.3V of the photon and GND of the photon connects to GND of the BME280. Have you done this? Those are all the connections you require.

Generally a breathing green implies a problem with cloud connection i.e. you are not connected to particles cloud. Please connect the sensor to your photon the way i suggested and run the code i provided using the library i suggested. If you are unsure of the address connect the sensor as i suggested and run the I2C scanner to find the address. Without the correct address it will not work. If your photon is breathing green still try upgrading the software of your photon from the particle dash board.


#45

I am trying it with the next photon i bought and got this result with I2C interface and had scanned too my I2C which is 0*76.
Device photon and sensor GY-BME/P280.
Seriously in need of help…


#46

I had issues using the adafruit library also. That’s why I changed to the control everything library and suggested that you try theirs out. It worked for me. Did you try the program I suggested in conjunction with the library I suggested ?


#47

It’s not 0*76 which would equate to zero (anything mulitplied by 0 will be 0) but it it 0x76 which is the C/C++ way of denoting hexadecimal numbers.


#48

i connected the D0 and D1 with SDA and SCL and copied your whole code with that specified library, even it is not functioning.


#49

Thanks for your reply. that was the silly mistake but even using right way of address, it is not functioning.


#50

Did you try the code I provided with the correction ScruffR pointed out ?

I am open to correction but i think the adafruit library for the BME280 works best with the adafruit BME280 sensor. Control Everything’s library worked with all the BME280 sensors I tried. You said you tried the code I suggest with the library I suggested. Can you tell us what went wrong with it ? So we can try to identify the problem.