pyIRcam.py 文件源码

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

项目:pyIRCamera 作者: alduxvm 项目源码 文件源码
def __init__(self):
        self.sensorAddress = 0x58 # Check before to be sure its the correct address
        self.device = smbus.SMBus(1)
        self.positions = {'found':False,'1':[0,0],'2':[0,0],'3':[0,0],'4':[0,0]}
        # Initialization of the IR sensor
        self.initCMDs = [0x30, 0x01, 0x30, 0x08, 0x06, 0x90, 0x08, 0xC0, 0x1A, 0x40, 0x33, 0x33]
        for i,j in zip(self.initCMDs[0::2], self.initCMDs[1::2]):
            self.device.write_byte_data(self.sensorAddress, i, j)
            sleep(0.01)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号