Added a tiny oled display

This commit is contained in:
2021-01-23 04:11:09 +03:00
parent 19a614b29b
commit 517ad11517
3 changed files with 30 additions and 1 deletions

23
image.py Normal file
View File

@@ -0,0 +1,23 @@
import time
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
from PIL import Image
RST = 24
disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST)
disp.begin()
disp.clear()
disp.display()
image = Image.open('cat.png').convert('1')
def cat():
disp.image(image)
disp.display()
def no_cat():
disp.clear()
disp.display()