<?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>Matt Daubneys Blog &#187; EasyRadio</title>
	<atom:link href="http://daubers.co.uk/category/arduino/easyradio/feed/" rel="self" type="application/rss+xml" />
	<link>http://daubers.co.uk</link>
	<description></description>
	<lastBuildDate>Sun, 25 Mar 2012 19:34:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Arduinos, MQTT and Light levels</title>
		<link>http://daubers.co.uk/2011/09/04/arduinos-mqtt-and-light-levels/</link>
		<comments>http://daubers.co.uk/2011/09/04/arduinos-mqtt-and-light-levels/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 13:54:36 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[EasyRadio]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[homeeasy]]></category>
		<category><![CDATA[mosquitto]]></category>
		<category><![CDATA[mqtt]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=377</guid>
		<description><![CDATA[Since watching Andy Pipers talk on MQTT at Oggcamp, I&#8217;ve been trying to understand and use Mosquitto with my Arduinos. I&#8217;ve got a few sensors lying around to test this with (and have ordered some more \o/ ) and have started to have some success. Installing Mosquitto is a doddle. I added the ppa to one of [...]]]></description>
			<content:encoded><![CDATA[<p>Since watching <a href="http://blip.tv/episode/5493280" target="_blank">Andy Pipers talk on MQTT</a> at Oggcamp, I&#8217;ve been trying to understand and use <a href="http://mosquitto.org/" target="_blank">Mosquitto</a> with my Arduinos. I&#8217;ve got a few sensors lying around to test this with (and have ordered some more \o/ ) and have started to have some success.</p>
<p>Installing Mosquitto is a doddle. I added the <a href="https://launchpad.net/~mosquitto-dev/+archive/mosquitto-ppa/" target="_blank">ppa</a> to one of my household servers, then just apt-get install mosquitto. MQTT broker up and running in a matter of minutes. The first thing I setup to check if it was working was a simple python program that would just connect to the broker and send &#8220;Hello World&#8221; to the &#8220;hello&#8221; topic. I wrote a second little python script to just listen to the &#8220;hello&#8221; topic and print out the message from any updates. Most of the code was borrowed from <a href="http://chemicaloliver.net/programming/first-steps-using-python-and-mqtt/" target="_blank">this blog post</a> which was incredibly helpful <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>With that running happily, I moved on a stage. Digging out an <a href="http://daubers.co.uk/2010/11/07/arduino-powered-lights-and-heating/" target="_blank">old shield</a> for my arduino that I made to control the lights in my flat using some home easy sockets and an RF chip, I added an LDR and used the thermister that was already on the board. This simple set of components means I can now monitor both the temperature and light levels in one of the rooms of my flat. Using an ethernet shield for the arduino also means that I can then report that information to my Mosquitto broker using the arduino mqtt <a href="http://knolleary.net/arduino-client-for-mqtt/" target="_blank">library</a>.</p>
<p>What will I do with all this information? Well, initially I&#8217;m going to write an mqtt to sql bridge (might use this an excuse to learn postgres now mysql has an uncertain OSS future) and will setup some scripts to graph the information. I&#8217;ll probably change this sketch to control the lights in the flat, so I could have a machine somewhere sending a message to the mqtt broker at a set time to turn the lights on in the bedroom (a simple mqtt powered alarm clock <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Hopefully I&#8217;ll write a small application using the app indicator framework for Ubuntu (and growl for OSX) to tell me when certain thresholds are passed, especially for the other sensors I have coming (Alcohol, Gas, Smoke and humidity). I might write another bridge to use the google cloud messaging system to add an alert on my phone as well.</p>
<p>There&#8217;s a whole world of possibilities out there, thanks to so many people building these various components and libraries that make hacking fun toys so much easier <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Many thanks to all those who have developed the frameworks, libraries and services that I&#8217;m using and for making the F/OSS to make life even easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2011/09/04/arduinos-mqtt-and-light-levels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino and Easy Radios</title>
		<link>http://daubers.co.uk/2010/02/04/arduino-and-easy-radios/</link>
		<comments>http://daubers.co.uk/2010/02/04/arduino-and-easy-radios/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 09:55:41 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[EasyRadio]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[easy-radio]]></category>
		<category><![CDATA[example]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=264</guid>
		<description><![CDATA[A few days ago I received a pair of Easy Radios to help with a project I&#8217;m working on. Since I&#8217;ve never used these before (having only got my first arduino a couple of weeks ago) I had a dig on the net for information on how to use them. Since this information was quite [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I received a pair of Easy Radios to help with a project I&#8217;m working on. Since I&#8217;ve never used these before (having only got my first arduino a couple of weeks ago) I had a dig on the net for information on how to use them. Since this information was quite sparse, I thought I&#8217;d put up my experimental rig to show it working. This setup requires 2 arduinos, an easy radio transmitter and an easy radio receiver.  First, the transmitter layout.</p>
<div id="attachment_276" class="wp-caption aligncenter" style="width: 222px"><a href="http://daubers.co.uk/wp-content/uploads/2010/02/transmit.png"><img class="size-medium wp-image-276" title="Transmitter Layout" src="http://daubers.co.uk/wp-content/uploads/2010/02/transmit-212x300.png" alt="Transmitter Layout" width="212" height="300" /></a><p class="wp-caption-text">Transmitter Layout</p></div>
<p style="text-align: left;">Now the receiver layout.</p>
<div id="attachment_275" class="wp-caption aligncenter" style="width: 222px"><a href="http://daubers.co.uk/wp-content/uploads/2010/02/recieve.png"><img class="size-medium wp-image-275" title="Receiver Layout" src="http://daubers.co.uk/wp-content/uploads/2010/02/recieve-212x300.png" alt="Receiver Layout" width="212" height="300" /></a><p class="wp-caption-text">Receiver Layout</p></div>
<p style="text-align: center;">
<p style="text-align: left;">and finally the code.</p>
<p style="text-align: left;"><span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">#reciever code</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">19200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span>Serial.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#transmitter code</span>
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">19200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Serial.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Hello<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This should result in the receiver outputting &#8220;Hello&#8221; over and over across the USB serial in the arduino environments serial monitor. If you have any problems, feel free to give me a shout! Oh, make sure you unplug the easy radio receiver from the arduino before flashing it, it&#8217;ll throw nasty errors otherwise. (Simply unplug digital 0 pin on the arduino board)</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2010/02/04/arduino-and-easy-radios/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

