Skip to content

Instantly share code, notes, and snippets.

@Shinichi-Ohki
Created July 19, 2019 18:44
Show Gist options
  • Save Shinichi-Ohki/a87eaf8383cccbfd9312dd702c12de1d to your computer and use it in GitHub Desktop.
Save Shinichi-Ohki/a87eaf8383cccbfd9312dd702c12de1d to your computer and use it in GitHub Desktop.
M5stickVのバックライトを制御する
import lcd #for test
from machine import I2C
i2c = I2C(I2C.I2C0, freq=400000, scl=28, sda=29)
lcd.init() #for test
lcd.draw_string(100, 100, "hello maixpy", lcd.RED, lcd.BLACK) #for test
i2c.writeto_mem(0x34, 0x91,b'\x70') # minimum
i2c.writeto_mem(0x34, 0x91,b'\xf0') # maximum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment