Closed AntonSangho closed 1 month ago
from machine import I2C sdaPIN = Pin(4) sclPIN = Pin(5) i2c = I2C(0, sda=sdaPIN, scl=sclPIN) devices = i2c.scan() if len(devices) == 0: print("No I2C device") else: print("I2C device found :", len(devices)) for device in devices: print(" Hexa address: ", hex(device))
결과
MPY: soft reboot I2C device found : 1 Hexa address: 0x68
정상적이라면 bh1750 은 0x23으로 잡혀야함
오랜지 색상 보드에서 점퍼 날린 선이 GP12번에 연결되어야하는데 다른데 연결되어있을 경우 문제가 발생함. 해결방법은 멀티미터로 점퍼선 쇼트 체크하거나 제대로 연결되어있는지 확인
결과
정상적이라면 bh1750 은 0x23으로 잡혀야함