from machine import Pin, I2C
import ssd1306
# ESP32 Pin assignment
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled_width = 128
oled_height = 64
oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c)
oled.text('Selamat Hari', 10, 10)
oled.show()
oled.text('Raya!!!', 25, 25)
oled.show()
from machine import Pin
from time import sleep
led1 = Pin(12, Pin.OUT)
led2 = Pin(15, Pin.OUT)
led3 = Pin(2, Pin.OUT)
while True:
led1.on()
sleep(0.080)
led1.off()
sleep(0.080)
led2.on()
sleep(0.080)
led2.off()
sleep(0.080)
led3.on()
sleep(0.080)
led3.off()
sleep(0.080)