本项目介绍如何使用NodeMCU收集环境中的温度数据,并将其传输到远程服务器上的MySQL数据库中进行存储和管理。
连接MySQL服务器:conn:connect(8080, 10.4.212.189)
发送采集的温度数据给MySQL服务器:
```
conn:send(GET /xintiao.php?name= .. name..&shidu;=..tempreturex ..&wendu;=..tempreture.. HTTP/1.1\r\nHost: 10.4.212.189\r\n .. Connection: keep-alive\r\nAccept: */*\r\n\r\n)
```
打印输出温度数据:
```
print(shidu= .. tempreturex .. wendu=..tempreture..-----------------------------------------)
```