Bme280 not detect

bme280 wouldnt be detect on raspberry pi 3 with i2cdetect -y 1.

How is it connected to the Pi 3, jumpers, breadboard?
Is there a header soldered on?

I use for pico W
PIN 36/39 - 3,3v
PIN 1 for sda
PIN 2 for. Scl
PIN 3 for ground

Ok, what code are you running on the Pico to detect it?

thats from thonny
from machine import Pin, I2C
i2c = I2C(0, sda=Pin(0), scl=Pin(1))
print(i2c.scan())
on Pico I have MicroPython v1.22.0

But second on my RPI3 → i do i2cdetect -y 1 and no address 0x76 or 0x77 is shonw

Just to confirm,
it is detected on the Pico,
but not detected on the Pi 3?

Neither pico nor rpi3
I think the bme280 is out of order

I’d redo your soldering, and try again.
soldering101

I have do that and checked.
The result is the same.

Regards
Harald

I “think” that should be
i2c = I2C(0, sda=Pin(1), scl=Pin(2))
It’s the GP number.

I2C Scanner MicroPython

from machine import Pin, SoftI2C

You can choose any other combination of I2C pins

i2c = SoftI2C(scl=Pin(2), sda=Pin(1))

print(‘I2C SCANNER’)
devices = i2c.scan()

if len(devices) == 0:
print(“No i2c device !”)
else:
print(‘i2c devices found:’, len(devices))

for device in devices:
print("I2C hexadecimal address: ", hex(device))

Output
MicroPython v1.22.0-preview.147.ga00c9d56d on 2023-11-09; Raspberry Pi Pico W with RP2040
Type “help()” for more information.

%Run -c $EDITOR_CONTENT
I2C SCANNER
No i2c device !

This is the code I’ve been using in Micro Python. The physical pin number versus GP number catches me out now and then. Plus different Pimoroni devices using different pins for i2c. It is looking like your BME280 is a dud though.

import machine
sda=machine.Pin(4) # Explorer 20 Breakout 4
scl=machine.Pin(5) # Explorer 21 Breakout 5
i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
 
print('Scan i2c bus...')
devices = i2c.scan()
 
if len(devices) == 0:
  print("No i2c device !")
else:
  print('i2c devices found:',len(devices))
 
  for device in devices:  
    print("Decimal address: ",device," | Hex address: ",hex(device))

I went and double checked what pins the Pico Breakout garden Base uses.
SDA > GP 4 > Physical Pin 6
SCL > GP 5 > Physical Pin 7
So in the code I posted, its using the GP number.
That means for my code its SDA 0, SCL 1, not 1, 2. You had it right and “I” got it confused. Sorry about that.

Thats Not working for ‘pico W’

For pico it works 👍😀

1 Like

That pinout picture you posted is for a Raspberry Pi, not a Pico W.

Raspberry Pi Pico GPIO Pinout
Raspberry Pi Pico W GPIO Pinout

Raspberry Pi GPIO Pinout

EDIT: The Micro Python Code I posted above won’t work on a Raspberry Pi.

Pi Python, pimoroni/bme280-python: Python library for the BME280 temperature, pressure and humidity sensor (github.com)

Pico, pimoroni-pico/micropython/examples/breakout_bme280 at main · pimoroni/pimoroni-pico (github.com)