from machine import Pin, I2C
import ssd1306
import time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
Relay = Pin(4, Pin.OUT)
oled.text("MENGHUBUNGKAN..", 0, 30)
oled.show()
time.sleep(5)
oled.fill(0)
oled.text("KUMIS123", 20, 30)
oled.show()
time.sleep(7)
oled.fill(0)
oled.text("wifi terhubung..", 0, 30)
oled.show()
time.sleep(5)
oled.fill(0)
oled.text("MOTOR SIAP", 0, 10)
oled.text("BEKERJA TIME 14", 0, 20)
oled.show()
time.sleep(14)
Relay.value(1)
oled.fill(0)
oled.text("ON RELAY", 0, 10)
oled.text("MOTOR BEKERJA", 10, 20)
oled.show()
time.sleep(10)
Relay.value(0)
oled.fill(0)
oled.text("OFF RELAY", 0, 10)
oled.text("MOTOR BERHENTI", 0, 20)
oled.show()