<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89%2Fzh</id>
		<title>Microduino W5500网络（八）/zh - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;action=history"/>
		<updated>2026-04-21T11:37:38Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7680&amp;oldid=prev</id>
		<title>Radiumray9@gmail.com：/* 程序 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7680&amp;oldid=prev"/>
				<updated>2015-02-02T03:16:28Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;程序&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2015年2月2日 (一) 03:16的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;第58行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第58行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==程序==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==程序==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced_Tutorial/W5500Code/MicroduinoW5500Eight MicroduinoW5500Eight]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==调试==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==调试==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Radiumray9@gmail.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7614&amp;oldid=prev</id>
		<title>Radiumray9@gmail.com：/* 原理图 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7614&amp;oldid=prev"/>
				<updated>2015-01-30T05:26:37Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;原理图&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2015年1月30日 (五) 05:26的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot; &gt;第50行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第50行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:MicroduinoW5500EightSchematic.png|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:MicroduinoW5500EightSchematic.png|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;ENC28J60&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;W5500&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-RJ45&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-RJ45&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-Core&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Microduino-Core&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Radiumray9@gmail.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7612&amp;oldid=prev</id>
		<title>Radiumray9@gmail.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | ==目的== 本教程将教大家如何控制两个Led，并用更为时尚的网页元素—图像。  ==设备== *'''Microduino-Core/zh''' *...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_W5500%E7%BD%91%E7%BB%9C%EF%BC%88%E5%85%AB%EF%BC%89/zh&amp;diff=7612&amp;oldid=prev"/>
				<updated>2015-01-30T05:07:13Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | ==目的== 本教程将教大家如何控制两个Led，并用更为时尚的网页元素—图像。  ==设备== *&amp;#039;&amp;#039;&amp;#039;&lt;a href=&quot;/index.php/Microduino-Core/zh&quot; title=&quot;Microduino-Core/zh&quot;&gt;Microduino-Core/zh&lt;/a&gt;&amp;#039;&amp;#039;&amp;#039; *...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==目的==&lt;br /&gt;
本教程将教大家如何控制两个Led，并用更为时尚的网页元素—图像。&lt;br /&gt;
&lt;br /&gt;
==设备==&lt;br /&gt;
*'''[[Microduino-Core/zh]]'''&lt;br /&gt;
*'''[[Microduino-USBTTL/zh]]'''&lt;br /&gt;
*'''[[Microduino-W5500/zh]]'''&lt;br /&gt;
*'''[[Microduino-RJ45/zh]]'''&lt;br /&gt;
&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
**USB数据连接线   一根&lt;br /&gt;
**LED灯           两个&lt;br /&gt;
**220欧姆电阻      两个&lt;br /&gt;
&lt;br /&gt;
==图像==&lt;br /&gt;
&lt;br /&gt;
首先你要明白当一个网页引用了一些外部资源（如图像，javascript...）后的处理流程：&lt;br /&gt;
&lt;br /&gt;
*用户的浏览器连接web服务器，请求HTML网页。&lt;br /&gt;
*浏览器解析页面，找到外部资源。&lt;br /&gt;
*浏览器向服务器请求每一个外部资源。&lt;br /&gt;
&lt;br /&gt;
当服务器应答，它在响应的头文件中告诉浏览器他发送的文件MIME类型。下面这个例子（用Fiddler嗅探）是关于PNG图像。&lt;br /&gt;
[[File:Fiddler嗅探.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Microduino代码应该能够：&lt;br /&gt;
&lt;br /&gt;
*读取浏览器的请求（保存在buffer中）。&lt;br /&gt;
*识别浏览器请求的资源（HTML页面、图像...）。&lt;br /&gt;
*创建一个正确的头文件（含类型Content-Type）。&lt;br /&gt;
*发送头文件和请求的资源到浏览器。&lt;br /&gt;
&lt;br /&gt;
==二进制资源==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
图片是一个二进制文件，在这个例子中我们应该能够把它以字节数组（byte arrays）的形式存放在我们的代码中。bin2h这个工具可以帮助我们进行转换。&lt;br /&gt;
&lt;br /&gt;
转换结果是一个文本文件：&lt;br /&gt;
[[File:Bin2h.jpg|600px|center|thumb]]&lt;br /&gt;
为了节省Microduino内存，我们用PROGMEM指令存储在flash中：&lt;br /&gt;
[[File:W5500Imagebincode.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==原理图==&lt;br /&gt;
&lt;br /&gt;
[[File:MicroduinoW5500EightSchematic.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Microduino-ENC28J60&lt;br /&gt;
*Microduino-RJ45&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-USBTTL&lt;br /&gt;
层层堆叠，再插上网线。&lt;br /&gt;
&lt;br /&gt;
==程序==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==调试==&lt;br /&gt;
&lt;br /&gt;
步骤一：首先需要确保你的IDE中有_02_Microduino_Ethernet_WIZ库，如果没有下载放到你的IDE的libraries文件夹中，重启IDE。&lt;br /&gt;
 &lt;br /&gt;
步骤二：如果你的IDE的libraries文件夹中还有之前的Ethernet库的话，需要删除掉，因为之前的Ethernet是根据W5100协议编写的。&lt;br /&gt;
 &lt;br /&gt;
然后需要改动一下_02_Microduino_Ethernet_WIZ文件以使库函数与Microduino-W5500模块的引脚对应： &lt;br /&gt;
先找到_02_Microduino_Ethernet_WIZ库中的utility文件夹里的w5100.h &lt;br /&gt;
把代码中的 #define wiz_cs_pin 8 //CS_PIN 改为 #define wiz_cs_pin 10 //CS_PIN 就可以了。 &lt;br /&gt;
&lt;br /&gt;
步骤三：解释一下代码：&lt;br /&gt;
&lt;br /&gt;
//我们的代码解析浏览器的请求，如果请求两个图片中的一个图片，调用send_png_image()方法，把它发送给浏览器。&lt;br /&gt;
  if(strstr((char *)buffer, &amp;quot;GET /led_off.png&amp;quot;) != 0) {&lt;br /&gt;
  	send_png_image(led_off, sizeof(led_off));&lt;br /&gt;
  }&lt;br /&gt;
  else if(strstr((char *)buffer, &amp;quot;GET /led_on.png&amp;quot;) != 0) {&lt;br /&gt;
  	send_png_image(led_on, sizeof(led_on));&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
//这个方法准备正确头文件添加图形文件的二进制数据发送响应给浏览器。&lt;br /&gt;
&lt;br /&gt;
  client.println(&amp;quot;HTTP/1.0 200 OK\r\n&amp;quot;);  &lt;br /&gt;
  client.println(&amp;quot;Content-Type: image/png\r\n\r\n&amp;quot;);&lt;br /&gt;
  client.write((uint8_t*)png_image, image_size);&lt;br /&gt;
&lt;br /&gt;
//如果浏览器的请求中包含?LEDx，Led的状态发生改变，HTML页面重新创建，根据Led的状态设定正确的图标。&lt;br /&gt;
&lt;br /&gt;
  if(strstr((char *)buffer, &amp;quot;GET /?LED1&amp;quot;) != 0) {&lt;br /&gt;
  	led1Status = !led1Status;&lt;br /&gt;
  	digitalWrite(LED1PIN, led1Status);&lt;br /&gt;
  }&lt;br /&gt;
  if(strstr((char *)buffer, &amp;quot;GET /?LED2&amp;quot;) != 0) {&lt;br /&gt;
  	led2Status = !led2Status;&lt;br /&gt;
&lt;br /&gt;
步骤四：连接好灯泡，如下图：&lt;br /&gt;
[[File:MicroduinoW5500EightConnected.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
步骤五：下载代码并编译通过。&lt;br /&gt;
&lt;br /&gt;
步骤六：用浏览器访问Microduino的IP地址后，点击页面上的连个图标按钮，看看灯泡有啥反应。&lt;br /&gt;
&lt;br /&gt;
==结果==&lt;br /&gt;
&lt;br /&gt;
访问你的Microduino IP地址，当用户点击其中一个图标，浏览器将请求该页面并添加?LEDx后缀：Microduino将改变相应的Led状态和图标的颜色。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==视频==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Radiumray9@gmail.com</name></author>	</entry>

	</feed>