from microbit import *
while True:
temp=pin2.read_analog()
if temp>25:
display.show(Image.ANGRY)
sleep(2000)
elif temp<18:
display.shou(Image.SAD)
#休眠3秒
else:
display.show(Image.HAPPY)