BMP.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:illuminOS 作者: idimitrakopoulos 项目源码 文件源码
def __init__(self, type, scl, sda):
        self.type = type

        if self.type == 0:
            i2c_bus = I2C(scl=Pin(scl), sda=Pin(sda), freq=100000)
            self.sensor = BMP180.BMP180(i2c_bus)
            self.sensor.oversample_sett = 2
            self.sensor.baseline = 101325

        elif self.type == 1:
             pass #TODO

        else:
            log.error("Unknown sensor type '{}'. Cannot instantiate it.".format(self.type))

    # @timed_function
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号