print("Hello, Students")
print("This program will display series of text on OLED screen")
print("Created by : Ahmad Haziq on 20/11/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 whwn device has library)
#Object_Name = Library_Name.Class_Name(......)
screen = SSD1306_I2C(width = 128, height = 64, i2c = OLED_Pin)
#Parameter Declaration (optional)
#Main Progress
#OLED code colour --> 1 is for RED, 0 is for BLUE
screen.fill(0)
screen.text("Hello guyss", 10, 10, 1) #("TEXT" , x-axis, y-axis, fontcolour)
screen.text("selamat hari ", 10, 30, 1) #("TEXT" , x-axis, y-axis, fontcolour)
screen.text("raya semua", 15, 50, 1) #("TEXT" , x-axis, y-axis, fontcolour)
screen.show()