m=35; cnt=0
while True:
x=pin2.read_analog() #获取温度传感器的温度数据
if x>m:
m=x; cnt=1
elif x==m :
cnt+=1
if cnt>=60:
pin14.write_digital(1) #打开LED灯
else:
pinl4.write_digital(0) #关闭LED 灯
sleep (1000) #延时1秒
下列说法正确的是( )
A.温度传感器连接在14号引脚 |
B.LED灯连接在2号引脚 |
C.经传感器获取且转换得到的温度数据x属于数字信号 |
D.只要温度高于35且持续60秒以上,则LED灯亮 |

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

