RAK4260 and BME280 sensor

Has anyone connected a BME280 sensor (I2C) to a RAK4260? I’m looking for a library to read and perform the calculations required when using this sensor.

Hi, @Tony_Smith

I did not used I2C yet, but I used the SERCOM3 that have the SCL and SDA pins. Are you changing the code provided by RAK?

Thank you @RicSToz, I did not know about SERCOM module. I will see if I can find more information and tutorials.

Searching the RAK code using Studio7 I can find the I2C pin definitions for SERCOM3 (sercom_pinout.h) but have not found I2C being used. I have been working from the Microchip example “I2C_QUICK_START_MASTER_BASIC_USE” in Studio7 and there is no reference to SERCOM in that at all.

I assume you are currently using SERCOM3 for serial UART and not I2C.

Hi, @Tony_Smith!

Well … I am not a SAM expert, but SERCOM is a multi-interface communication module that supports UART, SPI, and I2C by multiplexing the output pins as the user chooses. I believe that following the examples you will be able to implement without problems, because that’s what I did.

I know this is pretty old but I think it is worth to push up since the BME280 is a very popular sensor and I have managed to make it work using this tiny library (on a RAK3172, but I think it is the same for others): GitHub - jasonacox/Tiny_BME280_Library: Arduino tiny library for the BME280 temperature, pressure and humidity sensor using I2C. Minimized to save PROGMEM space.
The only thing is that you need to pass down the 0x76 or the BME280_ADDRESS_ALTERNATE (which is exposed by the library) address to the begin() function.

Sorry for the tag @carlrowan, but I think that would be great to have an example on the WisBlock repository as a reference. The library is untouched since a long period but should be working correctly.

1 Like

Thanks for your contribution @a.occ Alessio.

I am sure RAK4260 and RAK3172 users appreciate your findings.