Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> from machine import Pin, ADC
  2. >>> import ssd1306
  3. >>> from time import sleep
  4. >>> display = ssd1306.SSD1306_I2C(128, 64, i2c)
  5. >>> pot = ADC(0)
  6. >>>
  7. >>> while True:
  8. ...   pot_value = pot.read()
  9. ...   display.fill(0)
  10. ...   display.text(str(pot_value), 0, 0)
  11. ...   display.show()
  12. ...   sleep(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement