@@ -0,0 +1,907 @@
+from smbus import SMBus%0A%0Aimport time%0A%0Aaddress = 0x29%0ACAP1188_SENINPUTSTATUS = 0x3%0ACAP1188_SENLEDSTATUS = 0x4%0ACAP1188_MTBLK = 0x2A%0ACAP1188_PRODID = 0xFD%0ACAP1188_MANUID = 0xFE%0ACAP1188_STANDBYCFG = 0x41%0ACAP1188_REV = 0xFF%0ACAP1188_MAIN = 0x00%0ACAP1188_MAIN_INT = 0x01%0ACAP1188_LEDPOL = 0x73%0ACAP1188_INTENABLE = 0x27%0ACAP1188_REPRATE = 0x28%0ACAP1188_LEDLINK = 0x72%0A%0ACAP1188_SENSITIVITY = 0x1f%0ACAP1188_CALIBRATE = 0x26%0A%0Ab = SMBus(0)%0Ab.write_byte_data(address, CAP1188_MTBLK, 0)%0Ab.write_byte_data(address, CAP1188_STANDBYCFG, 0x30)%0Ab.write_byte_data(address, CAP1188_INTENABLE, 0x05)%0Ab.write_byte_data(address, CAP1188_LEDLINK, 0xff)%0A%0Ab.write_byte_data(address, CAP1188_SENSITIVITY, 0x6f)%0Ab.write_byte_data(address, CAP1188_CALIBRATE, 0xff)%0A %0Awhile True:%0A t1 = b.read_byte_data(address, CAP1188_SENINPUTSTATUS)%0A print(str(t1)+%22,%22+'%7B0:08b%7D'.format(t1))%0A time.sleep(0.05)%0A b.write_byte_data(address, CAP1188_MAIN, 0x00)%0A

Create cap1188.py