-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I couldn't find where the code has the SCK and SDI pins wired to so I went with the default and wired them in the raspberry pi 4b to the SCL and SDA pins. The sensor is on and powered correctly but I not sure exactly where to wire sensor to on GPIO pins. I am currently getting this error:
Traceback (most recent call last):
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/bme280/init.py", line 215, in setup
chip = self._bme280.get("CHIP_ID")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/i2cdevice/init.py", line 230, in get
self.read_register(register)
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/i2cdevice/init.py", line 183, in read_register
self.values[register.name] = self._i2c_read(register.address, register.bit_width)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/i2cdevice/init.py", line 288, in _i2c_read
for x in self._i2c.read_i2c_block_data(self._i2c_address, register, bit_width // self._bit_width):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/smbus2/smbus2.py", line 619, in read_i2c_block_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mason35/Desktop/Enviroment/BME280Weather.py", line 24, in
temperature = bme280.get_temperature()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/bme280/init.py", line 248, in get_temperature
self.update_sensor()
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/bme280/init.py", line 234, in update_sensor
self.setup()
File "/home/mason35/Desktop/Enviroment/env/lib/python3.11/site-packages/bme280/init.py", line 219, in setup
raise RuntimeError("Unable to find bme280 on 0x{:02x}, IOError".format(self._i2c_addr))
RuntimeError: Unable to find bme280 on 0x76, IOError
if anyone knows what this error means please let me know how I can fix this issue