基于 Arduino ethernet shield 与 18B20 的温度记录仪wxxmickey 发表于 - 2025-1-2 18:15:000推 举全文摘自:http://www.codetorment.com/2025/11/12/arduino-temperature-and-light-data-logging-and-chartplotting-webmonitor/Arduino temperature data loggerAn arduino, a DB18S20 one-wire temperature sensor and an LDR (Light Dependent Resistor) are hooked up with some resistors and an ethernet shield to make a datalogger and webmonitor.Notes :for this setup the connections are made on the ethernet shield instead of directly on the arduino. Since Fritzing misses a library with external shield I used the arduino, the pinout stays the same either way. check the DS18B20 datasheet for the specifications on hooking up the sensor in parasite or powered mode Schematics : arduino 读取传感器温度每十秒一次并把温度数据上传到网站上,并以 TXT 文件存储 随后将数据制成折线图 reads the sensors every 10 seconds and passes the data to a php on your website; which then stores the data in a text file. A second generates a line chart of the collected data.22 hours of temperature dataI started from Cyberspice’s code and changed the arduino code to make use of the DB18S20 and the ethernet shield.A 一个变量加入了上传的 php 用于除温度外还存储光的强度 variable was added to the upload php in order to store the light intensity in addition to the temperature.图表还显示了‘最低温度’‘最高温度’‘平均温度’‘当前温度’The graphing was altered to also display the minimum temperature, the maximum temperature, the current temperature and the average temperature. A raster was added for a better interpretation of the plotted data and a green line is showing the average temperature troughout the chart.你需要改成自己的 IPYou need to alter your ip, domain and path as I explained ...