expander_test.py
· 145 B · Python
Bruto
from machine import Pin, I2C
expAddr = 0x27 # I2C Expander I/O
i2c.writeto(expAddr, '\x00') # Clear All
i2c.writeto(expAddr, '\x7F') # Fill All
| 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 |