Ⅰ. 通过分布在各个观测点的温度和湿度传感器采集数据。
Ⅱ. 通过无线信号,将采集的数据实时上传至服务器。
Ⅲ. 服务器对数据进行存储、处理和统计,客户端(包括手机和PC)可通过网页查看数据。
(1)该系统的硬件架构如第11题图所示,图中的①②两处的硬件设备分别为

A. 传感器、服务器 B. 服务器、传感器 C. 智能终端、服务器 D. 服务器、智能终端
(2)温度传感器每隔5秒采集一次温度数据并作处理,代码如下。请完善划线处代码。
while True:
temp=round(pin1.read_analog()*330/1024)
if temp>=20 and temp<=30:
display.show(Image.HAPPY)
else:
display.show(Image.SAD)
(3)以下是
from flask import Flask, render_template, request
import sqlite3
app = Flask(__name__)
# 主页面可实现客户端数据查询功能,路由命令及对应的视图函数,代码略
@app.route("/input", methods=["GET"]) # 获取温度数据
def add_data():
id = int(request.args.get("id"))
val = float(request.args.get("val"))
conn = sqlite3.connect("data.db")
cur = conn.cursor()
cur.execute("insert into temp(id,value) values(%d,%f)" % (id, val))
conn.commit()
cur.close()
if __name__ == "__main__":
app.run(host="192.168.1.100", port=5000)
请回答以下问题:
①存放温度的数据表名称为
②程序划线处应填写的代码是

同类型试题

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

