<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Puck&#039;s Workbench &#187; HTML Code</title>
	<atom:link href="http://www.e-techgarage.com/Puck/category/web_development/html_code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.e-techgarage.com/Puck</link>
	<description>Embedded Geek</description>
	<lastBuildDate>Thu, 22 Apr 2010 00:00:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rover with Web Server and AJAX</title>
		<link>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/</link>
		<comments>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:32:39 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[HTML Code]]></category>
		<category><![CDATA[JavaScripting]]></category>
		<category><![CDATA[Rover]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=601</guid>
		<description><![CDATA[In my previous post I showed how fast it was to bring the Rabbit Web Server into the project.  Of course, I could just be a terrible liar so here is video showing the Wi-Fi web server in action.

It&#8217;s a Plain-Jane web page but we can always add a style sheet later to beautify it.
]]></description>
			<content:encoded><![CDATA[<p>In my previous post I showed how fast it was to bring the Rabbit Web Server into the project.  Of course, I could just be a terrible liar so here is video showing the Wi-Fi web server in action.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/apkrutnl680&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/apkrutnl680&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>It&#8217;s a Plain-Jane web page but we can always add a style sheet later to beautify it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rover, Scholar, Explorer, Poet, and Web Server</title>
		<link>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/</link>
		<comments>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:15:52 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[HTML Code]]></category>
		<category><![CDATA[JavaScripting]]></category>
		<category><![CDATA[Rover]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=547</guid>
		<description><![CDATA[
One of the reasons why the Rabbit is so compelling as an embedded computer is that with all the different work we are doing with motors and sensor tuning adding an interactive web server is quick and painless.
Here are the preliminary goals:

Wi-Fi connectivity
Web Server
Use Asynchronous JavaScript and XML (AJAX) to display Rover data in real-time

Here [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Rover_w_plume.bmp"><img class="aligncenter size-full wp-image-548" style="border: 2px solid black;" title="Rover_w_plume" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Rover_w_plume.bmp" alt="A Renaissance Robot with many skills" width="416" height="264" /></a></p>
<p>One of the reasons why the Rabbit is so compelling as an embedded computer is that with all the different work we are doing with motors and sensor tuning adding an interactive web server is quick and painless.</p>
<p>Here are the preliminary goals:</p>
<ul>
<li>Wi-Fi connectivity</li>
<li>Web Server</li>
<li>Use Asynchronous JavaScript and XML (AJAX) to display Rover data in real-time</li>
</ul>
<p>Here is what we need to make this happen:</p>
<ul>
<li>A web page</li>
<li>An XML file</li>
<li>A C program to run on the rover</li>
</ul>
<h2>The Gratuitous Self-Plug</h2>
<p>If you are concerned about the nitty-gritty of how this all works and want to try it yourself, take a look at my<a href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html"> Rabbit-Geek&#8217;s AJAX Workbook</a>.  It has step-by-step instructions, examples, and code you can use on your own.</p>
<p style="text-align: center;"><a title="Rabbit-Geek Workbook" href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html"><strong>Rabbit-Geek Workbook for the Web, RabbitWeb, JavaScript, and AJAX</strong></a></p>
<p style="text-align: left;">The rest of the article will be a big picture explanation of how this works.</p>
<h2>Easy Wi-Fi</h2>
<p>You can configure all the Wi-Fi network settings in the compiler or the code.  In this case, I have configured everything in the compiler like this:</p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Wi-Fi_Settings.JPG"><img title="Wi-Fi_Settings" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Wi-Fi_Settings.JPG" alt="Wi-Fi_Settings" width="552" height="547" /></a></p>
<p>This configuration looks harder than it actually is.   In the TCP_CONFIG.LIB file that comes with the compiler you will find a series of Wi-FI templates for each type of encryption.  I just copied the configuration from the file into this compiler window and then tweaked it for my specific network.</p>
<p>(For the hackers out there, I have foiled your attempts by obscuring my Wi-Fi network password with the <strong><span style="color: #ff0000;">Red Rectangle of Redaction</span></strong>. <img src='http://www.e-techgarage.com/Puck/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p style="text-align: center;"><strong>Time to Configure Wi-Fi = </strong><strong>5 minutes or less</strong></p>
<h2>The Web Server</h2>
<p>Assuming for a moment that we have the web page and XML file ready, let&#8217;s look at how the Rabbit devices implement a web server.  Fortunately, by adding less than 40 lines of code to our program I can add an interactive web server with AJAX.</p>
<p><strong>Here is the C code:</strong></p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Web_Server_Basic1.JPG"><img class="alignnone size-full wp-image-574" title="Web_Server_Basic" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Web_Server_Basic1.JPG" alt="Web_Server_Basic" width="546" height="686" /></a></p>
<p>As you can see it isn&#8217;t too scary looking.  After the web server is initialized you just spin in the loop on the http_handler function which is non-blocking and typically returns in about 1 millisecond or less.</p>
<p style="text-align: center;"><strong>Time Creating a C File =</strong><strong> Approximately 20 minutes<br />
</strong></p>
<h2>The Amazing Mutating XML File</h2>
<p>The XML file is the easiest piece and while my XML might offend a real web developer, I&#8217;m an embedded engineer and it works.</p>
<p><strong>Here is the XML file before it is served:</strong></p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML.JPG"><img class="alignnone size-full wp-image-579" title="ROVER_XML" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML.JPG" alt="ROVER_XML" width="502" height="81" /></a></p>
<p>The only weird looking part of the XML file is the strange &#8220;<span style="color: #339966;"><strong>&lt;z? echo ($Rover_Data) </strong></span><strong><span style="color: #339966;">?&gt;</span></strong>&#8220;.  When the web server receives a request for the XML file it will strip this RabbitWeb code out and replace it with the value of the <strong>Rover_Data</strong> string variable from my embedded controller.</p>
<p>For example, if the Rover_Data variable held the string &#8220;<strong>Scooby Doo</strong>&#8221; the final served XML file would be updated.</p>
<p><strong>Here is the served XML file when Rover_Data = &#8220;Scooby Doo&#8221;</strong>:</p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML_W_DATA.JPG"><img class="alignnone size-full wp-image-583" title="ROVER_XML_W_DATA" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML_W_DATA.JPG" alt="ROVER_XML_W_DATA" width="375" height="77" /></a></p>
<p>If the web server gets a new request from the file and the Rover_Data string variable has changed, the XML file will also be updated before it is served to the browser.  That&#8217;s easy dynamic data for your web page.</p>
<p style="text-align: center;"><strong>Time Creating an XML File = Less than 5 minutes<br />
</strong></p>
<h2>The HTML page with special AJAX kung-fu</h2>
<p>The web page may be a bit intimidating but all it really does is:</p>
<p style="padding-left: 30px;">1. Use the JavaScript to figure out which browser you are using</p>
<p style="padding-left: 30px;">2. If your browser supports it, get a copy of the XML file from the server and use it to get the data</p>
<p style="padding-left: 30px;">3. Put that data on the web page every 500 milliseconds.</p>
<p><strong>Here is the HTML file:</strong></p>
<div id="attachment_590" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/rover_hmtl.JPG"><img class="size-medium wp-image-590 " style="border: 1px solid black;" title="rover_hmtl" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/rover_hmtl-300x200.jpg" alt="rover_hmtl" width="300" height="200" /></a><p class="wp-caption-text">Click to read the code</p></div>
<p>I just copied this from some of my <a href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html">Workbook</a> samples.</p>
<p style="text-align: center;"><strong>Time Editing the HTML File =</strong><strong> About 5 minutes</strong></p>
<h2>How Long Did That Take?</h2>
<p style="text-align: center;"><strong>Total Time to Add the Web Server = Less than an hour</strong></p>
<p>(It took me longer to write this blog post.  <img src='http://www.e-techgarage.com/Puck/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RabbitGeek Embedded Web Development</title>
		<link>http://www.e-techgarage.com/Puck/2009/11/30/rabbitgeek-embedded-web-development/</link>
		<comments>http://www.e-techgarage.com/Puck/2009/11/30/rabbitgeek-embedded-web-development/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 23:03:53 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[HTML Code]]></category>
		<category><![CDATA[JavaScripting]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=39</guid>
		<description><![CDATA[I have added a new article to our completed projects page with a short introduction video of my web seminars.  These seminars cover embedded web development.
YouTube Intro Video

In addition I created a developer&#8217;s workbook complete with sample programs to go with it.
You can view it all here:
The RabbitGeek&#8217;s Guide to Embedded Web Development
]]></description>
			<content:encoded><![CDATA[<p>I have added a new article to our completed projects page with a short introduction video of my web seminars.  These seminars cover embedded web development.</p>
<p><strong>YouTube Intro Video</strong></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/-jgKeP2aOrU&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/-jgKeP2aOrU&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>In addition I created a developer&#8217;s workbook complete with sample programs to go with it.</p>
<p>You can view it all here:<br />
<a href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html">The RabbitGeek&#8217;s Guide to Embedded Web Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2009/11/30/rabbitgeek-embedded-web-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
