mirror of
https://github.com/wahyd4/Adafruit_Python_SSD1306.git
synced 2026-08-09 04:46:43 +10:00
added cat image to demo :)
This commit is contained in:
+8
-3
@@ -150,9 +150,14 @@ try:
|
||||
else: # button is pressed:
|
||||
draw.ellipse((100,20,120,40), outline=255, fill=1) #B button filled
|
||||
|
||||
# Display image.
|
||||
disp.image(image)
|
||||
disp.display()
|
||||
if not GPIO.input(A_pin) and not GPIO.input(B_pin) and not GPIO.input(C_pin):
|
||||
catImage = Image.open('happycat_oled_64.ppm').convert('1')
|
||||
disp.image(catImage)
|
||||
else:
|
||||
# Display image.
|
||||
disp.image(image)
|
||||
|
||||
disp.display()
|
||||
time.sleep(.01)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user