ESP32+DS18B20溫度感測器的C#圖形化資料收集
利用手上DS18B20的模組經由ESP32wifi Mesh網絡將溫度讀值經由中控台的GUI接收, 再由顯示介面即時顯示出來.
圖一: ESP32+DS18B20模組
#include <Wire.h>
#include <DallasTemperature.h>
const int oneWireBus = 4;
OneWire oneWire(oneWireBus);
DallasTemperature sensors(&oneWire);
// Variables to store temperature values
String temperatureF = "";
String temperatureC = "";
float tempC,oldtemp;
自己的ESP32 Mesh網絡DS18B20為Node5
手握住DS18B20溫度上升
myObject["function"] = DS18B20
startHere: Received from 2085224085 msg={"node":5,"function":"DS18B20","Temperature":23.19}
演示影片
沒有留言:
張貼留言