I just received a Adafruit BMP280 and I can't make the SPI example work. This is the error I get:
Traceback (most recent call last):
File "/home/iyan/bmp280/example.py", line 13, in <module>
bmp280 = adafruit_bmp280.Adafruit_BMP280_SPI(spi, bmp_cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/iyan/bmp280/.venv/lib/python3.11/site-packages/adafruit_bmp280.py", line 531, in __init__
super().__init__()
File "/home/iyan/bmp280/.venv/lib/python3.11/site-packages/adafruit_bmp280.py", line 143, in __init__
raise RuntimeError("Failed to find BMP280! Chip ID 0x%x" % chip_id)
RuntimeError: Failed to find BMP280! Chip ID 0xff
I2C works just as described in the example and in the tutorial.
I was first using a Raspberry Pi 5, but because I read other people having issues with the latest RPi, I also tried on a RPi 3B with the same outcome. I was also using a GPIO Extension Board, but just in case I also tried connecting the cables directly, but it doesn't make a difference.
Hello,
I just received a Adafruit BMP280 and I can't make the SPI example work. This is the error I get:
I2C works just as described in the example and in the tutorial.
I was first using a Raspberry Pi 5, but because I read other people having issues with the latest RPi, I also tried on a RPi 3B with the same outcome. I was also using a GPIO Extension Board, but just in case I also tried connecting the cables directly, but it doesn't make a difference.
This is the exact example I'm trying to run:
And here is a photo of the setup:
Probably related to this I found this closed issue (#27) and this closed thread in the forum.
Any ideas what might I be doing wrong? Or how to debug further? I have no prior experience with SPI.