Thank you very much Yeez_B
I tried that code before on a UNIHIKER Board and got this error message:
Traceback (most recent call last):
File "/root/mindplus/cache/new-project-25-4-2024-8-22-4.mp/BME280.py", line 6, in <module>
p_bme280 = BME280()
File "/usr/local/lib/python3.7/dist-packages/pinpong/libs/dfrobot_bme280.py", line 54, in __init__
while not self.begin():
File "/usr/local/lib/python3.7/dist-packages/pinpong/libs/dfrobot_bme280.py", line 61, in begin
temp = self.get_reg(chip_id)[0]
TypeError: 'NoneType' object is not subscriptable
root@unihiker:~/mindplus/cache/new-project-25-4-2024-8-22-4.mp#
This is line 6 causing the error:
p_bme280 = BME280()
Is it a problem with the UNIHIKER board perhaps?