<?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>codetorment</title>
	<atom:link href="http://www.codetorment.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codetorment.com</link>
	<description>code, tech, random stuff</description>
	<lastBuildDate>Tue, 04 May 2010 21:04:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=6100</generator>
		<item>
		<title>FabLab @ University College of Ghent</title>
		<link>http://www.codetorment.com/2010/05/04/fablab-university-college-of-ghent/</link>
		<comments>http://www.codetorment.com/2010/05/04/fablab-university-college-of-ghent/#comments</comments>
		<pubDate>Tue, 04 May 2010 20:51:08 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[3D printing]]></category>
		<category><![CDATA[fablab]]></category>
		<category><![CDATA[hogent]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=1058</guid>
		<description><![CDATA[This monday I paid a visit to the new FabLab on our very own campus at the University College of Ghent. The FabLab offers a space where students can produce their own designs or just print stuff downloaded from thingiverse. The place is still in a build-up phase but have a look at all the good(ness/ies) [...]]]></description>
			<content:encoded><![CDATA[<p>This monday I paid a visit to the new FabLab on our very own campus at the <a title="HoGent" href="http://www.hogent.be/" target="_blank">University College of Ghent</a>.</p>
<p>The FabLab offers a space where students can produce their own designs or just print stuff downloaded from thingiverse. The place is still in a build-up phase but have a look at all the good(ness/ies) it has already.</p>
<div id="attachment_1059" class="wp-caption alignnone" style="width: 522px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9881_rsz.jpg"><img class="size-full wp-image-1059 " title="DSCN9881_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9881_rsz.jpg" alt="DSCN9881 rsz FabLab @ University College of Ghent" width="512" height="384" /></a><p class="wp-caption-text">2 Bits from Bytes RepMan&#39;s</p></div>
<p>These can be purchased as a kit from <a title="BitsFromBytes.com" href="http://www.bitsfrombytes.com/" target="_blank">BitsFromBytes</a></p>
<div id="attachment_1060" class="wp-caption alignnone" style="width: 394px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9883_rsz.jpg"><img class="size-full wp-image-1060  " title="DSCN9883_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9883_rsz.jpg" alt="DSCN9883 rsz FabLab @ University College of Ghent" width="384" height="512" /></a><p class="wp-caption-text">RepMan</p></div>
<div id="attachment_1061" class="wp-caption alignnone" style="width: 394px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9885_rsz.jpg"><img class="size-full wp-image-1061  " title="DSCN9885_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9885_rsz.jpg" alt="DSCN9885 rsz FabLab @ University College of Ghent" width="384" height="512" /></a><p class="wp-caption-text">Funky Fan</p></div>
<div id="attachment_1062" class="wp-caption alignnone" style="width: 394px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9892_rsz.jpg"><img class="size-full wp-image-1062  " title="DSCN9892_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9892_rsz.jpg" alt="DSCN9892 rsz FabLab @ University College of Ghent" width="384" height="512" /></a><p class="wp-caption-text">Mr. MakerBot aka Cupcake</p></div>
<p>Not entirely sure but my guess is the Cupcake was gutted from it&#8217;s electronics to be used to power the lasercut Mendel below.</p>
<p>The lasercut mendel is a thesis project by Frederic Decru aka the Lasercut-Mendel-Guy. He can be seen in <a title="video " href="http://coded.be/en/node/114" target="_blank">this video</a> and the model can be obtained from thingiverse by going <a title="lasercut mendel thingiverse" href="http://www.thingiverse.com/thing:2697" target="_blank">here</a></p>
<div id="attachment_1063" class="wp-caption alignnone" style="width: 394px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9886_rsz.jpg"><img class="size-full wp-image-1063  " title="DSCN9886_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9886_rsz.jpg" alt="DSCN9886 rsz FabLab @ University College of Ghent" width="384" height="512" /></a><p class="wp-caption-text">Lasercut Mendel</p></div>
<div id="attachment_1064" class="wp-caption alignnone" style="width: 522px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9887_rsz.jpg"><img class="size-full wp-image-1064  " title="DSCN9887_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9887_rsz.jpg" alt="DSCN9887 rsz FabLab @ University College of Ghent" width="512" height="384" /></a><p class="wp-caption-text">Lasercut Mendel looking all Acrylicalicaly&#39;ish</p></div>
<div id="attachment_1065" class="wp-caption alignnone" style="width: 394px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9889_rsz.jpg"><img class="size-full wp-image-1065  " title="DSCN9889_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9889_rsz.jpg" alt="DSCN9889 rsz FabLab @ University College of Ghent" width="384" height="512" /></a><p class="wp-caption-text">Lasercut Mendel&#39;s good side</p></div>
<p>I hope to get me a lasercut mendel somewhere in the near future.</p>
<div id="attachment_1066" class="wp-caption alignnone" style="width: 522px"><a href="http://www.codetorment.com/wp-content/uploads/DSCN9895_rsz.jpg"><img class="size-full wp-image-1066  " title="DSCN9895_rsz" src="http://www.codetorment.com/wp-content/uploads/DSCN9895_rsz.jpg" alt="DSCN9895 rsz FabLab @ University College of Ghent" width="512" height="384" /></a><p class="wp-caption-text">Batist and a printed Mendel</p></div>
<p><a title="coded.be" href="http://coded.be/" target="_blank">Batist</a> started the FabLab and is seen constructing a printed version of the Mendel RepRap.</p>
<p>I hope to, someday soon, reserve a slot on one of the 3D printers in the FabLab and print the case I&#8217;m designing for my IGEPv2 board.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/05/04/fablab-university-college-of-ghent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IGEPv2 Platform</title>
		<link>http://www.codetorment.com/2010/04/24/igepv2-platform/</link>
		<comments>http://www.codetorment.com/2010/04/24/igepv2-platform/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 08:33:43 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[3D model]]></category>
		<category><![CDATA[IGEPv2]]></category>
		<category><![CDATA[omap]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=1013</guid>
		<description><![CDATA[A month ago I received my IGEPv2 platform from  ISEE It&#8217;s a beagleboard clone with the exception that this version comes packed with a RJ45 10/100Mb ethernet connection, bluetooth and  802.11b/g wifi. Oh and the price is about the same as a beagleboard (it&#8217;s actually cheaper then a BB when you opt for the non-wifi [...]]]></description>
			<content:encoded><![CDATA[<p>A month ago I received my IGEPv2 platform from  <a title="ISEE - IGEP website" href="http://www.igep-platform.com/" target="_blank">ISEE</a></p>
<p><a href="http://www.codetorment.com/wp-content/uploads/DSCN9856.jpg"><img class="alignnone size-large wp-image-1015" title="DSCN9856" src="http://www.codetorment.com/wp-content/uploads/DSCN9856-1024x768.jpg" alt="DSCN9856 1024x768 IGEPv2 Platform" width="574" height="430" /></a></p>
<p>It&#8217;s a <a title="beagleboard.org" href="http://beagleboard.org/" target="_blank">beagleboard</a> clone with the exception that this version comes packed with a RJ45 10/100Mb ethernet connection, bluetooth and  802.11b/g wifi. Oh and the price is about the same as a beagleboard (it&#8217;s actually cheaper then a BB when you opt for the non-wifi version).</p>
<p><span id="more-1013"></span></p>
<p>Here are some specs from the <a title="ISEE website" href="http://www.igep-platform.com/index.php?option=com_content&amp;view=article&amp;id=46&amp;Itemid=55" target="_blank">ISEE website</a>:</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/igepv2_rc_photo2.jpg"><img class="alignnone size-full wp-image-1019" title="igepv2_rc_photo2" src="http://www.codetorment.com/wp-content/uploads/igepv2_rc_photo2.jpg" alt="igepv2 rc photo2 IGEPv2 Platform" width="544" height="394" /></a></p>
<ul>
<li>
<div>TI OMAP35x pin compatible family multicore processor</div>
</li>
<li>
<div>ARM CORTEX A8 core</div>
</li>
<li>DSP TMS320C64x+ core</li>
<li>POWERVR SGX 530 core (OpenGL® ES 2.0, OpenGL® ES 1.0 , OpenVG)</li>
<li>IVA2.2 (Video Hardware Accelerators)</li>
<li>DDR RAM plus NAND Flash Package on Package (PoP) memories (on OMAP chip)</li>
<li>Linux BSP available (Board Support Package)</li>
<li>Ethernet 10/100 Mb BaseT.</li>
<li>Wifi IEEE 802.11b/g + Bluetooth 2.0 (Integrated antenna).</li>
<li>Compatibility with a huge collection of USB peripherals including hubs, keyboards, mice, web cameras, and much more.</li>
<li>MicroSD connector.</li>
<li>DVI-D for connecting digital computer monitors.</li>
<li>Stereo audio in and out for a microphone and headphones or speakers.</li>
<li>Expansion connector with I/O, SPI, UART&#8230;</li>
<li>Expansion connector with access LCD lines.</li>
<li>Wall plug 5 Vdc or JST input.</li>
<li>RS-485 Transceiver.</li>
<li>2 ADC : 1 and 3 MSP/s.</li>
<li>Temperature Range: -40 to +80º C.</li>
<li>EMI and EMC precertificate. CE compliant.</li>
</ul>
<p>Did I mention it&#8217;s really small? As in &#8216;Djeez that sure is really small!&#8217;.</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/DSCN98581.jpg"><img class="alignnone size-large wp-image-1017" title="DSCN9858" src="http://www.codetorment.com/wp-content/uploads/DSCN98581-1024x808.jpg" alt="DSCN98581 1024x808 IGEPv2 Platform" width="574" height="453" /></a></p>
<p>I&#8217;ve mounted the IGEPv2 board on a lego structure to make (dis)connecting cables a bit easier and to prevent static discharges of causing any mayhem. The mounting holes in the pcb are spaced equal to the offset in the lego beams so there was no need for drilling or hotglue.</p>
<p>Of course this is just fine for use on your desktop but rather useless when trying to protect your precious board from the (or atleast some) elements. So I wanted an affordable case. ISEE sells a <a title="ISEE IGEP HOUSING" href="http://igep-platform.com/shop/index.php?main_page=product_info&amp;products_id=36" target="_blank">housing</a> for 15EUR, but as I forgot to order one when ordering the board, the price of shipping about doubles that figure, crossing it from the list of options. Specialcomp has a <a title="Specialcomp" href="https://specialcomp.com/isee/order.htm" target="_blank">housing</a> for $29 making it even less of an option.</p>
<p><a href="http://borglabs.com/blog/build-your-own-igepv2-enclosure-part2" target="_blank">Borglabs</a> has a cool tutorial on how to hack a $5 soap box to make an enclosure. This is definitely the best value for money you&#8217;ll get.</p>
<p>I liked the specialcomp acrylic housing but disliked the pricetag. So I deciced to make my own. I fired up sketchup and looked for a model of the IGEP board in the store, none were found. So as any sensible human being would do, instead of just using a box with some holes as a mockup, I had to draw the thing myself.</p>
<p>Some renders of the 3D-model:</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/igepv2_board_041.png"><img class="alignnone size-large wp-image-1029" title="igepv2_board_04" src="http://www.codetorment.com/wp-content/uploads/igepv2_board_041-1024x550.png" alt="igepv2 board 041 1024x550 IGEPv2 Platform" width="590" height="317" /></a></p>
<p><a href="http://www.codetorment.com/wp-content/uploads/igepv2_board_07.png"><img class="alignnone size-large wp-image-1030" title="igepv2_board_07" src="http://www.codetorment.com/wp-content/uploads/igepv2_board_07-1024x550.png" alt="igepv2 board 07 1024x550 IGEPv2 Platform" width="590" height="317" /></a></p>
<p><a href="http://www.codetorment.com/wp-content/uploads/igepv2_board_05.png"><img class="alignnone size-large wp-image-1031" title="igepv2_board_05" src="http://www.codetorment.com/wp-content/uploads/igepv2_board_05-1024x550.png" alt="igepv2 board 05 1024x550 IGEPv2 Platform" width="590" height="317" /></a></p>
<p><a href="http://www.codetorment.com/wp-content/uploads/igepv2_board_10.png"><img class="alignnone size-large wp-image-1032" title="igepv2_board_10" src="http://www.codetorment.com/wp-content/uploads/igepv2_board_10-1024x550.png" alt="igepv2 board 10 1024x550 IGEPv2 Platform" width="590" height="317" /></a></p>
<p>Most of the parts were just downloaded from the store and I don&#8217;t take any credit for them. I just wanted a 3D model where connector positions were accurate enough to design a case.</p>
<p>The model is on a 1/1 scale and the .kmz file can be downloaded here : <a href="http://www.codetorment.com/wp-content/uploads/igepv2_revB_board.zip">igepv2_revB_board</a></p>
<p>I&#8217;m getting some errors uploading the model to the sketchup store but I&#8217;ll post a link when it&#8217;s done.</p>
<p>Only thing left to do now is design a case. And when I have a few spare moments, I will.</p>
<p>So watch out for a future post with a 3D model of a case and probably some instructions on how to reproduce and assemble one yourself.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/04/24/igepv2-platform/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Whitespace : Hackerspace Ghent</title>
		<link>http://www.codetorment.com/2010/04/23/hackerspace-ghent-whitespace/</link>
		<comments>http://www.codetorment.com/2010/04/23/hackerspace-ghent-whitespace/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 15:18:51 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Hackerspace]]></category>
		<category><![CDATA[Whitespace]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=1000</guid>
		<description><![CDATA[A month has passed since the official opening of Whitespace aka 0&#215;20 in Ghent&#8230; and all I can say: it&#8217;s been awesome! Note : a whitespace is the 32nd Unicode character, 32 in hex is 0&#215;20 The space keeps growing each week, well not physically, but member- and hardware-wise. Whitespace now has it&#8217;s own blog [...]]]></description>
			<content:encoded><![CDATA[<p>A month has passed since the official opening of <a title="Whitespace wiki" href="http://0x20.be/" target="_blank">Whitespace</a> aka 0&#215;20 in Ghent&#8230; and all I can say: it&#8217;s been awesome!</p>
<div id="attachment_1001" class="wp-caption alignnone" style="width: 570px"><a href="http://www.codetorment.com/wp-content/uploads/IMG_3236.jpg.scaled.1000.jpg"><img class="size-full wp-image-1001 " title="IMG_3236.jpg.scaled.1000" src="http://www.codetorment.com/wp-content/uploads/IMG_3236.jpg.scaled.1000.jpg" alt="IMG 3236.jpg.scaled.1000 Whitespace : Hackerspace Ghent " width="560" height="420" /></a><p class="wp-caption-text">openwrt talk @ opening weekend</p></div>
<p>Note : a whitespace is the 32nd Unicode character, 32 in hex is 0&#215;20</p>
<p>The space keeps growing each week, well not physically, but member- and hardware-wise.</p>
<div id="attachment_1002" class="wp-caption alignnone" style="width: 570px"><a href="http://www.codetorment.com/wp-content/uploads/IMG_3241.jpg.scaled.1000.jpg"><img class="size-full wp-image-1002" title="IMG_3241.jpg.scaled.1000" src="http://www.codetorment.com/wp-content/uploads/IMG_3241.jpg.scaled.1000.jpg" alt="IMG 3241.jpg.scaled.1000 Whitespace : Hackerspace Ghent " width="560" height="420" /></a><p class="wp-caption-text">router flashing @ opening weekend</p></div>
<div id="attachment_1004" class="wp-caption alignnone" style="width: 570px"><a href="http://www.codetorment.com/wp-content/uploads/IMG_34531.jpg.scaled.10001.jpg"><img class="size-full wp-image-1004   " title="IMG_3453.jpg.scaled.1000" src="http://www.codetorment.com/wp-content/uploads/IMG_34531.jpg.scaled.10001.jpg" alt="IMG 34531.jpg.scaled.10001 Whitespace : Hackerspace Ghent " width="560" height="420" /></a><p class="wp-caption-text">donated oscilloscope</p></div>
<p>Whitespace now has it&#8217;s own <a title="Whitespace blog" href="http://0x20.posterous.com/">blog</a> showing progress on projects and cool stuff happening in the space.</p>
<p>Meetings take place every thursday from 19h30-0h00, please feel welcome to drop by, it&#8217;s free .</p>
<p>The space is located @ Blekerijstraat 75, room 1.21, 9000 Gent, België</p>
<p>This clip shows how to get to room 1.21 once you&#8217;re in front of the gate :</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" 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/5kt0FWm5Y9M&amp;hl=en_US&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/5kt0FWm5Y9M&amp;hl=en_US&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>What you do next:</p>
<p>- Get on the <a title="Whitespace mailinglist" href="http://discuss.hackerspaces.be/listinfo.cgi/ghent-hackerspaces.be">mailing list</a></p>
<p>- Follow the <a title="Whitespace on twitter" href="http://twitter.com/HSGhent">twitter bird</a></p>
<p>- Join the IRC channel : #0&#215;20 on irc.freenode.org</p>
<p>- Read the blog : <a title="Whitespace blog" href="http://0x20.posterous.com/">http://0&#215;20.posterous.blog</a></p>
<p>- Read the wiki :  <a title="Whitespace wiki" href="http://0x20.be/">http://0&#215;20.be/</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/04/23/hackerspace-ghent-whitespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ghent has a hackerspace : Whitespace</title>
		<link>http://www.codetorment.com/2010/03/07/ghent-has-a-hackerspace-whitespace/</link>
		<comments>http://www.codetorment.com/2010/03/07/ghent-has-a-hackerspace-whitespace/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 17:22:49 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Hackerspace]]></category>
		<category><![CDATA[Whitespace]]></category>
		<category><![CDATA[0x20]]></category>
		<category><![CDATA[ghent]]></category>
		<category><![CDATA[opening]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=964</guid>
		<description><![CDATA[Since a couple of weeks Ghent has it&#8217;s first hackerspace named Whitespace (after the street it&#8217;s located : Blekerijstraat). Whitespace is driven partly by a bunch of people who started/helped growing, hackerspace Brussels but live in Ghent and wanted to skip the commute. The other part are  new enthousiastic locals (like me) who are commited [...]]]></description>
			<content:encoded><![CDATA[<p>Since a couple of weeks Ghent has it&#8217;s first hackerspace named Whitespace (after the street it&#8217;s located : Blekerijstraat).</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/ws_logo.png"><img class="alignnone size-full wp-image-966" title="ws_logo" src="http://www.codetorment.com/wp-content/uploads/ws_logo.png" alt="ws logo Ghent has a hackerspace : Whitespace" width="523" height="345" /></a></p>
<p>Whitespace is driven partly by a bunch of people who started/helped growing, hackerspace Brussels but live in Ghent and wanted to skip the commute. The other part are  new enthousiastic locals (like me) who are commited to build something great.</p>
<p><span id="more-964"></span>Check out the Whitespace website at <a title="0x20.be" href="http://0x20.be" target="_blank">0&#215;20.be</a> . If you don&#8217;t know what a hackerspace is have a look at <a title="hackerspaces wiki" href="http://hackerspaces.org/wiki/" target="_blank">http://hackerspaces.org/wiki/</a></p>
<p>Whitespace has it&#8217;s official opening at the beginning of spring in the weekend from the 19th to the 21st of March.</p>
<p>Feel free to drop by for a drink, a snack and some resistors! Hope to see you then!</p>
<p>Here&#8217;s a flyer for the event:</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/whitespace_opening.png"><img class="alignnone size-large wp-image-996" title="whitespace_opening" src="http://www.codetorment.com/wp-content/uploads/whitespace_opening-723x1024.png" alt="whitespace opening 723x1024 Ghent has a hackerspace : Whitespace" width="578" height="819" /></a></p>
<p>Make sure to check the <a title="Whitespace opening weekend" href="http://hsg.bn2vs.com/Opening_Weekend" target="_blank">website</a> for a more complete and up to date agenda.</p>
<p>Whitespace is located at Blekerijstraat 75, 9000 Gent in Belgium.</p>
<div id='map_1' style='width:600px; height:400px;' class='googleMap'></div>
<div id='dir_1'></div>
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
    wpGMaps.wpNewMap(1, {"name":"Whitespace","mousewheel":true,"zoompancontrol":true,"typecontrol":true,"directions_to":true,"directions_from":false,"width":"600px","height":"400px","description":"Blekerijstraat 75, 9000 Gent","address":"Blekerijstraat 75, 9000 Gent, Belgium"});
}
//]]&gt;
</script>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/03/07/ghent-has-a-hackerspace-whitespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome : Visible sonic boom</title>
		<link>http://www.codetorment.com/2010/02/19/awesome-visible-sonic-boom/</link>
		<comments>http://www.codetorment.com/2010/02/19/awesome-visible-sonic-boom/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 07:24:59 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Awesome]]></category>
		<category><![CDATA[rocket]]></category>
		<category><![CDATA[sonic boom]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=959</guid>
		<description><![CDATA[Possibly the coolest thing you&#8217;ll see today : the pressure waves of the Atlas V rocket as it goes super sonic. Ripped shameless from BoingBoing]]></description>
			<content:encoded><![CDATA[<p>Possibly the coolest thing you&#8217;ll see today : the pressure waves of the Atlas V rocket as it goes super sonic.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/SsDEfu8s1Lw" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/SsDEfu8s1Lw"></embed></object></p>
<p>Ripped shameless from <a title="BoingBoing.net" href="http://www.boingboing.net/" target="_blank">BoingBoing </a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/02/19/awesome-visible-sonic-boom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tapetronic : all flavors of awesome</title>
		<link>http://www.codetorment.com/2010/02/11/tapetronic-all-flavors-of-awesome/</link>
		<comments>http://www.codetorment.com/2010/02/11/tapetronic-all-flavors-of-awesome/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:32:22 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Awesome]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[awesome sauce]]></category>
		<category><![CDATA[tapedeck]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=934</guid>
		<description><![CDATA[Alexis Malbert aka Tapetronic does all flavors of awesome on a bunch of tapedecks and cassettes he hacked. Check his myspace and homepage for more great stuff.]]></description>
			<content:encoded><![CDATA[<p><a title="alexismalbert" href="http://www.alexismalbert.com/" target="_blank">Alexis Malbert</a> aka Tapetronic does all flavors of awesome on a bunch of tapedecks and cassettes he hacked.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/tJnTOMret1Y" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/tJnTOMret1Y"></embed></object></p>
<p><img title="More..." src="http://www.codetorment.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="trans Tapetronic : all flavors of awesome"  /></p>
<p><span id="more-934"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/ySA-SXw72qg" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/ySA-SXw72qg"></embed></object></p>
<p>Check his <a href="http://www.myspace.com/tapetronic" target="_blank">myspace</a> and <a href="http://www.alexismalbert.com/">homepage</a> for more great stuff.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2010/02/11/tapetronic-all-flavors-of-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Momentum</title>
		<link>http://www.codetorment.com/2009/11/24/momentum/</link>
		<comments>http://www.codetorment.com/2009/11/24/momentum/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:32:13 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[growth]]></category>
		<category><![CDATA[momentum]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=896</guid>
		<description><![CDATA[This blog has been online for little over a month and I can only witness it picking up momentum. Page views have been doubling week by week and I&#8217;m receiving nice feedback and comments from visitors all over the globe. A simple projection shows what this graph will look like 11 months from now&#8230; On [...]]]></description>
			<content:encoded><![CDATA[<p>This blog has been online for little over a month and I can only witness it picking up momentum.</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/visitors1.PNG"><img class="alignnone size-full wp-image-898" title="Visitors in last 30 days" src="http://www.codetorment.com/wp-content/uploads/visitors1.PNG" alt=" Momentum" width="625" height="314" /></a></p>
<p>Page views have been doubling week by week and I&#8217;m receiving nice feedback and comments from visitors all over the globe.<span id="more-896"></span></p>
<p><a href="http://www.codetorment.com/wp-content/uploads/visitors_week.PNG"><img class="alignnone size-full wp-image-899" title="Number of views per week" src="http://www.codetorment.com/wp-content/uploads/visitors_week.PNG" alt="Number of views per week" width="568" height="253" /></a></p>
<p>A simple projection shows what this graph will look like 11 months from now&#8230;</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/projection.png"><img class="size-full wp-image-901 alignnone" title="Future projection" src="http://www.codetorment.com/wp-content/uploads/projection.png" alt="Future projection" width="600" height="639" /></a></p>
<p>On a serious note, new posts will probably be non-excistent for the next 2 months as I have exams comming up in january.</p>
<p><a title="Home" href="http://www.codetorment.com" target="_self">Back to homepage</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2009/11/24/momentum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial : Getting started with Python 2.6 on Ubuntu 9.10 using IDLE</title>
		<link>http://www.codetorment.com/2009/11/16/tutorial-getting-started-with-python-2-6-on-ubuntu-9-10-using-idle/</link>
		<comments>http://www.codetorment.com/2009/11/16/tutorial-getting-started-with-python-2-6-on-ubuntu-9-10-using-idle/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:22:53 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[idle]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=838</guid>
		<description><![CDATA[In this tutorial I&#8217;ll show how to install IDLE for Python 2.6 on Ubuntu 9.10 This tutorial couldn&#8217;t be much easier, as a matter of fact you should be ashamed of yourself for even reading this! I&#8217;m just kidding, follow the next couple of steps and you&#8217;ll be wrestling the mighty python in a matter [...]]]></description>
			<content:encoded><![CDATA[<p><strong>In this tutorial I&#8217;ll show how to install IDLE for Python 2.6 on Ubuntu 9.10</strong></p>
<p>This tutorial couldn&#8217;t be much easier, as a matter of fact you should be ashamed of yourself for even reading this! I&#8217;m just kidding, follow the next couple of steps and you&#8217;ll be wrestling the mighty python in a matter of minutes.</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/python-logo-master-v3-TM-flattened.png"><img class="alignnone size-full wp-image-861" title="python-logo-master-v3-TM-flattened" src="http://www.codetorment.com/wp-content/uploads/python-logo-master-v3-TM-flattened.png" alt="python logo master v3 TM flattened Tutorial : Getting started with Python 2.6 on Ubuntu 9.10 using IDLE" width="481" height="162" /></a><span id="more-838"></span></p>
<p>In the top toolbar go to  &#8216;Applications &gt; Ubuntu Software Center&#8217;</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/Screenshot3.png"><img class="alignnone size-full wp-image-847" title="Screenshot" src="http://www.codetorment.com/wp-content/uploads/Screenshot3.png" alt="Screenshot3 Tutorial : Getting started with Python 2.6 on Ubuntu 9.10 using IDLE" width="492" height="310" /></a><!--more--></p>
<p>Search for IDLE in the Ubuntu Software Center</p>
<p>Select the package &#8216;IDLE (using Python-2.6)&#8217;, hit the arrow and select &#8216;Install&#8217; on the next page</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/Screenshot-Ubuntu-Software-Center-11.png"><img class="alignnone size-full wp-image-848" title="Ubuntu Software Center" src="http://www.codetorment.com/wp-content/uploads/Screenshot-Ubuntu-Software-Center-11.png" alt="Ubuntu Software Center" width="539" height="331" /></a></p>
<p>After a few seconds, depending on your internet connection and processing power, the installation of IDLE is completed.</p>
<p>To start IDLE go to &#8216; Applications &gt; Programming &gt; IDLE (using Python-2.6)&#8217;</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/Screenshot-21.png"><img class="alignnone size-full wp-image-849" title="Starting IDLE" src="http://www.codetorment.com/wp-content/uploads/Screenshot-21.png" alt="Starting IDLE" width="498" height="253" /></a></p>
<p>Now you&#8217;re setup and ready to write  your first function&#8230;</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/Screenshot-Python-Shell1.png"><img class="alignnone size-full wp-image-851" title="Python Shell" src="http://www.codetorment.com/wp-content/uploads/Screenshot-Python-Shell1.png" alt="Screenshot-Python Shell" width="484" height="401" /></a></p>
<p>If you&#8217;re new to Python and have little to no programming experience I recommend starting from one of two (or both) places.</p>
<p><a title="Dive into Python" href="http://www.diveintopython.org/" target="_blank">Dive into Python</a> and <a title="Think Like a Computer Scientist" href="http://www.greenteapress.com/thinkpython/thinkpython.html" target="_blank">Think Python : How to Think Like a Computer Scientist</a> provide excellent sources for unleashing your inner codeninja. ( Oh and the books are available for free in HTML, PDF and a bunch of other formats).</p>
<p>Go and discover your skills grashopper!</p>
<p>I&#8217;ll soon post a guide on setting up Eclipse on Ubuntu 9.10 and configuring the PyDev plugin to use Eclipse as your Python IDE.</p>
<p><a title="Back to home" href="http://www.codetorment.com" target="_self">Back to homepage </a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2009/11/16/tutorial-getting-started-with-python-2-6-on-ubuntu-9-10-using-idle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Arduino temperature data logger</title>
		<link>http://www.codetorment.com/2009/11/12/arduino-temperature-and-light-data-logging-and-chartplotting-webmonitor/</link>
		<comments>http://www.codetorment.com/2009/11/12/arduino-temperature-and-light-data-logging-and-chartplotting-webmonitor/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 16:27:09 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=672</guid>
		<description><![CDATA[An arduino, a DB18S20 one-wire temperature sensor and an LDR (Light Dependent Resistor) are hooked up with some resistors and an ethernet shield to make a datalogger and webmonitor. Notes : for this setup the connections are made on the ethernet shield instead of directly on the arduino. Since Fritzing misses a library with external [...]]]></description>
			<content:encoded><![CDATA[<p>An arduino, a DB18S20 one-wire temperature sensor and an LDR (<em>Light Dependent Resistor</em>) are hooked up with some resistors and an ethernet shield to make a datalogger and webmonitor.</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/DSCN9593-1.JPG"><img class="size-full wp-image-718 alignnone" title="DSCN9593-1" src="http://www.codetorment.com/wp-content/uploads/DSCN9593-1.JPG" alt=" Arduino temperature data logger" width="448" height="335" /></a></p>
<p><span id="more-672"></span>Notes :</p>
<ul>
<li>for this setup the connections are made on the ethernet shield instead of directly on the arduino. Since <a title="Fritzing" href="http://fritzing.org/" target="_blank">Fritzing</a> misses a library with external shield I used the arduino, the pinout stays the same either way.</li>
<li>check the <a title="DS18B20 datasheet" href="http://www.google.be/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CAsQFjAA&amp;url=http%3A%2F%2Fdatasheets.maxim-ic.com%2Fen%2Fds%2FDS18B20.pdf&amp;rct=j&amp;q=ds18b20+datasheet&amp;ei=pSr8SqLvOtTX-Qaf5pSIAg&amp;usg=AFQjCNEA19aScsvJEYz5A_daB2kpye2SiA" target="_blank">DS18B20 datasheet </a>for the specifications on hooking up the sensor in parasite or powered mode</li>
</ul>
<p>Schematics :</p>
<p><a href="http://www.codetorment.com/wp-content/uploads/temp_light_monitor_tiny_bb.png"><img class="alignnone size-full wp-image-712" title="Arduino DS18B20 temperature sensor and LDR schematics" src="http://www.codetorment.com/wp-content/uploads/temp_light_monitor_tiny_bb.png" alt="Arduino DS18B20 temperature sensor and LDR schematics" width="526" height="246" /></a></p>
<p>The arduino reads the sensors every 10 seconds and passes the data to a php script on your website; which then stores the data in a text file. A second script generates a line chart of the collected data.</p>
<div id="attachment_729" class="wp-caption alignnone" style="width: 458px"><a href="http://www.codetorment.com/wp-content/uploads/tempgraph.php.png"><img class="size-full wp-image-729   " title="tempgraph.php" src="http://www.codetorment.com/wp-content/uploads/tempgraph.php.png" alt="22 hours of temperature data" width="448" height="233" /></a><p class="wp-caption-text">22 hours of temperature data</p></div>
<p>I started from <a title="Cyberspice's blog" href="http://www.cyberspice.org.uk/blog/2009/10/29/boarduino-vivarium-temperature-monitor/" target="_blank">Cyberspice&#8217;s</a> code and changed the arduino code to make use of the DB18S20 and the ethernet shield.</p>
<p>A variable was added to the upload php script in order to store the light intensity in addition to the temperature.</p>
<p>The graphing script was altered to also display the minimum temperature, the maximum temperature, the current temperature and the average temperature. A raster was added for a better interpretation of the plotted data and a green line is showing the average temperature  troughout the chart.</p>
<p>You need to alter your ip, domain and path as I explained in the post <a title="Arduino wireless motion detector" href="http://www.codetorment.com/2009/10/25/arduino-wireless-motion-detector-part-2/" target="_self">Arduino Wireless motion detector</a> so I won&#8217;t go into those details here.</p>
<p>The arduino sketch :</p>
<pre class="brush: cpp;">
#include &lt;OneWire.h&gt;
#include &lt;string.h&gt;
#include &lt;Ethernet.h&gt;

int count = 0;
OneWire ds(8);
int HighByte, LowByte, TReading, SignBit, Tc_100, Tf_100, Whole, Fract;
int Tcount = 1;
int W[6];
int F[6];
int photocellPin = 0;     // the cell and 10K pulldown are connected to a0
int light;     // the analog reading from the sensor divider

byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = {
  192, 168, 1, 36};
byte server[] = { 77, 222, 78, 32};
// String buffer
char buffer[256];

Client client(server, 80);

void setup()
{
  Ethernet.begin(mac, ip);
  Serial.begin(9600);

  delay(1000);

  // Serial.println(&quot;connecting...&quot;);

}

void loop()
{
  byte i;
  byte present = 0;
  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
    ds.reset_search();
    return;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1);         // start conversion, with parasite power on at the end

  delay(1000);            

  present = ds.reset();
  ds.select(addr);
  ds.write(0xBE);         // Read Scratchpad

  light = analogRead(photocellPin);
  Serial.print(&quot;light intensity = &quot;);
  Serial.print(light);
  Serial.print(&quot;\n&quot;);
  for ( i = 0; i &lt; 9; i++) {           // we need 9 bytes
    data[i] = ds.read();
  }

  LowByte = data[0];
  HighByte = data[1];
  TReading = (HighByte &lt;&lt; 8) + LowByte;
  SignBit = TReading &amp; 0x8000;  // test most sig bit
  if (SignBit) // negative
  {
    TReading = (TReading ^ 0xffff) + 1; // 2's comp
  }
  Tc_100 = (6 * TReading) + TReading / 4;    // multiply by (100 * 0.0625) or 6.25

  Whole = Tc_100 / 100;  // separate off the whole and fractional portions
  Fract = Tc_100 % 100;

  if (SignBit) // If its negative
  {
    Serial.print(&quot;-&quot;);
  }
  Serial.print(Whole);
  Serial.print(&quot;.&quot;);
  if (Fract &lt; 10)
  {
    Serial.print(&quot;0&quot;);
  }
  Serial.print(Fract);
  Serial.print(&quot; C\n&quot;);

  if (client.connect()) {
    Serial.println(&quot;connected&quot;);
 sprintf(buffer, &quot;HEAD /path/to/script/newtemp.php?count=%d&amp;temp=%d.%d&amp;light=%d HTTP/1.1&quot;, Tcount, Whole, Fract, photocell);
 client.println(buffer);
 client.println(&quot;Host: yourdomain.com&quot;);
 client.println(&quot;Connection: close&quot;);
 client.println();
 client.stop();
 Tcount++;
 }
 else {
 Serial.println(&quot;connection failed&quot;);
 }
 delay(60000);  // wait 1 minute before sending new data
}
</pre>
<p>The upload script  &#8216;newtemp.php&#8217; :</p>
<pre class="brush: php;">
&lt;?php

if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {

	$fields = explode(&quot;&amp;&quot;, $_SERVER['QUERY_STRING']);
	$values = array();

	foreach ($fields as $field) {
		$keyval = explode(&quot;=&quot;, $field);
		$values[$keyval[0]] = $keyval[1];
	}

	$file = fopen('./tempdata.txt','a+');
	if ($file) {
		fwrite($file, time() . ':' . $values['count'] . ':' . $values['temp'] . ':' . $values['light']);
		fwrite($file, &quot;\n&quot;);
		fclose($file);
	}
}

?&gt;
</pre>
<p>The graphing script &#8216;tempgraph.php&#8217; :</p>
<pre class="brush: php;">
&lt;?php

define('WIDTH', 1000);
define('HEIGHT', 520);
define('FONT', 1);
 define('FONT2',2);

// Get the temperature data
$data = array();
$file = fopen(&quot;./tempdata.txt&quot;,&quot;r&quot;);
if ($file) {
	while (!feof($file)) {
		$line = trim(fgets($file));
		if (strlen($line)) {
			$fields = explode(&quot;:&quot;, $line);
			$keyval = array();
			$keyval['time']        = $fields[0];
			$keyval['count']       = $fields[1];
			$keyval['temperature'] = $fields[2];
			$keyval['light'] 	   = $fields[3];
			$data[] = $keyval;
		}
	}

	fclose($file);
}

// Get the number of data points
$datapoints = count($data);

// Lines are chronological
$mintime = $data[0]['time'];
$maxtime = $data[$datapoints - 1]['time'];

// Temperatures need to be processed.
$mintemp = $data[0]['temperature'];
$maxtemp = $data[0]['temperature'];

foreach ($data as $datapoint) {
	$mintemp = $mintemp &lt; $datapoint['temperature'] ?
	           $mintemp : $datapoint['temperature'];
	$maxtemp = $maxtemp &gt; $datapoint['temperature'] ?
	           $maxtemp : $datapoint['temperature'];
	$avgtemp += $datapoint['temperature'];
	$curtemp = $datapoint['temperature'];
}
 $avgtemp = round(($avgtemp / $datapoints),2);

// Get the axis dimensions.  Round up and down to the nearest
// degree C and hour.
$lowtime  = intval($mintime / 3600) * 3600;
$hightime = (intval($maxtime / 3600) + 1) * 3600;
$difftime = $hightime - $lowtime;

$lowtemp  = intval($mintemp);
$hightemp = intval($maxtemp) + 1;
$difftemp = $hightemp - $lowtemp;

// Create the image
$image = imagecreate(WIDTH, HEIGHT);
if ($image) {
	$background = imagecolorallocate($image, 255, 255, 255);
	$black      = imagecolorallocate($image, 0, 0, 0);
	$red        = imagecolorallocate($image, 255, 0, 0);
	$blue       = imagecolorallocate($image, 0, 0, 255);
	$green		= imagecolorallocate($image, 0, 204, 5);
	$grey		= imagecolorallocate($image, 210,210,210);

	// Draw the axes
	imageline($image, 20, 20, 20, 485, $black);
	imageline($image, 15, 480, 980, 480, $black);
	imageline($image, 15, 20, 20, 20, $black);
	imageline($image, 980, 480, 980, 485, $black);

	// Draw top horizontal line
	imageline($image, 20, 20, 980, 20, $grey);

	// Draw right most vertical line
	imageline($image, 980, 20, 980, 479, $grey);

	for ($i = 3600; $i &lt; $difftime; $i += 3600) {
		$x = 20 + (($i * 960) / $difftime);
		// Draw ticks on horizontal axis
		imageline($image, $x, 480, $x, 483, $black);
		// Draw horizontal guides
		imageline($image, $x, 479, $x, 20, $grey);
	}
	$temp = intval($lowtemp);
	for ($i = 1; $i &lt; $difftemp; $i++) {
	    $y = 480 - (($i * 460) / $difftemp);
		// Draw ticks on vertical axis
		imageline($image, 17, $y, 20, $y, $black);

		// Draw vertical guides
		imageline($image, 21, $y, 980, $y, $grey);
		$temp = intval($temp) + 1;
		$ytemp = intval($y) - 5;
		//if($temp % 2 == 0){
			imagestring($image, FONT, 0, $ytemp, $temp . 'C', $black);
		//}
	}

	// Draw the labels
	imagestring($image, FONT, 8, 490, date(&quot;H:i&quot;, $lowtime), $black);
	imagestring($image, FONT, 970, 490, date(&quot;H:i&quot;, $hightime), $black);
	imagestring($image, FONT, 0, 475, $lowtemp . 'C', $black);
	imagestring($image, FONT, 0, 15, $hightemp . 'C', $black);

	// Draw min, max and avg
	imagestring($image, FONT2, 700, 430, &quot;Cur. temp : &quot; . $curtemp . &quot; °C&quot;,$black);
	imagestring($image, FONT2, 700, 450, &quot;Avg. temp : &quot; . $avgtemp . &quot; °C&quot;,$green);
	imagestring($image, FONT2, 850, 430, &quot;Min. temp : &quot; . $mintemp . &quot; °C&quot;,$blue);
	imagestring($image, FONT2, 850, 450, &quot;Max. temp : &quot; . $maxtemp . &quot; °C&quot;,$red);

	// Draw avg line

	$avgtemp = 480 - ((($avgtemp - $lowtemp) * 460) / $difftemp);
	imageline($image,20, $avgtemp, 980, $avgtemp, $green);

	// Draw the temperature points

	// Position of the first point
	$prevx = (($data[0]['time'] - $lowtime) * 960) / $difftime;
	$prevy = (($data[0]['temperature'] - $lowtemp) * 460) / $difftemp;

	// Draw line from previous point to current point
	for ($i = 1; $i &lt; $datapoints; $i++) {
		$x = (($data[$i]['time'] - $lowtime) * 960) / $difftime;
		$y = (($data[$i]['temperature'] - $lowtemp) * 460) / $difftemp;
		imageline($image, $prevx + 20, 480 - $prevy, $x + 20, 480 - $y, $red);
		$prevx = $x;
		$prevy = $y;
	}

	// Finally time and date stamp
	$generated = 'Generated: ' . date(&quot;r&quot;);
	imagestring($image,
	            FONT,
	            WIDTH - 15 - (imagefontwidth(FONT) * strlen($generated)),
	            HEIGHT - 15,
	            $generated,
	            $blue);

	// Output the image
	header('Content-Type: image/png');
	imagepng($image);

	// Destroy it
	imagedestroy($image);
}

?&gt;
</pre>
<p>I will soon post some improvements on the scripts :</p>
<ul>
<li>averaging 6 readings ( 1 minute ) to 1 datapoint to get rid of the noise</li>
<li>let the script fill one text file for each day, so you can look at a history over several days</li>
<li>split up data into different charts</li>
<li>last but not least, trying to add the S65 in the game : showing the current sensor readings or a graph</li>
</ul>
<p><a href="http://www.codetorment.com/wp-content/uploads/DSCN9596.JPG"><img class="alignnone size-full wp-image-786" title="DSCN9596" src="http://www.codetorment.com/wp-content/uploads/DSCN9596.JPG" alt=" Arduino temperature data logger" width="454" height="341" /></a></p>
<p>Please leave a comment or send me a link to show your arduino projects!</p>
<p><a title="Home" href="http://www.codetorment.com/" target="_self">Back to homepage</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2009/11/12/arduino-temperature-and-light-data-logging-and-chartplotting-webmonitor/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Arduino Pong using S65 Shield</title>
		<link>http://www.codetorment.com/2009/11/11/arduino-pong-using-s65-shield/</link>
		<comments>http://www.codetorment.com/2009/11/11/arduino-pong-using-s65-shield/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 21:03:01 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[pong]]></category>
		<category><![CDATA[s65]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[shield]]></category>

		<guid isPermaLink="false">http://www.codetorment.com/?p=695</guid>
		<description><![CDATA[Since today was a holiday (here in Belgium) I had a few moments to spare so I wrote a quick and dirty version of pong for the arduino using the S65 shield. Check the video after the break&#8230; EDIT: Added sound using a buzzer EDIT: Didn&#8217;t get time to rewrite some things, just added some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codetorment.com/wp-content/uploads/pong_moving.JPG"><img class="size-full wp-image-696  alignnone" title="pong_moving" src="http://www.codetorment.com/wp-content/uploads/pong_moving.JPG" alt="Arduino pong using a S65 shield" width="430" height="323" /></a></p>
<p>Since today was a holiday (here in Belgium) I had a few moments to spare so I wrote a quick and dirty version of pong for the arduino using the S65 shield.</p>
<p>Check the video after the break&#8230;<span id="more-695"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" 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://vimeo.com/moogaloop.swf?clip_id=7558097&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=7558097&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>EDIT: Added sound using a buzzer</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7596054&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7596054&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p>EDIT: Didn&#8217;t get time to rewrite some things, just added some comments</p>
<pre class="brush: cpp;">

#include &lt;S65Display.h&gt;
#include &lt;RotaryEncoder.h&gt;
#include &lt;string.h&gt;

#define WIDTH 176
#define HEIGHT 132
#define BAT_WIDTH 5
#define BAT_HEIGHT 30
#define BAT_INIT_X 5
#define BAT_INIT_Y 56
#define BALL 5
#define BAT_STEP 5
#define AI_STEP 2
#define MAX_TURNS 5

float ball_x = WIDTH / 2;
float ball_x_prev = ball_x;
float ball_y = HEIGHT / 2;
float ball_y_prev = ball_y;
float ball_dir = 0;
float bat_1_dir = 0;
int bat1_x = BAT_INIT_X;
int bat1_y = BAT_INIT_Y;
int bat1_y_prev = bat1_y;
int bat2_x = WIDTH - BAT_INIT_X - BAT_WIDTH;
int bat2_y = BAT_INIT_Y;
int bat2_y_prev = bat2_y;
int bat2_step = AI_STEP;
int p1_score = 0;
int p2_score = 0;
int ball_angle = 0;          // angle between ball path and horizontal axis
int ball_angle_sign = 0;   // sign of ball_angle : up = +1, down = -1, horizontal = 0
boolean score = false;
boolean gameover = false;
char buffer[256];           // string buffer

S65Display lcd;
RotaryEncoder encoder;

// Encoder must be serviced regularly.
ISR(TIMER2_OVF_vect)
{
  TCNT2 -= 250;        //1000 Hz
  encoder.service();
}

void setup()
{
  lcd.init(2);
  encoder.init();
  // More encoder stuff
  //init Timer2
  TCCR2B  = (1&amp;lt;&amp;lt;CS22);           //clk=F_CPU/64
  TCNT2   = 0x00;
  TIMSK2 |= (1&amp;lt;&amp;lt;TOIE2);         //enable overflow interupt
  score = false;
  gameover = false;
  lcd.clear(0);
  initTurn();
  startGame();
}

void loop(){

  while(!score &amp;amp;&amp;amp; !gameover){
    checkControls();
    updateAI();
    updateFields();
    drawScreen();
    delay(10);
  }

  if(checkPress() &amp;amp;&amp;amp; !gameover){	// if a player scored wait for rotary press
    initTurn();
  }
  delay(10);
}

// initialize fields for the beginning of game/round
void initTurn(void){
  lcd.clear(0);
  ball_x = WIDTH / 2;
  ball_x_prev = ball_x;
  ball_y = HEIGHT / 2;
  ball_y_prev = ball_y;
  ball_dir = 0;
  bat1_x = BAT_INIT_X;
  bat1_y = BAT_INIT_Y;
  bat1_y_prev = bat1_y;
  bat2_x = WIDTH - BAT_INIT_X - BAT_WIDTH;
  bat2_y = BAT_INIT_Y;
  bat2_y_prev = bat2_y;
  ball_angle = 0;           // angle between ball path and horizontal axis
  ball_angle_sign = 0;    // up = +1, down = -1, horizontal = 0
  score = false;
  ball_dir = 1;
  ball_angle = 45;
}

// start the game and wait for press on rotary encoder
void startGame(void){
  lcd.drawText(35, 60, &quot;Click to start&quot;, RGB(255,255,255), RGB(0,0,0));
  while(!checkPress()){
    delay(10);
  };
  lcd.clear(0);
}

// checks if rotary encoder was pressed
boolean checkPress(void){
  int8_t press;
  press = encoder.sw();
  if (SW_PRESSED == press || SW_PRESSEDLONG == press) {
    return true;
  }
  else{
    return false;
  }
}

void checkRotation(void){
  moveBat(encoder.step());
}

void checkControls(void){
  if(checkPress()){    // pause
    lcd.drawText(45, 60, &quot;Game paused&quot;, RGB(255,255,255), RGB(0,0,0));
    while(!checkPress()){ // wait until pressed
    }
    lcd.clear(0);
  }
  checkRotation();
}

void moveBat(int rot){
  if(!score &amp;amp;&amp;amp; !gameover){
    if(rot == 1){                                  // clockwise rotation, move bat up
	if(bat1_y - BAT_STEP &amp;gt;= 0){   // only move up when there is enough space left
	  bat1_y -= BAT_STEP;
	}
    }
    else if(rot == -1){                         // anti-clockwise rotation, move bat down
        // only move down when there is enough space left
	if((bat1_y + BAT_HEIGHT + BAT_STEP) &amp;lt; HEIGHT){
	  bat1_y += BAT_STEP;
	}
    }
  }
}

void updateFields(void){
 // top or bottom of screen reached, bounce ball back
  if(ball_y &amp;lt;= 0 || ball_y + BALL &amp;gt;= HEIGHT){
    if(ball_angle_sign == -1){ // ball was going down
	ball_angle_sign = 1;    // ball is now going up
    }
    else{                            // ball was going up
	ball_angle_sign = -1;   // ball is now going down
    }
  }
  // check if ball has is in reach of bat1 (horizontal), for some reason checking for equality doens't seem to work here ?
  if((ball_x &amp;lt;= 12 &amp;amp;&amp;amp; ball_x &amp;gt;= 11) &amp;amp;&amp;amp; (ball_dir == 1)){
    // ball is in reach of bat1(vertical)
    if((ball_y + BALL) &amp;gt;= bat1_y &amp;amp;&amp;amp; ball_y &amp;lt;= (bat1_y + BAT_HEIGHT)){
	ball_dir = 0;     // ball hits bat1, change direction
    }
  }
   // check if ball has is in reach of bat2 (horizontal)
  if((ball_x &amp;gt;= 160 &amp;amp;&amp;amp; ball_x &amp;lt;= 162) &amp;amp;&amp;amp; (ball_dir == 0)){
     // ball is in reach of bat2 (vertical)
    if((ball_y + BALL) &amp;gt;= bat2_y &amp;amp;&amp;amp; ball_y &amp;lt;= (bat2_y + BAT_HEIGHT)){
	ball_dir = 1;	      // ball hits bat2, change direction
    }
  }

  if( ball_x &amp;gt; 0 &amp;amp;&amp;amp; ball_x + BALL &amp;lt; WIDTH){           // ball is not near left or right edge
    if(ball_dir == 0){								// ball is moving to the right
	ball_x += cos(ball_angle);						// cosine is always positive in 1st and 4th quadrant
	if(ball_angle_sign == -1){						// check sign of angle
	  ball_y  -= sin(ball_angle);						// negative if angle in 4th quadrant
	}
	else{
	  ball_y  += sin(ball_angle);						// positive if angle in 1th quadrant
	}
    }
    else{									        // ball is moving to the left
	ball_x -= cos(ball_angle);						// cosine is always negative in 2nd and 3rd quadrant
	if(ball_angle_sign == -1){
	  ball_y  -= sin(ball_angle);						// sine is always negative in 3rd quadrant
	}
	else{
	  ball_y  += sin(ball_angle);						// sine is always positive in 2nd quadrant
	}
    }

  }
  else{										// ball hits left or right edge
    if(!score &amp;amp;&amp;amp; !gameover){
	if(ball_dir == 0){							        // ball was going to the right
	  if(p1_score++ &amp;lt; MAX_TURNS){
	    p1_score++;								// player 1 scores
	  }
	  else{
	    gameover = true;
	  }
	}
	else{									        // ball was going to the left
	  if(p2_score &amp;lt; MAX_TURNS){
	    p2_score++;								// player 2 scores
	  }
	  else{
	    gameover = true;
	  }
	}
	score = true;
    }
  }
}

void updateAI(void){
  // bat2 follows vertical position of ball, TODO : implement difficulty levels
  if(ball_y &amp;gt; (bat2_y + (BAT_HEIGHT / 2))){
    // TODO : make function moveBat() that does the bound checking
    if((bat2_y + BAT_HEIGHT + bat2_step) &amp;lt; HEIGHT){
	bat2_y += bat2_step;
    }

  }
  else{
    if((bat2_y - bat2_step) &amp;gt;= 0){
	bat2_y -= bat2_step;
    }
  }
}

void drawScreen(void){
  // draw ball
  lcd.drawRect( ball_x_prev, ball_y_prev, ball_x_prev + BALL, ball_y_prev + BALL, RGB(0,0,0));
  lcd.drawRect( ball_x, ball_y, ball_x + BALL, ball_y + BALL, RGB(255,255,255));
  ball_x_prev = ball_x;
  ball_y_prev = ball_y;
  // draw left bat
  lcd.drawRect( bat1_x, bat1_y_prev, bat1_x + BAT_WIDTH, bat1_y_prev + BAT_HEIGHT, RGB(0,0,0));
  lcd.drawRect( bat1_x, bat1_y, bat1_x + BAT_WIDTH, bat1_y + BAT_HEIGHT, RGB(255,255,255));
  bat1_y_prev = bat1_y;
  // draw right bat
  lcd.drawRect( bat2_x, bat2_y_prev, bat2_x + BAT_WIDTH, bat2_y_prev + BAT_HEIGHT, RGB(0,0,0));
  lcd.drawRect( bat2_x, bat2_y, bat2_x + BAT_WIDTH, bat2_y + BAT_HEIGHT, RGB(255,255,255));
  bat2_y_prev = bat2_y;
  drawScore();
}

void drawScore(void){
  sprintf(buffer, &quot;%d - %d&quot;, p1_score, p2_score);
  lcd.drawText(72, 5, buffer, RGB(255,255,255), RGB(0,0,0));
}
</pre>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.codetorment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.codetorment.com/2009/11/11/arduino-pong-using-s65-shield/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
