print("Hello, Pi Pico!")
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
# Initialize I2C connection
i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400000)
oled = SSD1306_I2C(128, 64, i2c) # Create an instance of the SSD1306 OLED display
# Display text on the OLED
oled.text("Welcome To", 0, 0)
oled.text("Kirti College", 7, 10)
oled.text("Riddhi Chougule", 5, 20)
oled.text("TYIT 17", 22, 30)
# Show the text on the OLED display
oled.show()
# Optional: If you want to clear the screen and write again, you need to provide the coordinates.
# This line was incomplete, so I’ve added x and y coordinates
oled.text("Welcome To", 0, 40) # Example: Display "Welcome To" again at coordinates (0, 40)
oled.show() # Update the display to show the new text