<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=W5100_Arduino_Ethernet_Shield</id>
	<title>W5100 Arduino Ethernet Shield - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=W5100_Arduino_Ethernet_Shield"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=W5100_Arduino_Ethernet_Shield&amp;action=history"/>
	<updated>2026-06-04T19:36:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=W5100_Arduino_Ethernet_Shield&amp;diff=12196&amp;oldid=prev</id>
		<title>Chao at 13:54, 28 November 2016</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=W5100_Arduino_Ethernet_Shield&amp;diff=12196&amp;oldid=prev"/>
		<updated>2016-11-28T13:54:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
==Demo Code to show a single value as a web server ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Arduino&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Web Server&lt;br /&gt;
 *&lt;br /&gt;
 * A simple web server that shows the value of the analog input pins.&lt;br /&gt;
 */&lt;br /&gt;
#include &amp;lt;Ethernet.h&amp;gt;&lt;br /&gt;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };&lt;br /&gt;
byte ip[] =  { 192, 168, 0, 15 };&lt;br /&gt;
&lt;br /&gt;
Server server(80);&lt;br /&gt;
&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Ethernet.begin(mac, ip);&lt;br /&gt;
  server.begin();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  Client client = server.available();&lt;br /&gt;
  if (client) {&lt;br /&gt;
    // an http request ends with a blank line&lt;br /&gt;
    boolean current_line_is_blank = true;&lt;br /&gt;
    while (client.connected()) {&lt;br /&gt;
      if (client.available()) {&lt;br /&gt;
        char c = client.read();&lt;br /&gt;
        // if we've gotten to the end of the line (received a newline&lt;br /&gt;
        // character) and the line is blank, the http request has ended,&lt;br /&gt;
        // so we can send a reply&lt;br /&gt;
        if (c == '\n' &amp;amp;&amp;amp; current_line_is_blank) {&lt;br /&gt;
          // send a standard http response header&lt;br /&gt;
          client.println(&amp;quot;HTTP/1.1 200 OK&amp;quot;);&lt;br /&gt;
          client.println(&amp;quot;Content-Type: text/html&amp;quot;);&lt;br /&gt;
          client.println();&lt;br /&gt;
         &lt;br /&gt;
          // output the value of each analog input pin&lt;br /&gt;
          client.print(&amp;quot;welcome to electrodragon&amp;quot;);&lt;br /&gt;
          client.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          client.print(&amp;quot;//*************************************&amp;quot;);&lt;br /&gt;
          client.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          client.print(www.electrodragon.com);&lt;br /&gt;
          client.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          client.print(&amp;quot;//*************************************&amp;quot;);&lt;br /&gt;
          client.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          for (int i = 0; i &amp;lt; 6; i++) {&lt;br /&gt;
            client.print(&amp;quot;analog input &amp;quot;);&lt;br /&gt;
            client.print(i);&lt;br /&gt;
            client.print(&amp;quot; is &amp;quot;);&lt;br /&gt;
            client.print(analogRead(i));&lt;br /&gt;
            client.println(&amp;quot;&amp;quot;);&lt;br /&gt;
          }&lt;br /&gt;
          break;&lt;br /&gt;
        }&lt;br /&gt;
        if (c == '\n') {&lt;br /&gt;
          // we're starting a new line&lt;br /&gt;
          current_line_is_blank = true;&lt;br /&gt;
        } else if (c != '\r') {&lt;br /&gt;
          // we've gotten a character on the current line&lt;br /&gt;
          current_line_is_blank = false;&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    client.stop();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
* [http://www.electrodragon.com/?p=8419 A demo tutorial here.]&lt;br /&gt;
&lt;br /&gt;
[[category:Ethernet]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>