Skip to content

Instantly share code, notes, and snippets.

@plumbum
Created September 7, 2014 17:03
Show Gist options
  • Save plumbum/afd833d41d06902c13b6 to your computer and use it in GitHub Desktop.
Save plumbum/afd833d41d06902c13b6 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Setup PCA9535
i2cset -y i2c-gpio0 0x20 2 0xFF
i2cset -y i2c-gpio0 0x20 6 0xFF
i2cset -y i2c-gpio0 0x20 3 0xFF
i2cset -y i2c-gpio0 0x20 7 0x0F
i2cget -y i2c-gpio0 0x20 0 w
sleep 1
i2cset -y i2c-gpio0 0x20 3 0xEF
sleep 1
i2cset -y i2c-gpio0 0x20 3 0xDF
sleep 1
i2cset -y i2c-gpio0 0x20 3 0xBF
sleep 1
i2cset -y i2c-gpio0 0x20 3 0x7F
sleep 1
i2cset -y i2c-gpio0 0x20 3 0xFF
# i2c-gpio-custom bus0=0,7,29
# http://wiki.openwrt.org/toh/tp-link/tl-mr3020#adding.i2c.bus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment