print("Hello,Students")
print("This program will display series of text on OLED screen")
print("Created by : your name on 7/4/2025")
#Import libraries/modules
from machine import Pin, SoftI2C
from ssd1306 import SSD1306_I2C
#Pin Declaration
SCL_Pin = Pin(22, Pin.OUT)
SDA_Pin = Pin(21, Pin.OUT)
OLED_Pin = SoftI2C(scl = SCL_Pin, sda = SDA_Pin)
#Object Declaration (Only needed when device has library)
#Object_Name = Library_Name.Class_Name(.....)
screen = oled_library.SSD1306_I2C(width = 128, height = 64, i2c= OLED_Pin)
#Parameter Declaration (optional)
#Main Program
#OLED code color --> 1 is for WWHITE, 0 is for BLACK
screen.fill(0)
screen.text("Hello guys", 10, 10, 1) #("TEXT" , x-axis, y-axis, fontcolor)
screen.text("Selamat hari", 10, 30, 1) #("TEXT" , x-axis, y-axis, fontcolor)
screen.text("raya", 15, 50, 1) #("TEXT" , x-axis, y-axis, fontcolor)
screen.show()