<?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; Fun</title>
	<atom:link href="http://daubers.co.uk/tag/fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://daubers.co.uk</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 17:08:35 +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>Arduino powered lights and heating!</title>
		<link>http://daubers.co.uk/2010/11/07/arduino-powered-lights-and-heating/</link>
		<comments>http://daubers.co.uk/2010/11/07/arduino-powered-lights-and-heating/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 10:35:39 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[homeeasy]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=305</guid>
		<description><![CDATA[Over the past few weeks as it gets colder, I&#8217;ve really started to notice the significant bite in heating costs from our flat being largely electrically heated. The main issue with this system is that none of the heaters have thermostats, they are either on, or off. As each heater is 2kW or greater, and there are [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks as it gets colder, I&#8217;ve really started to notice the significant bite in heating costs from our flat being largely electrically heated. The main issue with this system is that none of the heaters have thermostats, they are either on, or off. As each heater is 2kW or greater, and there are 4 of them in the flat, that means at any one time we could be using 8kWh of electricity. Which is a lot of money during the day!</p>
<p>The solution? Build a thermostat for them (and replace 2 with a gas convection heater). The circuit for this is quite simple thanks to the fantastic <a title="Home Easy" href="http://www.homeeasy.eu/" target="_blank">home easy</a> set of sockets. I bought a pack of three sockets (with a remote) and a light bulb holder (we&#8217;ll come back to that later). On top of this I needed a temperature sensor (<a title="Oomlout" href="http://www.oomlout.co.uk/temperature-sensor-tmp36-p-210.html?zenid=d74b7684dee3517325e0519f862e905f" target="_blank">tmp36</a>), a <a title="ebay" href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&amp;item=220680308396&amp;ssPageName=STRK:MEWNX:IT#ht_1024wt_907" target="_blank">433MHz transmitter </a>, <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&amp;item=220680305606&amp;ssPageName=STRK:MEWNX:IT#ht_741wt_907" target="_blank">a 433MHz reciever</a> and <a title="Oomlout Arduino Uno" href="http://www.oomlout.co.uk/arduino-uno-p-252.html?zenid=d74b7684dee3517325e0519f862e905f" target="_blank">an arduino uno</a>.</p>
<p>Thanks to the lovely folks at the <a title="Home Easy Hacking Wiki" href="http://homeeasyhacking.wikia.com/wiki/Home_Easy_Hacking_Wiki" target="_blank">Home Easy Hacking Wiki</a> getting this lot to work together with an arduino is easy as anything! Here is the basic circuit:</p>
<p><a href="http://daubers.co.uk/wp-content/uploads/2010/11/HomeEasySockets.png"><img class="aligncenter size-medium wp-image-306" title="Home Easy Transmitter Diagram" src="http://daubers.co.uk/wp-content/uploads/2010/11/HomeEasySockets-300x190.png" alt="Home Easy Transmitter Diagram" width="300" height="190" /></a>This is only the transmitter/temperature sensor part. Initially you&#8217;ll need to build a receiver to get the ID of your remote. This can be found at <a title="Arduino Home Easy Playground" href="http://www.arduino.cc/playground/Code/HomeEasy">this page</a> in the arduino playground. Once you have your remotes ID, you just need a simple arduino sketch to turn the socket thats plugged into the heater on/off! Here it is&#8230;.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">HomeEasy homeEasy<span style="color: #339933;">;</span>
boolean isOn<span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> incomingByte <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// for incoming serial data</span>
<span style="color: #993333;">float</span> timeOn<span style="color: #339933;">=-</span><span style="color: #0000dd;">900000</span><span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> myCode <span style="color: #339933;">=</span> <span style="color: #0000dd;">1595082</span><span style="color: #339933;">;</span>  
&nbsp;
<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;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       homeEasy <span style="color: #339933;">=</span> HomeEasy<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       homeEasy.<span style="color: #202020;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       isOn <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 1 = On, 0 = Off</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>
  <span style="color: #993333;">float</span> temp <span style="color: #339933;">=</span> getTemp<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #202020;">println</span><span style="color: #009900;">&#40;</span>temp<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// read the incoming byte:</span>
    incomingByte <span style="color: #339933;">=</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>
    <span style="color: #666666; font-style: italic;">// say what you got:</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>incomingByte <span style="color: #339933;">==</span> <span style="color: #0000dd;">111</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">//turn on the group</span>
      homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>incomingByte <span style="color: #339933;">==</span> <span style="color: #0000dd;">102</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #666666; font-style: italic;">// turn off the group</span>
      homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>temp <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color:#800080;">18.0</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> isOn <span style="color: #339933;">==</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>timeOn <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000dd;">300000</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #666666; font-style: italic;">//turn on the heaters</span>
     homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     isOn <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
     timeOn <span style="color: #339933;">=</span> millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>temp <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color:#800080;">18.0</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> isOn <span style="color: #339933;">==</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span>timeOn <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000dd;">300000</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    homeEasy.<span style="color: #202020;">sendAdvancedProtocolMessage</span><span style="color: #009900;">&#40;</span>myCode<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    isOn <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    timeOn <span style="color: #339933;">=</span> millis<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
* getVoltage() – returns the voltage on the analog input defined by
* pin
*/</span>
<span style="color: #993333;">float</span> getTemp<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> pin<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>analogRead<span style="color: #009900;">&#40;</span>pin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color:#800080;">.004882814</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color:#800080;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color:#800080;">100.0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//converting from a 0 to 1023 digital range</span>
                                        <span style="color: #666666; font-style: italic;">// to 0 to 5 volts (each 1 reading equals ~ 5 millivolts</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This code ensures that there is no change in status for at least 5 minutes, basically so the socket doesn&#8217;t go continuously on/off and damage something! There is also a hook for a serial input to turn on the &#8220;group&#8221; of the remote. This is to turn on the light in my bedroom. I&#8217;m in the process of writing two simple bits of python to turn a light on/of depending which is run. This means I can set up a cron to turn on a light at a given time! Simple alarm clock <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To get this code to work you&#8217;ll need the homeeasy library from <a href="http://code.google.com/p/homeeasyhacking/source/browse/#svn/trunk/Arduino" target="_blank">here</a>. You may need to alter the pin allocation in homeeasy.cpp, but that shouldn&#8217;t be too hard to do!</p>
<p>Next thing to do on this project is to get my Revo setup as a little wireless server box to graph the temperature changes and run the alarm clock. Conveniently it&#8217;s being replaced with a mac mini this week so has become available to complete the project. This will be a simple ubuntu box, running ubuntu server and little else really. Thought it may gain an ldap database for another, slightly different project.</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2010/11/07/arduino-powered-lights-and-heating/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chillis!</title>
		<link>http://daubers.co.uk/2010/01/31/chillis/</link>
		<comments>http://daubers.co.uk/2010/01/31/chillis/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 14:37:49 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[chillis]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=258</guid>
		<description><![CDATA[Having seen other peoples success of growing chillis from seed (specifically theopensourcerer) I thought this year I&#8217;d have a go. So in what could possibly be said to be a familiar style&#8230;.. I&#8217;m only attempting three types of chillis this year, cayenne long hot, navaho and scotch bonnet. In the interest of science I&#8217;m trying [...]]]></description>
			<content:encoded><![CDATA[<p>Having seen other peoples success of growing chillis from seed (specifically <a href="http://www.theopensourcerer.com/2010/01/30/ot-the-chilli-planting-begins/">theopensourcerer</a>) I thought this year I&#8217;d have a go. So in what could possibly be said to be a familiar style&#8230;..</p>
<div id="attachment_259" class="wp-caption aligncenter" style="width: 310px"><a href="http://daubers.co.uk/wp-content/uploads/2010/01/seed_packets.jpg"><img class="size-medium wp-image-259" title="Seed packets" src="http://daubers.co.uk/wp-content/uploads/2010/01/seed_packets-300x224.jpg" alt="Packets of Chilli Seeds" width="300" height="224" /></a><p class="wp-caption-text">Packets of Chilli Seeds</p></div>
<p>I&#8217;m only attempting three types of chillis this year, cayenne long hot, navaho and scotch bonnet. In the interest of science I&#8217;m trying theopensourcers method of germinating the seeds, and tomorrow evening will be attempting some in plain pots with compost in a heated propagator. This may mean I end up with an absolutley enormous glut of chillis, but I&#8217;ll burn that bridge when I come to it.</p>
<p>Here are the seeds ready for the airing cupboard.</p>
<div id="attachment_260" class="wp-caption aligncenter" style="width: 310px"><a href="http://daubers.co.uk/wp-content/uploads/2010/01/seeds_ready.jpg"><img class="size-medium wp-image-260" title="Seeds Ready for the airing cupboard" src="http://daubers.co.uk/wp-content/uploads/2010/01/seeds_ready-300x220.jpg" alt="Seeds in trays" width="300" height="220" /></a><p class="wp-caption-text">Seeds Ready for the airing cupboard</p></div>
<p>I&#8217;m also in the process of building an automated watering system for these once they&#8217;re in the greenhouse using arduinos, and hopefully connecting to a server in the house using an easy radio link to report the conditions in the greenhouse <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Many thanks to theopensourcerer for the information he&#8217;s posted on his blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2010/01/31/chillis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jaunty Welsh Release Party</title>
		<link>http://daubers.co.uk/2009/04/26/jaunty-welsh-release-party/</link>
		<comments>http://daubers.co.uk/2009/04/26/jaunty-welsh-release-party/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 12:51:18 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[release party]]></category>

		<guid isPermaLink="false">http://daubers.co.uk/?p=168</guid>
		<description><![CDATA[Last night was the Welsh Release party for Ubuntu 9.04 Jaunty Jackalope. 6 people turned up in total, which isn&#8217;t bad in my oppinion for a team that only formed a few months ago. Attending was Nrrd, Suave, Ianto, a chap called Nathan who isn&#8217;t on IRC, Brace (?) and myself. It&#8217;s always interesting to [...]]]></description>
			<content:encoded><![CDATA[<p>Last night was the Welsh Release party for Ubuntu 9.04 Jaunty Jackalope. 6 people turned up in total, which isn&#8217;t bad in my oppinion for a team that only formed a few months ago.</p>
<p>Attending was Nrrd, Suave, Ianto, a chap called Nathan who isn&#8217;t on IRC, Brace (?) and myself. It&#8217;s always interesting to meet new people, and these are probably the first group of Ubuntu people I&#8217;ve met since I bought my Eee PC from Popey <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Everyone seemed to arrive at the Central Bar in Cardiff, skipping Starbucks (that may be a lesson for next time) and we sat, had a few drinks and nattered away quite happily. An enjoyable time was had by all it seemed.</p>
<p>Since I was paying for a train ticket into Cardiff, I thought I&#8217;d have a wander with my Camera too. The pictures I took over the whole day I was there are in the flash slide show below. Enjoy <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="400" height="300" data="http://www.flickr.com/apps/slideshow/show.swf?v=70933" type="application/x-shockwave-flash"><param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2Fmattdaubney%2Fsets%2F72157617247738087%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2Fmattdaubney%2Fsets%2F72157617247738087%2F&amp;set_id=72157617247738087&amp;jump_to=" /><param name="allowFullScreen" value="true" /><param name="src" value="http://www.flickr.com/apps/slideshow/show.swf?v=70933" /><param name="allowfullscreen" value="true" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2009/04/26/jaunty-welsh-release-party/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

