①开发模式的选择 ②概要设计 ③需求分析 ④详细设计 ⑤可行性分析
在实施时正确的步骤是( )
信息采集终端部分代码如下:
IP = "10.89.1.2" ; PORT= "8080" ; SSID = "jxtx" #设置连接参数
PASSWORD = "20220626"
Uart.init(baudrate = 115200,bits=8,parity=None,stop=1,tx=pin2,rx=pin1) while Obloq.connectWifi(SSID, PASSWORD, 10000) ! = True:
display.show(Image.SAD) display.scroll(Obloq. ifconfig( ))
Obloq.httpSet(IP, PORT) #根据ip 和port 建⽴连接
while True:
temp,hum = dht11.read(16) #读取温度、湿度
ermo,resp = Obloq.get("input?x="+str(temp)+ "&y="+str(hum), 10000)
if errno== 200:
display.scroll(resp)
else:
display.scroll(str(errno))
sleep(1000*60) #设置采集间隔时间
WEB 服务器部分代码如下所示:
from flask import Flask
app = Flask( name )
@app.route('/') def index():
#读取终端最近一次的温度和湿度存⼊ temp 和hum,代码略return "当前温度"+str(temp)+ "当前湿度"+str(hum)
@app.route('/input',methods=['POST', 'GET']) def add_data(): #终端上传最新采集的数据
#代码略
if name == ' main ':
app.run(host="10.89.1.2", port=8080)
A. //10.89.1.2:8080/input?temp=28&hum=53
B. //10.89.1.2:8080/input&temp=28?hum=53
C. //10.89.1.2:8080/input?x=28&y=53
D. //10.89.1.2:8080/input &x=28?y=53
图a |
图b |
统计及可视化的部分程序如下,请补充完善:
df=pd.read_excel('温度数据.xlsx') df1 =
g1=df1.groupby('⽉份',as_index=False).count( )
plt.bar(g1.⽉份, g1.温度)
plt.title('1-6 ⽉份发出温度报警提醒次数情况')
plt.show( )