from machine import Pin, SoftI2C
import time
from oled import I2C
# create I2C and OLED
i2c = SoftI2C(scl=Pin(3), sda=Pin(2))
oled = I2C(128, 64, i2c)
button = Pin(14, Pin.IN, Pin.PULL_DOWN)
msgs = [
"i love you",
"pretty baby",
"mine to annoy",
"only u, always u",
"never letting go",
"i adore u",
"mine mine mine",
"my heart is yours",
]
i = 0
def show():
oled.fill(0)
oled.text(msgs[i], 0, 0)
oled.show()
while True:
if button.value():
i = (i + 1) % len(msgs)
show()
time.sleep(.2)