Last active
April 2, 2019 11:07
-
-
Save li2hub/8744cda01918efabbcd1b11588a464ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import Adafruit_SSD1306 | |
from PIL import Image | |
# Raspberry Pi pin configuration: | |
RST = 24 | |
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST) | |
# Initialize library. | |
disp.begin() | |
# Clear display. | |
disp.clear() | |
disp.display() | |
image = Image.open('logo.png').resize((disp.width, disp.height), Image.ANTIALIAS).convert('1') | |
image1 = Image.open('logo1.png').resize((disp.width, disp.height), Image.ANTIALIAS).convert('1') | |
# Display image. | |
while 1: | |
disp.image(image) | |
disp.display() | |
time.sleep(1) | |
disp.image(image1) | |
disp.display() | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment