import machine
import utime

potentionmetre = machine.ADC(26)
servo = machine.PWM(machine.Pin(15))
servo.freq(50)

# potentio -> de 0 à 65535
# Servo -> 1500 à 8000 =6500

while True:
  print('\npotentio : ', potentionmetre.read_u16())
  print('potentio conv : ', round(potentionmetre.read_u16() / 364.08, 1))
  servo.duty_u16()
  servo.duty_u16(int(round((potentionmetre.read_u16() / 10) +1499, 0)))
  print('\nServo nmbre : ', int(round((potentionmetre.read_u16() / 10) +1499, 0)))
  utime.sleep(0.02)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT