from machine import I2C,Pin
import time
from ssd1306 import SSD1306_I2C
p13 = Pin(13, Pin.IN)
led = Pin(2, Pin.OUT)
i2c = I2C(scl = Pin(22), sda = Pin(21), freq = 10000)
oled = SSD1306_I2C(128, 64, i2c)
oled.text("Hi",0,0)
oled.show()
def fun(*args):
led.on()
print("1")
oled.fill(0)
oled.text("It'smyfather",0,0)
oled.show()
print("-----")
time.sleep_ms(1000)
led.off()
oled.fill(0)
oled.text("It'smymother",0,0)
oled.show()
time.sleep_ms(1000)
oled.fill(0)
oled.text("It'smy",0,0)
oled.show()
print("clear---------------")
p13.irq(fun, Pin.IRQ_RISING)