import machine

i2c = machine.I2C(scl = machine.Pin(22), sda = machine.Pin(23), freq = 100000) #初始化I2C
i2c.writeto_mem(65, 3,b'\xff')     #PCA9536 地址0x41(65) 发送 0x03(3)  0xff        
print(i2c.readfrom_mem(65, 0,1))    #读取PCA9536 地址0x41(65)  0x00 一个字节

 

参考地址:https://github.com/ControlEverythingCommunity/PCA9536/blob/master/Python/PCA9536.py

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2021-06-18
  • 2021-11-20
  • 2021-08-08
  • 2021-09-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-05-04
  • 2021-04-30
  • 2022-02-10
  • 2021-05-16
  • 2022-12-23
相关资源
相似解决方案