学进去-教育应平等而普惠
试题
类型:操作题
难度系数:0.65
所属科目:高中信息技术
小张设计了“智能植物管家系统”,该系统通过传感器收集土壤的温度和湿度数据并进行存储和处理,当土壤温度超出正常范围时,蜂鸣器发出警报,当土壤湿度低于阈值时,系统启动自动浇灌系统,通过数据库服务器记录运维数据,移动客户端和PC终端可以实时查看相关数据。系统的硬件设备连接方案如下图所示:

“智能植物管家系统”的智能终端采用micro:bit开发板,使用micro:bit 软件采集土壤温湿度数据,部分代码如下:

#导入相关库,代码略

@app.route("/input" , methods=[' POST’,’ GET'])

def add_data ():

#代码略

Uart. init(baudrate=115200 ,bits=8 , parity=None , stop=1, tx=pin2 ,rx=pin1)

#网络连接

while Obloq.connectWifi("zh", "pwd",10000)!=True

display. show("正在连接……")

display.scroll( Obloq.ifconfig())

Obloq.httpSet("192.168.2.13", "8080")

#采集传感器数据,并设置传输模式

while True :

temp=pin0.read_analog()

errno, resp =Obloq.get ("input ? id= 1&val = "+str( temp),10000)

if errno ==200 :

display.scroll(resp)

else :

display.scroll(str( errno))

sleep (1000*10)


根据材料回答下列问题:
(1)智能终端访问服务器的IP地址为______,智能终端与该温度传感器连接的引脚是_____
(2)综合上述代码,请你判断该系统编写服务器时,路由采用_____模式接收温度数据。(选填:“GET”/“POST” )
(3)若某时刻温度数值为25,则输入数据时使用的URL是( )(单选)   

A.http://192.168.2.13/inputval=25

B.http://192.168.2.13:8080/inputid=25

C.http://192.168.2.13:8080/id=1&val=25

D.http://192.168.2.13:8080/input?id =1&val=25


(4)若插入记录代码为cur.execute("insert into sensorlog(sensorid,sensorvalue, updatetime) values(%d, %f, "%s")"%(1,30.0,“00:00:00”)),则该系统访问的数据表是_____
编辑解析赚收入
收藏
|
有奖纠错

同类型试题

优质答疑

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

用户名称
2019-09-19

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

用户名称
2019-09-19
我要答疑
编写解析
解析:

奖学金将在审核通过后自动发放到帐

提交
我要答疑
我要答疑:
提交