arduino多点网络温度采集项目

上传人:大米 文档编号:508683552 上传时间:2023-04-14 格式:DOC 页数:20 大小:938KB
返回 下载 相关 举报
arduino多点网络温度采集项目_第1页
第1页 / 共20页
arduino多点网络温度采集项目_第2页
第2页 / 共20页
arduino多点网络温度采集项目_第3页
第3页 / 共20页
arduino多点网络温度采集项目_第4页
第4页 / 共20页
arduino多点网络温度采集项目_第5页
第5页 / 共20页
点击查看更多>>
资源描述

《arduino多点网络温度采集项目》由会员分享,可在线阅读,更多相关《arduino多点网络温度采集项目(20页珍藏版)》请在金锄头文库上搜索。

1、v1.0可编辑可修改#Ether net Shield on Arduino - a webserver exampleProject n ote Ardui no Ether net Shield1. SchematicThe Arduino Ethernet Shield is dedicatedfor the Arduino boards. It uses the Microchip sENC28J60 SPI based stand-alone Ethernet controller (download datasheet here ) and a compatibleRJ45 soc

2、ket with magnetics. Since the ENC28J60 is a 3V3 device that only drive 3V3 logic level output but capable of accepting 5V logic input, a 5V CMOS/TTL quad positive AND gates 74HCT08D is used to convert the logic level output to 5V logic level.IP列tpa;1453J,x;s:Tickft7fi7KJ3J3U3D124ADOIgAD!adj3JAD 3_6Q

3、5Fig 1. Arduino Ethernet Shield schematic2. Software StructureThe Ethernet Shield software is in the format of Arduino library, which you can download fromhere. The library is implemented based on s open-source TCP/IP stack for Atmega88 and ENC28J60. The main files in the library are- a wrapper cpp

4、file, as an Arduino library interface with tuxgraphic s codesimplified TCP/IP stack implementationENC28J60 SPI routinesnetwork protocol definitions3. TCP/IP implementationThe standard TCP is a protocl to establish a connection. To do this, a number of packets needsto be exchaged between two sides fi

5、rst to establish the connection; then data packets can be exchaged. Usually a complicated state-machine is needed to implement the TCP protocol.For Auduino s ATMEGA168a 8-bit AVRmicrocontroller with 1K SRAM,it is impossible to implement the full TCP stack. Also the webpage for 8-bit microcontroller

6、that normally is used to control a relay or read a temperature sensor etc., is very simple. Therefore, instead of implementingfull TCP protocl, a single data packet TCPprotocol is used. You webpage contents, including all html tags, must be in one packet. The length of packet is limited by the SRAM

7、size, currently half of the RAM space (500 bytes) is used for network Packet buffer. It is sufficient for simple webpages as shown below.4. Ethersheild library installation & modificationFirst download the ethershield libraryhere , then copy & unzip the library in your Arduino IDElibrary directory (

8、for example arduino-0010/hardware/libraries/).There are three examples in the ethershield library, you might need to change the ip address in the example sketch (.pde) files. The ip address must be a free address with your network rangestatic uint8_t mymac6 = 0x54,0x55,0x58,0x10,0x00,0x24;static uin

9、 t8_t myip4 = 192,168,1,15;static char baseurl=;Also you might like to change the webpage contents in the print_webpage funtion. Note that the webpage contents are stored in the PROGMEM (using PSTR declaration) to save the precious SRAM space.5. ExamplesThree examples are included in the ethershield

10、 librarya PING exampleEep lyfrom192 .168丄15:Replyon192,16丄15:Beplyf PDA192.168丄丄15:Beplyf ron1921阴15:bytes =32 bytes-32 bytes =32 bytes =32Peplyf i*on192.168.1.15:bytes =32t ime =1 m?TTL=64Replyf ron192.68.1,15:bytes-32tlme1 msTTL-&4eplyf for192.ite-l-lS:hytes =32t lme =1iiisTTL=64Peplyf 1*011192-16

11、8.1,15:hytes =S2t Ime =1 msTTL=64!Ping iis t ics for 192-168.1.15:Packsi- - Sent - 4r Rece ived -4 ji Lot=毎 ping 192.168-1.15inging 1?2.t68,1.15 with 32 hyte of dta:t ine =lm IT L*6 4t irae =lin IT L=6 4t ime =1 rs T T Lt=6 4t i(ne=lms IT L =& 4Ping stat 1st ics oy- 192 _ 168 _ t. 15 :Packets: Sent

12、= 4” Rec&iued =雯.Lost = 0 C&x Ioss,fipproxinate round trip tines in mi Hi-seconds:Min imum Iris, Haxinun Ims Auei*Ae 1 msa gen eral webserver examplev1.0可编辑可修改#a webserver with temperature sen sor (DS18B20) readi ngs New Webserver example, switch on/off LED#i nclude mac and ip have to be uniqueYou c

13、an not have the same nu mbers inif(buf,ple n)(buf);return;3a2fLinks & DownloadsArduino Ethernet Shield schematicArduino ethershield library - new version with web client funtions & examplesMicrochip ENC28J60 datasheetTags: Arduino , ethernet , network , ping , project , web serverv1.0可编辑可修改#This entry was posted on Monday, August 25th, 2008 at 5:45 pm and is filed underArduino projects . You can followan

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 工作计划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号