No additional I2C sensor detected

Hello, I am trying to add an additional BMP280 sensor in the Navigator, but there is no way to recognize it. When I run “i2cdetect -y 1” the built-in sensor appears (address 0x76), but when I run “i2cdetect -y 6” nothing appears. I have tried using the following code:

import smbus2
import bme280

port = 1
address = 0x76

bus = smbus2.SMBus(port)

calibration_params = bme280.load_calibration_params(bus, address)

data = bme280.sample(bus, address, calibration_params)

pressure_bar = data.pressure / 1000

print(f"Temperature: {data.temperature:.3f} ºC")
print(f"Pressure: {data.pressure:.3f} hPa")
print(f"Pressure: {pressure_bar:.3f} bar")

It works perfectly for the built-in sensor, however, when I switch to port 6 it does not work as it does not even find the additional sensor. Am I doing something wrong? Thanks

Hi @MiguelC -
How did you connect your sensor? The Navigator already has a BMP280 gas pressure sensor onboard, can you share more about your intended application?

It’s strange that you followed these instructions and aren’t seeing the device…

Solved, I was missing this line:

sudo apt update && sudo apt install -y i2c-tools

I will now try to send the information to QGroundControl. Thank you very much

1 Like