sunfounder / SunFounder_SensorKit_for_RPi2

SunFounder Sensor Kit V2.0 for Raspberry Pi 2
GNU General Public License v2.0
115 stars 84 forks source link

Raspberry Pi3 B+ Problem with BMP280 #6

Open GK8591 opened 5 years ago

GK8591 commented 5 years ago

Hi, I've a problem with the connection of my Pi3 B+ with SunFounder Module BMP280 Thx for your help. Here is the error message:

pi@raspberrypi:~/SunFounder_SensorKit_for_RPi2/Python $ sudo python 31_bmp280.py
Traceback (most recent call last): File "31_bmp280.py", line 250, in main() File "31_bmp280.py", line 231, in main bmp = BMP280() File "31_bmp280.py", line 108, in init self.bus_number = self._get_bus_number() File "31_bmp280.py", line 133, in _get_bus_number raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list.\ n Please post an Issus at our Github Page or contract us\n Github page: http s://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/issues\ n Email: support@sunfounder.com\n SunFounder'.format(pi_type)) ValueError: Reading Pi type error, Your Pi "Unknown"" is not in the list. Please post an Issus at our Github Page or contract us Github page: https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_fo r_RaspberryPi/issues Email: support@sunfounder.com SunFounder

pi@raspberrypi:~/SunFounder_SensorKit_for_RPi2/Python $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- 77 pi@raspberrypi:~/SunFounder_SensorKit_for_RPi2/Python $

martonz commented 5 years ago

Had the same issue before, try to add 'Unknown' in _BUS_1_TYPES list.

GK8591 commented 5 years ago

 Thanks a lot, I'll try this, good Idea.

It works, now 👍 Thanks