<?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>oliciv.net</title>
	<atom:link href="http://www.oliciv.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oliciv.net</link>
	<description>Oli Allen&#039;s blog</description>
	<lastBuildDate>Wed, 10 Mar 2010 00:13:48 +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>Controlling an Arduino with PHP</title>
		<link>http://www.oliciv.net/controlling-an-arduino-with-php/</link>
		<comments>http://www.oliciv.net/controlling-an-arduino-with-php/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 22:42:55 +0000</pubDate>
		<dc:creator>oliallen</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://www.oliciv.net/blog/?p=13</guid>
		<description><![CDATA[Since PHP is my language of choice, it wasn&#8217;t long before I wanted to use it to control my Arduino.
This turned out to be easier said than done &#8211; under Windows anyway, with a lot of vague (mis)information out there. Not to mention a lot of &#8220;RTFM&#8221; advice.
The way I ended up doing is still [...]]]></description>
			<content:encoded><![CDATA[<p>Since PHP is my language of choice, it wasn&#8217;t long before I wanted to use it to control my Arduino.</p>
<p>This turned out to be easier said than done &#8211; under Windows anyway, with a lot of vague (mis)information out there. Not to mention a lot of &#8220;RTFM&#8221; advice.</p>
<p>The way I ended up doing is still a little too hacky for me to be happy with &#8211; PHP is clearly the wrong tool for the job here.</p>
<p><strong>The Problem</strong></p>
<p>PHP has trouble communicating with serial ports &#8211; a class is available to handle serial communication for you, but under Windows is write only.</p>
<p>I installed <a href="http://realterm.sf.net" target="_blank">RealTerm</a>, which has a feature to echo a serial port to a TCP/IP port, which PHP has no problem dealing with. Essensially, RealTerm will relay things back and forth between my PHP script and the Arduino.</p>
<p><a rel="attachment wp-att-14" href="http://www.oliciv.net/controlling-an-arduino-with-php/realterm/"><img class="alignnone size-full wp-image-14" title="realterm" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/realterm.png" alt="" width="466" height="178" /></a></p>
<p>This worked great, but seems like an unnecessary layer, just for the sake of using PHP.</p>
<p>To test this, I made a simple circuit with two LEDs and a servo, and wrote a quick AJAXy page to control the script, which would send commands to the arduino.</p>
<blockquote><p><strong>s90</strong> would turn the servo to 90 degrees</p></blockquote>
<blockquote><p><strong>g15</strong> would turn the green LED to 15</p></blockquote>
<blockquote><p><strong>r0</strong> would turn the red LED off</p></blockquote>
<p>I made a quick video to show the result<br />
<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/5ATK3x7QAVc&amp;hl=en_GB&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/5ATK3x7QAVc&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>And to show the data being relayed through RealTerm&#8230;<br />
<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/GkmSHdKiYtY&amp;hl=en_GB&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/GkmSHdKiYtY&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>EDIT: </strong>Forgot to add, this also solves the problem of the Arduino resetting itself every time a serial connection is opened, because RealTerm opens one serial connection and keeps it open, regardless of the actual connections my PHP script makes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliciv.net/controlling-an-arduino-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>My First Arduino</title>
		<link>http://www.oliciv.net/my-first-arduino/</link>
		<comments>http://www.oliciv.net/my-first-arduino/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 13:14:05 +0000</pubDate>
		<dc:creator>oliallen</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[starter kit]]></category>
		<category><![CDATA[unboxing]]></category>

		<guid isPermaLink="false">http://www.oliciv.net/blog/?p=6</guid>
		<description><![CDATA[A short year and three months after Nd suggested to me that I should acquire an arduino, mine arrived yesterday.
I went for the starter kit from Earthshine Design because, to be honest, I had no idea what kind of components I would be needing to get started &#8211; or even what to build!
The Earthshine kit comes with [...]]]></description>
			<content:encoded><![CDATA[<p>A short year and three months after Nd suggested to me that I should acquire an arduino, mine arrived yesterday.</p>
<p>I went for the starter kit from Earthshine Design because, to be honest, I had no idea what kind of components I would be needing to get started &#8211; or even what to build!</p>
<p>The Earthshine kit comes with a nice PDF manual with step by step instructions to build a number of projects with the components supplied.</p>
<p>With that said &#8211; let&#8217;s get it out of the box <img src='http://www.oliciv.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010.jpg"><img class="alignnone size-medium wp-image-7" title="Earthshine Design Arduino Starter Set" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010-300x225.jpg" alt="Earthshine Design Arduino Starter Set" width="300" height="225" /></a></p>
<p><a href="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010003.jpg"><img class="alignnone size-medium wp-image-10" title="Roboduino" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010003-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The arduino itself. Oooh shiny.</p>
<p><a href="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010004.jpg"><img class="alignnone size-medium wp-image-11" title="LEDs" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010004-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Enough LEDs to light my entire house</p>
<p><a href="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010005.jpg"><img class="alignnone size-medium wp-image-8" title="Resistors" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010005-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>And enough resistors for each of them <img src='http://www.oliciv.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010002.jpg"><img class="alignnone size-medium wp-image-9" title="Wires and such" src="http://www.oliciv.net/blog/wp-content/uploads/2010/03/02032010002-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>And&#8230; the rest of the components &#8211; many of which I don&#8217;t yet understand exactly what they do. Includes a motor, potentiometer, temperature sensor, switches, transistors and so on.</p>
<p>The kit also includes a USB cable to connect the arduino to your computer, a breadboard and jumper wires for easy prototyping (without going to the trouble of soldering etc) and a power adaptor to power the arduino when it&#8217;s not plugged in to a computer.</p>
<p>And that&#8217;s not to mention the cool case to store your components in!</p>
<p>The kit costs £49.99, which from the research I did, seems to be a good price for such a starter set. With so many components supplied and tutorials for projects to build with them, it&#8217;s going to keep me busy for a while.</p>
<p>Kit available from <a href="http://www.earthshinedesign.co.uk/">http://www.earthshinedesign.co.uk/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliciv.net/my-first-arduino/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Filming From The Motorbike with a Mobile Phone</title>
		<link>http://www.oliciv.net/filming-from-the-motorbike-with-a-mobile-phone/</link>
		<comments>http://www.oliciv.net/filming-from-the-motorbike-with-a-mobile-phone/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:48:28 +0000</pubDate>
		<dc:creator>oliallen</dc:creator>
				<category><![CDATA[Motorbikes]]></category>

		<guid isPermaLink="false">http://www.oliciv.net/blog/?p=3</guid>
		<description><![CDATA[I wanted an easy way to film from the motorbike, so tried attaching an old mobile phone to my bag (with cable ties, naturally).
Something to remember next time is that a camera that points forward standing up will point at the floor once sitting on the bike.

]]></description>
			<content:encoded><![CDATA[<p>I wanted an easy way to film from the motorbike, so tried attaching an old mobile phone to my bag (with cable ties, naturally).</p>
<p>Something to remember next time is that a camera that points forward standing up will point at the floor once sitting on the bike.</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/6cHb9is12io&amp;hl=en_GB&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/6cHb9is12io&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oliciv.net/filming-from-the-motorbike-with-a-mobile-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
