Skip to content

Instantly share code, notes, and snippets.

@boochow
Created May 27, 2018 14:56
Show Gist options
  • Save boochow/1f76e6a483f816854d313e71484a44b7 to your computer and use it in GitHub Desktop.
Save boochow/1f76e6a483f816854d313e71484a44b7 to your computer and use it in GitHub Desktop.
def write_data(self, buf):
self.temp[0] = self.addr << 1
self.temp[1] = 0x40 # Co=0, D/C#=1
self.i2c.start()
self.i2c.write(self.temp)
self.i2c.write(buf)
self.i2c.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment