import machine
import utime

# Multiplexer pin mappings
s0 = machine.Pin(18, machine.Pin.OUT)
s1 = machine.Pin(17, machine.Pin.OUT)
s2 = machine.Pin(16, machine.Pin.OUT)
e = machine.Pin(15, machine.Pin.OUT)

# Enable multiplexer
e.value(1)

# Set the appropriate s0, s1, and s2 pins to select channel 15
s0.value(1)
s1.value(1)
s2.value(1)

# Connect NTC temperature sensor to the appropriate pin on the multiplexer
ntc = machine.ADC(machine.Pin(26))

# Read temperature and convert to Celsius
temp = ntc.read_u16()
temp = int(round(-273.15 + (3.3 / temp - 1) / 0.0043))
print("Temperature: ", temp, "C")

# Disable multiplexer
e.value(0)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
CD74HC4067Breakout