Skip to content

Instantly share code, notes, and snippets.

@tranthamp
Last active May 26, 2023 04:53
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save tranthamp/cbdbc6ff3a35a61d9e08 to your computer and use it in GitHub Desktop.
Save tranthamp/cbdbc6ff3a35a61d9e08 to your computer and use it in GitHub Desktop.
# Select the i2c bus
i2c dev <bus>
i2c dev 0
# Probe the device
i2c probe <chip>
i2c probe 0x60
# Read from the device
i2c read <chip> <chip address> <length> <memory address>
i2c read 0x60 0x27 1 0x80200000
# Read and Display from the device
i2c md <chip> <chip address> <length>
i2c md 0x60 0x27 1
# Write to the device
i2c mw <chip> <chip address> <value> <length>
i2c mw 0x60 0x30 0x20 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment