Guest User

Untitled

a guest
Apr 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from PIL import ImageFont, ImageDraw
  2. from luma.core.interface.serial import i2c
  3. from luma.core.render import canvas
  4. from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106
  5. import time
  6.  
  7. serial = i2c(port=1, address=0x3C)
  8. device = ssd1306(serial, rotate=0)
  9.  
  10. # Box and text rendered in portrait mode
  11. with canvas(device) as draw:
  12. draw.line((0,0 , 20 , 20 ), fill="white")
  13. raw_input("Enter to exit")
Add Comment
Please, Sign In to add comment