Lucas Teske 修订了这个 Gist 8 years ago. 转到此修订
1 file changed, 6 insertions
expander_test.py(文件已创建)
| @@ -0,0 +1,6 @@ | |||
| 1 | + | from machine import Pin, I2C | |
| 2 | + | ||
| 3 | + | expAddr = 0x27 # I2C Expander I/O | |
| 4 | + | ||
| 5 | + | i2c.writeto(expAddr, '\x00') # Clear All | |
| 6 | + | i2c.writeto(expAddr, '\x7F') # Fill All | |
上一页
下一页