import machine import utime # Read the analog inputs # Display the raw A/D readings on the terminal (0..4095) # Set the sampling rate to 200ms with the sleep() function a2d0 = machine.ADC(0) a2d1 = machine.ADC(1) a2d2 = machine.ADC(2) a2d3 = machine.ADC(3) sensor_temp = machine.ADC(4) conversion_factor = 3.3 / (65535) while True: a0 = int(a2d0.read_u16()/16) a1 = int(a2d1.read_u16()/16) a2d = sensor_temp.read_u16() reading = a2d * conversion_factor temperature = 27 - (reading - 0.706)/0.001721 print(a0, a1, a2d, temperature) utime.sleep(0.2)