# ตัวอย่าง การเขียนโปรแกรม Micropython ควบคุมการทำงาน ESP32
# LAB06 OLED A
# ครูวิบูลย์ กัมปนาวราวรรณ พฤหัสบดี 11 กรกฏาคม 2567
from machine import Pin, I2C
import ssd1306
print("LAB06 OLED - Viboon Kumpanavarawan")
# 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('Hello, Wokwi!', 0, 0)
oled.text('ESP32 Micropython', 0, 15)
oled.text('ROOM6406 KTC', 0, 30)
oled.show()