##############################################################
# Monochrome 128x64 OLED Interface #
##############################################################
#
# Monochrome 128x64 OLED display with Raspberry Pi Pico / W / 2 / w2 (Hardware & Simulation)
#
# Check out the link for Code explanation and Hardware details
# Link:
# http://tech.arunkumarn.in/blogs/raspberry-pi-pico/
#
#
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
import framebuf
import time
i2c=I2C(1,scl=Pin(3),sda=Pin(2),freq=400000)
display = SSD1306_I2C(128, 64, i2c)
def display_message():
display.fill(0)
display.text('Welcome to',25,20)
display.show()
time.sleep_ms(250)
display.text("Aavishkarah",20,34)
display.show()
while True:
display.invert(1)
display.contrast(100)
display_message()
time.sleep_ms(2000)
display.invert(0)
display.contrast(0)
display_message()
time.sleep_ms(2000)