项目作者: darton

项目描述 :
MCP23008 with GPIOZERO library
高级语言: Python
项目地址: git://github.com/darton/mcp23008.git
创建时间: 2020-03-18T11:44:07Z
项目社区:https://github.com/darton/mcp23008

开源协议:

下载


mcp23008

Use MCP23008 as Raspberry Pi inputs expander based on GPIOZERO library.

Optionally, to improve permformance, increase the I2C baudrate from the default of 100KHz to 400KHz by altering /boot/config.txt to include:

  1. dtparam=i2c_arm=on,i2c_baudrate=400000

Next check that the device is communicating properly.

  1. $ i2cdetect -y 1
  2. 0 1 2 3 4 5 6 7 8 9 a b c d e f
  3. 00: -- -- -- -- -- -- -- -- -- -- -- -- --
  4. 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  5. 20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
  6. 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  7. 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  8. 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  9. 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  10. 70: -- -- -- -- -- -- -- --