import time
from machine import Pin, SoftI2C
from ssd1306 import SSD1306_I2C
i2c = SoftI2C(scl = Pin(33), sda = Pin(25))
oled = SSD1306_I2C(128, 64, i2c, addr = 0x3c)
Human = Pin(15, Pin.IN, Pin.PULL_UP)
def fun(Human):
for i in range(5):
oled.fill(0)
oled.text("xieyuxuan", 0,0)
oled.text("Human body test:", 0,15)
oled.text("Get People!!!", 0,40)
oled.show()
time.sleep_ms(500)
oled.fill(0)
oled.text("xieyuxuan", 0,0)
oled.text("Human body test:", 0,15)
oled.text(" ", 0,40)
oled.show()
time.sleep_ms(500)
Human.irq(fun,Pin.IRQ_RISING)