from machine import Pin, ADC
from time import sleep

bot = Pin(0,Pin.IN,Pin.PULL_UP)
pot = ADC(28)
tem = ADC(4)
led = Pin(25,Pin.OUT)

while True:
    if bot.value() == 0:
        resp = input('Digite P ou "T" para ler potenciometro ou temperatura: ').lower()
        if resp == 'p':
            valor = pot.read_u16()
            print('Leitura potenciometro = ',valor)
            sleep(1)
        elif resp == 't':
            valor = tem.read_u16()
            print('Leitura do sensor: ',valor)
            sleep(1) 
        else:
            print('Resposta inválida.')
            sleep(1)
    else:
        print('Pressione botão')
        sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT