import machine
from machine import Pin, SoftI2C
import utime
# For newer displays in Systems room, use the SH1106 library:
import ssd1306
# import sh1106
i2c = machine.SoftI2C(scl=machine.Pin(5), sda=machine.Pin(4))
pin = machine.Pin(16, machine.Pin.OUT)
pin.value(0)
pin.value(1)
oled_width = 128
oled_height = 64
# For newer displays in Systems room, use the sh1106 oled line:
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
#oled = sh1106.SH1106_I2C(oled_width, oled_height, i2c, Pin(16), 0x3c, rotate=180)
Start_line = 0
oled.fill(0)
for Start_line in range(1,128):
oled.fill(0)
oled.text("Monbulk Peers!", 7, Start_line)
oled.text("The 1st line", 4, Start_line-10)
oled.text("WHAT", 50, Start_line-25)
oled.text("TIME", 48, Start_line-35)
oled.text("IS", 56, Start_line-45)
oled.text("IT?", 54, Start_line-55)
oled.show()
while 1:
oled.fill(1)
oled.show()
utime.sleep(0.1)
oled.fill(0)
oled.text("RECESS", 44, 20)
oled.text("TIME!", 44, 35)
oled.show()
utime.sleep(0.2)