from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
import framebuf
import graphics
# Set up I2C for the OLED display
i2c = I2C(1, scl=Pin(7), sda=Pin(6)) # Use GP6 (SDA) and GP7 (SCL)
oled = SSD1306_I2C(128, 32, i2c) # 128x32 display
# Create a frame buffer and load the image data into it
fb = framebuf.FrameBuffer(graphics.dakota, 128, 32, framebuf.MONO_HLSB)
# Blit (copy) the frame buffer onto the OLED display
oled.blit(fb, 0, 0)
# Show the image on the OLED
oled.show()