基于arduinoethernet的在线温度记录仪

基于arduinoethernet的在线温度记录仪

ID:11417347

大小:610.00 KB

页数:10页

时间:2018-07-11

基于arduinoethernet的在线温度记录仪_第1页
基于arduinoethernet的在线温度记录仪_第2页
基于arduinoethernet的在线温度记录仪_第3页
基于arduinoethernet的在线温度记录仪_第4页
基于arduinoethernet的在线温度记录仪_第5页
资源描述:

《基于arduinoethernet的在线温度记录仪》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、基于Arduino ethernet shield与18B20的温度记录仪wxxmickey 发表于 - 2010-1-218:15:000推荐全文摘自:http://www.codetorment.com/2009/11/12/arduino-temperature-and-light-data-logging-and-chartplotting-webmonitor/ArduinotemperaturedataloggerAnarduino,aDB18S20one-wiretemperaturesensorandanLDR(LightDepen

2、dentResistor)arehookedupwithsomeresistorsandanethernetshieldtomakeadataloggerandwebmonitor.Notes:·forthissetuptheconnectionsaremadeontheethernetshieldinsteadofdirectlyonthearduino.SinceFritzingmissesalibrarywithexternalshieldIusedthearduino,thepinoutstaysthesameeitherway.·chec

3、ktheDS18B20datasheetforthespecificationsonhookingupthesensorinparasiteorpoweredmodeSchematics:arduino读取传感器温度每十秒一次并把温度数据上传到网站上,并以TXT文件存储随后将数据制成折线图readsthesensorsevery10secondsandpassesthedatatoaphponyourwebsite;whichthenstoresthedatainatextfile.Asecondgeneratesalinechartoftheco

4、llecteddata.22hoursoftemperaturedataIstartedfromCyberspice’scodeandchangedthearduinocodetomakeuseoftheDB18S20andtheethernetshield.A一个变量加入了上传的php用于除温度外还存储光的强度variablewasaddedtotheuploadphpinordertostorethelightintensityinadditiontothetemperature.图表还显示了‘最低温度’‘最高温度’‘平均温度’‘当前温度’Th

5、egraphingwasalteredtoalsodisplaytheminimumtemperature,themaximumtemperature,thecurrenttemperatureandtheaveragetemperature.Arasterwasaddedforabetterinterpretationoftheplotteddataandagreenlineisshowingtheaveragetemperature troughoutthechart.你需要改成自己的IPYouneedtoalteryourip,domaina

6、ndpathasIexplainedinthepostArduinoWirelessmotiondetectorsoIwon’tgointothosedetailshere.Thearduinosketch:#include#include#includeintcount=0;OneWireds(8);intHighByte,LowByte,TReading,SignBit,Tc_100,Tf_100,Whole,Fract;intTcount=1;intW[6];intF[6];i

7、ntphotocellPin=0;//thecelland10Kpulldownareconnectedtoa0intlight;//theanalogreadingfromthesensordividerbytemac[]={0xDE,0xAD,0xBE,0xEF,0xFE,0xED};byteip[]={192,168,1,36};byteserver[]={77,222,78,32};//Stringbuffercharbuffer[256];Clientclient(server,80);voidsetup(){Ethernet.begin

8、(mac,ip);Serial.begin(9600);delay(1000);//Serial.println("con

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。