1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
|
|
|
|
|
|
|
|
!
| import smbus
import time
i2c = smbus.SMBus(1) address = 0x30
i2c.write_byte(address,0x00)
cmd=[0x00,0x03, 0xff, 0x00, 0x00]
i2c.write_i2c_block_data(address, 0x02, cmd)
cmd=[0x01,0x02, 0x00, 0xff, 0x00]
i2c.write_i2c_block_data(address, 0x02, cmd)
i2c.write_byte(address,0x01)
|