from machine import Pin, I2C, ADC
from ssd1306 import SSD1306_I2C
from utime import sleep

i2c=I2C(0,sda=Pin(0), scl=Pin(1), freq=400000)
oled = SSD1306_I2C(128, 64, i2c)
analog_value = ADC(28)
  
while True:
  pot_value = analog_value.read_u16()
  print(pot_value)
  converted_val = str(pot_value) # Zum Anzeigen muss Wert in String kovertiert werden
  oled.fill(0)
  oled.text("Value: " + converted_val, 0, 25)
  oled.show()
  sleep(0.05)

 
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT