<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-267236337893984214</id><updated>2012-01-27T18:07:40.451Z</updated><category term='ethics'/><category term='Chip Tunes'/><category term='processing'/><category term='epuck'/><category term='#pragma'/><category term='crafting'/><category term='hypercubes'/><category term='deviantart'/><category term='C'/><category term='ladybirds'/><category term='stop motion'/><category term='quote'/><category term='battery charging'/><category term='mencoder'/><category term='graphs'/><category term='latern'/><category term='3d printing'/><category term='jpg'/><category term='photos'/><category term='insects'/><category term='polymorph'/><category term='GA'/><category term='milk pixel'/><category term='fungus'/><category term='microcontrollers'/><category term='Succulents'/><category term='servo motors'/><category term='egg'/><category term='journal'/><category term='guitar'/><category term='code'/><category term='servos'/><category term='extant'/><category term='mechanisms'/><category term='Painting'/><category term='arduino'/><category term='linux'/><category term='simulation'/><category term='Plants'/><category term='box guitar'/><category term='diy'/><category term='Slugs'/><category term='Walking with Robots'/><category term='tiny'/><category term='humour'/><category term='music'/><category term='robots'/><category term='memory'/><category term='motor smoothing'/><category term='book'/><category term='downs'/><category term='Manchester'/><category term='networking'/><category term='Parse csv with C'/><category term='sunrise'/><category term='robot lantern'/><category term='electronics'/><category term='arnolfini'/><category term='tcp'/><category term='Mushrooms'/><category term='poetry'/><category term='AVR'/><category term='SAUC-E'/><category term='evolutionary algorithms'/><category term='ubuntu'/><category term='stained glass'/><title type='text'>Paul O'Dowd</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.paulodowd.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-1384699560756177805</id><published>2011-12-02T11:05:00.001Z</published><updated>2011-12-02T11:09:03.780Z</updated><title type='text'>Robotville: Science Museum London</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div align="center"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;object height="300" width="400"&gt; &lt;param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628245173891%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628245173891%2F&amp;set_id=72157628245173891&amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=109615"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=109615" allowFullScreen="true" flashvars="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628245173891%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628245173891%2F&amp;set_id=72157628245173891&amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;I am exhibiting at the Science Museum London this weekend as part of RobotVille.  There are lots of great robots here, and its really friendly.&amp;nbsp; I've been having a great time chatting to all sorts of interesting people.&amp;nbsp; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-1384699560756177805?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/1384699560756177805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/12/robotville-science-museum-london.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1384699560756177805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1384699560756177805'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/12/robotville-science-museum-london.html' title='Robotville: Science Museum London'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8696036265262033858</id><published>2011-11-22T10:11:00.000Z</published><updated>2011-11-22T10:13:39.361Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='mechanisms'/><title type='text'>2 Axis Gimbal inside an eye</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Recently I have been inspired by some animatronic videos on youtube, such as:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/-rZGfS8w4q8" width="560"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: x-small;"&gt;This video is not my work.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;One of the things that caught my attention was the necessity for eyelids to be working in very close proximity to the eyeball.  This means the mechanism to give an eye the freedom to move and to be actuated has to be enclosed within the eye.&amp;nbsp; I knew this had to be a &lt;a href="http://en.wikipedia.org/wiki/Gimbal"&gt;gimbal&lt;/a&gt; type of mechanism. &amp;nbsp;  I decided to have a go at building one myself.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-fqLQ8kbR1Bk/TsrVvpumV6I/AAAAAAAAAIM/e6JRj8SCTrU/s1600/IMG_1829.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="426" src="http://1.bp.blogspot.com/-fqLQ8kbR1Bk/TsrVvpumV6I/AAAAAAAAAIM/e6JRj8SCTrU/s640/IMG_1829.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;I used polymorph inside this plastic cup to create a hemisphere for the eye.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-64ibF8PB7Mk/TsrWbsoj_RI/AAAAAAAAAIc/Sgevafnffho/s1600/IMG_1832.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="426" src="http://4.bp.blogspot.com/-64ibF8PB7Mk/TsrWbsoj_RI/AAAAAAAAAIc/Sgevafnffho/s640/IMG_1832.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;I then created holes in the edge of the 'eye' to run float the gimbal.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-A7SLBPYBvlo/TsrWA6u27CI/AAAAAAAAAIU/yDMOy2q88u4/s1600/IMG_1827.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="426" src="http://3.bp.blogspot.com/-A7SLBPYBvlo/TsrWA6u27CI/AAAAAAAAAIU/yDMOy2q88u4/s640/IMG_1827.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Next, some pvc pipe to form the inner ring of the gimbal.&amp;nbsp; Note, the eye is itself an outer ring.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-j8TuZzplPvE/TsrWth93wgI/AAAAAAAAAIk/hZphwnRsHlA/s1600/IMG_1833.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="426" src="http://2.bp.blogspot.com/-j8TuZzplPvE/TsrWth93wgI/AAAAAAAAAIk/hZphwnRsHlA/s640/IMG_1833.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Finally, a bit of scrap wood as the support.&amp;nbsp; M2 screws used as axles.&amp;nbsp; All small and fiddly.&amp;nbsp; Hopefully you can see how it can twist along the lines of the axles. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8696036265262033858?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8696036265262033858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/11/2-axis-gimbal-inside-eye.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8696036265262033858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8696036265262033858'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/11/2-axis-gimbal-inside-eye.html' title='2 Axis Gimbal inside an eye'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/-rZGfS8w4q8/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-5030155566473140141</id><published>2011-11-21T10:18:00.001Z</published><updated>2011-11-26T02:23:54.245Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='polymorph'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><title type='text'>Working with Polymorph / Shapelock</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Late Saturday night I played with some &lt;a href="http://www.mindsetsonline.co.uk/product_info.php?products_id=550"&gt;polymorph plastic&lt;/a&gt;.&amp;nbsp; You can heat this plastic up in hot water and it melts into a dough like form, and sets hard again as it cools.&amp;nbsp; It is very easy to use and very strong.&amp;nbsp; An excellent material for prototyping.&amp;nbsp; I also think it is a good material in its own right.&amp;nbsp; Mechanically it is very slippery and resilient to flexing.&amp;nbsp; You can use it thick and rigid, or purposefully very thin to create flexible joints.&amp;nbsp; I thought I'd share some tips on working with it. &lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4BI_khWDVyw/Tsowg5MoHII/AAAAAAAAAH0/WrjbhSVv2AM/s1600/IMG_1842.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="424" src="http://3.bp.blogspot.com/-4BI_khWDVyw/Tsowg5MoHII/AAAAAAAAAH0/WrjbhSVv2AM/s640/IMG_1842.JPG" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Notice some clay trapped within the polymorph.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gaRwHSG3T9E/Tso1EbeG3LI/AAAAAAAAAIE/2ZDKtCcqk0Q/s1600/IMG_1825.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Using hot water means the polymorph will get wet.&amp;nbsp; Have a tea towel on hand to dry the plastic off as you pull it out of the hot water.&amp;nbsp; A tea towel is good because it is not fluffy!&amp;nbsp; Fluff sticks to polymorph.&amp;nbsp; I lay the towel flat on the table and press the polymorph into it.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you can be a bit patient, I find polymorph can get really extra soft and squishy if you leave it in boiling water for longer. &amp;nbsp; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Big clumps of polymorph don't melt well.&amp;nbsp; Initially it is in granular form, but one of the good things about polymorph is being able to reuse it.&amp;nbsp; Whenever possible, stretch any excess polymorph out thin before it cools, it will be much easier to re-melt.&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The downside to stretching out polymorph is that when you reheat it, you will need to fold it to get thickness back.&amp;nbsp; This is a really difficult stage, where water can get caught between layers.&amp;nbsp; Try to dry out your polymorph properly before folding.&amp;nbsp; Better yet, take the time to cut your polymorph up into tiny pieces before starting work. &amp;nbsp; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Hot polymorph cuts really well with scissors.  &amp;nbsp;Scissors are my favourite way to get clean edges.  &amp;nbsp; Because it melts when it gets hot, any tools that create heat through friction are a bit more tricky to use.&amp;nbsp; The plastic tends to stick to the tool.&amp;nbsp; Scissors slice through nicely.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In a similar way, you can carve with a stanley knife, but this is quite dangerous.&amp;nbsp; Polymorph is self-lubricating and very slippery.&amp;nbsp; Its usually naturally creates organic shapes which are hard to carve down.&amp;nbsp; It cools to a very hard object, so the blade is prone to biting in only to suddenly jump out and into fingers.&lt;/li&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gaRwHSG3T9E/Tso1EbeG3LI/AAAAAAAAAIE/2ZDKtCcqk0Q/s1600/IMG_1825.JPG" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="265" src="http://1.bp.blogspot.com/-gaRwHSG3T9E/Tso1EbeG3LI/AAAAAAAAAIE/2ZDKtCcqk0Q/s400/IMG_1825.JPG" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;oops&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;li&gt;Polymorph is reasonably easy to puncture with something sharp.&amp;nbsp; I like using a throwing dart, as you can get a good grip and the dart point has a good taper to widen holes.&amp;nbsp; However, the polymorph does seem to close up on itself.&amp;nbsp; So use something like a dart, and then a drill bit by hand to cut away the hole a bit more. &amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you can, work in details like holes and clean edges with tools whilst polymorph is a bit soft.&amp;nbsp; It is much much easier.&amp;nbsp; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;You can add threaded holes to polymorph for screws!&amp;nbsp; Simply, whilst the polymorph is hot, place a screw through the plastic and ensure the polymorph has a good grip on the screw.&amp;nbsp; Once set, unscrew the screw and you'll have the negative threaded hole left.&amp;nbsp; This is a good way to avoid using nuts on your screws, and to create boxes or access ports in objects that can be secured.&amp;nbsp; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Polymorph only seems to stick to itself it both bits of polymorph are in their hot and malleable form.&amp;nbsp; It you shape hot polymorph against cold polymorph, the two can be pulled apart really easily.&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;This can be a bad thing if you need to extend some work.&lt;/li&gt;&lt;li&gt;I've not tried it, but it might mean you can create a mold from polymorph, and then use more hot polymorph against the cold mold to cast a replica&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;li&gt;When combining two bits of hot polymorph, the seams can be hard to blend and flatten out.&amp;nbsp; By far the best strategy I've come across so far is to have something solid to push against.&amp;nbsp; In most cases this means working with a mold. A mold could be a custom made plaster cast, or an ordinary object that meets your needs.&amp;nbsp; &lt;/li&gt;&lt;ol&gt;&lt;li&gt;With a mold you can get very smooth surfaces on the polymorph.&amp;nbsp; Working by hand leads to finger depressions and organic surfaces.&amp;nbsp; Either could be useful.&lt;/li&gt;&lt;li&gt;When using a mold and pressing in your polymorph, use a pair of scissors to cut away the excess overflowing polymorph.&amp;nbsp; I found a scalpel didn't work so well. &amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;li&gt;When using polymorph against objects be really careful with any other dirts or foreign objects.&amp;nbsp; I pressed polymorph against an object I sculpted out of clay.&amp;nbsp; The clay got between layers of polymorph, which made it really weak.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Interestingly, the thin layers of polymorph showed the clay, giving it a new colour.&lt;/li&gt;&lt;li&gt;Also, these many separated layers of polymorph gave it quite a good degree of flexibility, and could be a nice way of rendering joints.&lt;/li&gt;&lt;li&gt;Trapped dirt is really hard to later remove from polymorph, and can ruin your otherwise reusable stock :(&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;li&gt;Lastly, I had a brief experiment with a hot air gun (paint stripper).&amp;nbsp; This was really exciting.&amp;nbsp; The polymorph seemed to retain its hot flexible state for longer.&amp;nbsp; Also, it wasn't wet!&amp;nbsp; I used the heat gun to heat up a piece of work to make some adjustments.&amp;nbsp; I'll be doing some more experiments here - I'm not sure what will happen if the plastic gets too hot.&amp;nbsp; But this could be a good way to keep polymorph flexible for longer, giving more time to play.&lt;/li&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-2QA6uUafqQg/TsownwRx-EI/AAAAAAAAAH8/gZnt_USDCd0/s1600/IMG_1837.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="425" src="http://1.bp.blogspot.com/-2QA6uUafqQg/TsownwRx-EI/AAAAAAAAAH8/gZnt_USDCd0/s640/IMG_1837.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-5030155566473140141?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/5030155566473140141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/11/working-with-polymorph.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5030155566473140141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5030155566473140141'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/11/working-with-polymorph.html' title='Working with Polymorph / Shapelock'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-4BI_khWDVyw/Tsowg5MoHII/AAAAAAAAAH0/WrjbhSVv2AM/s72-c/IMG_1842.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-6327906393091864592</id><published>2011-11-12T22:43:00.001Z</published><updated>2011-11-12T23:22:08.736Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='3d printing'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><category scheme='http://www.blogger.com/atom/ns#' term='battery charging'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>E-Puck Battery Charger</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This evening I decided to take my ideas for an &lt;a href="http://www.e-puck.org/" target="_blank"&gt;e-puck&lt;/a&gt; battery charging station and realise them as a 3D model to later &lt;a href="http://www.paulodowd.com/2011/10/first-3d-prints.html" target="_blank"&gt;print&lt;/a&gt;.&amp;nbsp; Having access to a 3D printer is really exciting!&amp;nbsp; Ideally, e-pucks should be able to find the charging station, dock, charge-up and leave - all without switching off.&amp;nbsp; Here are some images of what I have so far:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-RfdDxOt-1o8/Tr72yRmouSI/AAAAAAAAAHg/P0kjt66Sn8s/s1600/charger1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="251" src="http://3.bp.blogspot.com/-RfdDxOt-1o8/Tr72yRmouSI/AAAAAAAAAHg/P0kjt66Sn8s/s320/charger1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;This is the front of the charger.&amp;nbsp; The charger consists of two parts.&amp;nbsp; One is a ramp (bottom part) and the second is a rocking element (vertical part).&amp;nbsp; I've separated the two parts in these images, the two will interlock.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;There are two ramps for the e-puck robot to drive up, one for each wheel.&amp;nbsp; I think it is important to have the gap between the ramps as the robots have a very low ground clearance, so this allows the offending plastic body to 'float'.&amp;nbsp; The ramps must be long and gradual.&amp;nbsp; They are wider at the base to guide a robot in appropriately, reducing a the need for an accurate docking algorithm.&lt;br /&gt;&lt;br /&gt;The second purpose of the ramp and gap is to allow an armature to slide underneath the robot.&amp;nbsp; This is the long piece sticking out from the bottom of the vertical part of the charger.&amp;nbsp; This will have the negative contact for the battery charger, and will make direct contact with the shell of the battery exposed under the robot.&lt;br /&gt;&lt;br /&gt;You might notice the armature has a notch, and the bottom of the ramps have little notches too.&amp;nbsp; This is to allow an elastic band to be stretched between the ramps and over the armature.&amp;nbsp; This will cause the rocking part to naturally spring back to an upright position. &lt;br /&gt;&lt;br /&gt;As the robot drives up the ramp, it will push into to the vertical piece, which has a protrusion at the very top.&amp;nbsp; This protrusion will have the positive contact plate to charge the battery.&amp;nbsp; I decided to only expose one charging plate on the robot to stop robots shorting each others batteries out.&amp;nbsp; An e-puck pushing into the vertical piece&amp;nbsp; will raise the negative armature up under the e-puck and start the charging process.&amp;nbsp; Both the positive pushing protrusion and the negative armature will require some sheet copper, which will extend back to make contact with the charging circuit on the back.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-rJ15NVaKsXA/Tr72y_4_tBI/AAAAAAAAAHk/Vp2RTjsOCJs/s1600/charger2.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="230" src="http://2.bp.blogspot.com/-rJ15NVaKsXA/Tr72y_4_tBI/AAAAAAAAAHk/Vp2RTjsOCJs/s320/charger2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;The back of the charger mirrors the charging contacts on the circuit sold specifically for the e-puck batteries.&amp;nbsp;&amp;nbsp; The idea is to clip the original charging circuit straight to this station.&amp;nbsp; There is a resistor in the charging circuit which sets the charging current.&amp;nbsp; I will replace this with a variable resistor to compensate for the load of a running e-puck, allowing it to charge up without switching off.&amp;nbsp; The hole in the vertical piece is to allow for a light source to act as an attractor to robots.&lt;br /&gt;&lt;br /&gt;I'm quite happy with this idea so far.&amp;nbsp; I need to think about how to keep the robot securely in place whilst charging.&amp;nbsp; Minimal, interlocking parts seems to be the theme of 3D printing.&amp;nbsp; This took about 2 hours to think up and sketch.&lt;br /&gt;&lt;br /&gt;More to come!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-6327906393091864592?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/6327906393091864592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/11/e-puck-battery-charger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6327906393091864592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6327906393091864592'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/11/e-puck-battery-charger.html' title='E-Puck Battery Charger'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-RfdDxOt-1o8/Tr72yRmouSI/AAAAAAAAAHg/P0kjt66Sn8s/s72-c/charger1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8228310458900595915</id><published>2011-11-04T23:36:00.000Z</published><updated>2011-11-04T23:43:15.978Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='motor smoothing'/><category scheme='http://www.blogger.com/atom/ns#' term='servo motors'/><category scheme='http://www.blogger.com/atom/ns#' term='servos'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><category scheme='http://www.blogger.com/atom/ns#' term='microcontrollers'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><title type='text'>Arduino, Smooth RC Servo Motor Control</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;When using the arduino Servo.h library, you normally use myServo.write(), but you can use myServo.writeMicroseconds().&amp;nbsp; This lets you write out the controlling squarewave period in microseconds.&amp;nbsp; The rc servo standard is typically 1000us &amp;lt;-&amp;gt; 2000us, with 1500us as neutral position.&amp;nbsp; This means that you have a resolution of ~2000 individual steps, rather than the 180 (degree) steps the normal write() would provide - and therefore, the potential for significantly smoother servo motor movements.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Check out: http://arduino.cc/en/Reference/ServoWriteMicroseconds&lt;br /&gt;&lt;br /&gt;Here is the test code I have used to good effect so far, I have been using servo motors with an extended range of uSeconds.&amp;nbsp; Currently using one pot to set the target position, and the second pot to change the ramping/smoothing fraction.&amp;nbsp; Ramping/smoothing is done with a technique called easing (see &lt;a href="http://lab.guilhermemartins.net/2009/08/21/filtering-servo-movements/"&gt;here&lt;/a&gt;) which means continually adding a fraction-of-the-difference between target and current position.&amp;nbsp; See below, very simple code, only one variable to adjust smoothing. &lt;br /&gt;&lt;br /&gt;The last point to mention is that if you want to benefit from writing out a higher resolution of steps, you need to write out the control signal much quicker!&amp;nbsp; I found the Serial.print statements to considerably slow the code down.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;#include &amp;lt;Servo.h&amp;gt;&lt;servo.h&gt;&lt;br /&gt;&lt;br /&gt;// Using floats as the servo library can handle this and&lt;br /&gt;// it makes for smoother progression through position&lt;br /&gt;// values.&lt;br /&gt;float current_pos;&lt;br /&gt;float target_pos;&lt;br /&gt;&lt;br /&gt;// One variable to control smoothing.&lt;br /&gt;float easing = 0.7;&lt;br /&gt;&lt;br /&gt;// Motors&lt;br /&gt;Servo l_motor;&lt;br /&gt;Servo r_motor;&lt;br /&gt;&lt;br /&gt;void setup() {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Serial seriously slows this code down... commented out&lt;br /&gt;&amp;nbsp;&amp;nbsp; //Serial.begin(9600);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Start the code at middle-ish &lt;br /&gt;&amp;nbsp;&amp;nbsp; // position&lt;/servo.h&gt;&lt;/i&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; current_pos = 1500;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // pin/connector specific!&lt;br /&gt;&amp;nbsp;&amp;nbsp; l_motor.attach(4);&lt;br /&gt;&amp;nbsp;&amp;nbsp; r_motor.attach(5);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;&amp;nbsp;&amp;nbsp; int pot;&amp;nbsp;&amp;nbsp; // target position&lt;br /&gt;&amp;nbsp;&amp;nbsp; int pot2; // easing fraction&lt;br /&gt;&amp;nbsp;&amp;nbsp; float diff; // difference of position&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Read in pot, scale appropriately&lt;br /&gt;&amp;nbsp;&amp;nbsp; // to set uSecond position value&lt;br /&gt;&amp;nbsp;&amp;nbsp; // in range 600:2400&lt;br /&gt;&amp;nbsp;&amp;nbsp; pot = analogRead(A2);&lt;br /&gt;&amp;nbsp;&amp;nbsp; pot = map( pot, 0,1023, 0, 1800);&lt;br /&gt;&amp;nbsp;&amp;nbsp; pot = 2400 - pot;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Read in pot 2, used to create&lt;br /&gt;&amp;nbsp;&amp;nbsp; // a fraction to scale movement.&lt;br /&gt;&amp;nbsp;&amp;nbsp; pot2 = analogRead(A3);&lt;br /&gt;&amp;nbsp;&amp;nbsp; pot2 = map( pot2, 0, 1023, 0,1000);&lt;br /&gt;&amp;nbsp;&amp;nbsp; easing = (float)pot2;&lt;br /&gt;&amp;nbsp;&amp;nbsp; easing /= 1000;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Type cast to float.&lt;br /&gt;&amp;nbsp;&amp;nbsp; target_pos = (float)pot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Work out the required travel.&lt;br /&gt;&amp;nbsp;&amp;nbsp; diff = target_pos - current_pos;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Debug prints&lt;br /&gt;&amp;nbsp;&amp;nbsp; // slow, so commented out&lt;br /&gt;&amp;nbsp;&amp;nbsp; /*&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print("Current: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( current_pos );&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print(", Target: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( target_pos );&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print(", Difference: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( diff );&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print(", Easing: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( easing );&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print(", L: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( current_pos );&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print(", R: ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.print( 600 + (2400 - current_pos));&lt;br /&gt;&amp;nbsp;&amp;nbsp; Serial.println(" ");&lt;br /&gt;&amp;nbsp;&amp;nbsp; */&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Avoid any strange zero condition&lt;br /&gt;&amp;nbsp;&amp;nbsp; if( diff != 0.00 ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; current_pos += diff * easing;&lt;br /&gt;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if diff == 0, we don't need to move!&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Write out motor values.&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Right motor is offset by 600, and the opposite of left.&lt;br /&gt;&amp;nbsp;&amp;nbsp; l_motor.writeMicroseconds( (int)current_pos );&lt;br /&gt;&amp;nbsp;&amp;nbsp; r_motor.writeMicroseconds( (int)(600 + (2400 - current_pos)) );&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; // Delay, need to play with this, use millis()&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay(20);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;}&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8228310458900595915?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8228310458900595915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/11/arduino-smooth-rc-servo-motor-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8228310458900595915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8228310458900595915'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/11/arduino-smooth-rc-servo-motor-control.html' title='Arduino, Smooth RC Servo Motor Control'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3931554245005544869</id><published>2011-11-01T11:15:00.000Z</published><updated>2011-11-01T11:16:25.556Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='box guitar'/><title type='text'>Drum Guitar</title><content type='html'>On Sunday I pulled together some scrap parts and built a guitar around an Irish Bodhran drum.  &lt;br&gt;&lt;br&gt;&lt;object width="400" height="300"&gt; &lt;param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628026888608%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628026888608%2F&amp;set_id=72157628026888608&amp;jump_to="&gt;&lt;/param&gt; &lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=109615"&gt;&lt;/param&gt; &lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=109615" allowFullScreen="true" flashvars="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628026888608%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157628026888608%2F&amp;set_id=72157628026888608&amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3931554245005544869?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3931554245005544869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/11/drum-guitar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3931554245005544869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3931554245005544869'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/11/drum-guitar.html' title='Drum Guitar'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8475998852159634492</id><published>2011-10-28T13:20:00.000+01:00</published><updated>2011-10-28T13:23:55.354+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='graphs'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>R, Scripting Graphs</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;My thesis has lots of graphs.  My experiments have output huge amounts of data.  I have found the application 'R' (&lt;a href="http://www.r-project.org/"&gt;here&lt;/a&gt;) to be fantastically useful in automating the process of taking data and transforming it into graphs.  &lt;br&gt;&lt;br&gt;The thing which is easy to overlook is how often a graph needs a tweak - a colour change, a placement change, a size change, a new representation - which is all fiddly and tedious business.   When moving from columned papers to a thesis, there is the opportunity to make use of full A4 pages.  So having the graphing scripted means it is easier to make tweaks and roll back to previous versions, easier to remember how the graphs were produced in the first place.&lt;br&gt;&lt;br&gt;So here are some snippets from my scripts to produce graphs in R, they might be useful.&lt;br&gt;&lt;br&gt;&lt;i&gt;library( "RSvgDevice" )&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;This loads in the necessary library to export graphs in SVG format.  I've found this immensely useful because it keeps all the drawn elements of the graph separate.  So for instance, I can move the legend box around manually if I can't get it where I want in script, or resize and inset another graph.  I work in Ubuntu, and Inkscape has been a fantastic SVG editor, from which I can save the graph to any other image format required.  &lt;br&gt;&lt;br&gt;&lt;i&gt;devSVG( file="graph_filename.svg", width=6, height=8 )&lt;/i&gt;&lt;br&gt;&lt;i&gt; ... &lt;/i&gt;&lt;br&gt;&lt;i&gt;dev.off()&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The above sets up a file to save to disk.  I find a width of 6 and height of 8 is a good proportion for a full A4 page of graphs.  As an SVG image, everything is scalable, so the actual magnitude is not too important.  dev.off() writes the enclosed commands (...) to disk and should be called last.&lt;br&gt;&lt;br&gt;&lt;i&gt;par( mfrow=c( 3, 2 ) )&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The above formats the file to accept a grid of graphs, 3 rows by 2 columns; so it will place 6 graphs in total.  When calling plot commands, it first moves from left-to-right, and top-to-bottom at each row end. &lt;br&gt;&lt;br&gt;&lt;i&gt;shade=rgb( 0, 100, 0, 35, max=255 )&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The above allows you to set a colour in red,green,blue format.  The important thing for me was being able to set the opacity.  I used this on a scatter plot with lots of overlapping data points, so the regions with lots of data became darker in colour.  &lt;br&gt;&lt;br&gt;&lt;i&gt; movingAverage = function( data, n = 5 ) { filter( data, rep( 1/n, n), sides=2 )} &lt;/i&gt;&lt;br&gt;&lt;i&gt; myData = movingAverage( myData, 10 ) &lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The above actually defines a function to perform a windowed average on a data set.   The second line shows the call.  Note, without '10', the function will default to a window of 5 samples because of 'n = 5' in the definition.  &lt;br&gt;&lt;br&gt;&lt;i&gt; d100 = function( data ) { rep( data / 100 ) } &lt;/i&gt;&lt;br&gt;&lt;i&gt; myData = d100( myData ) &lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The above works similar to the previous function, but simply divides the data set by 100.  These should be a good point to write more simple functions.  &lt;br&gt;&lt;br&gt;&lt;i&gt; myData = na.omit( myData ) &lt;/i&gt;&lt;br&gt;&lt;i&gt; myData = as.numeric( myData ) &lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The na.omit() removes any n/a data from the variable array.  I found that afterwards I would have to use as.numeric() to cast the variable array back to a number array.  Not sure why!&lt;br&gt;&lt;br&gt;Finally, in Ubuntu, I use a bash script to call &lt;i&gt;R --no-save &amp;lt; myGraphingScript.R&lt;/i&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8475998852159634492?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8475998852159634492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/10/r-scripting-graphs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8475998852159634492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8475998852159634492'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/10/r-scripting-graphs.html' title='R, Scripting Graphs'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-6739923154393322664</id><published>2011-10-07T18:06:00.000+01:00</published><updated>2011-10-07T18:09:38.499+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='extant'/><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><title type='text'>Haptic Lotus, UBICOMP 2011 Best Paper Award</title><content type='html'>A while ago I was involved in a side project.  &lt;a href="http://theadlab.blogspot.com/"&gt;Adam Spiers&lt;/a&gt; lead the technical aspect of &lt;a href="http://www.thequestion.org.uk/"&gt;The Question&lt;/a&gt; in partnership with &lt;a href="http://www.extant.org.uk/"&gt;Extant&lt;/a&gt; and the &lt;a href="http://www8.open.ac.uk/choose/ou/ppcbrand?KWCAMPAIGN=Rapp_BAU_England_-_Brand&amp;keywordid=ggluk_open_university&amp;mkwid=spmL6TzBt|pcrid|6912940942&amp;gclid=CNzSwLD-1qsCFQ0OfAodMmM0QA"&gt;Open University&lt;/a&gt;.  &lt;br&gt;&lt;br&gt;The project has been discussed in Wired (&lt;a href="http://www.wired.co.uk/news/archive/2010-06/18/the-question-a-journey-through-pitch-black-theatre"&gt;here&lt;/a&gt;), Disability Now (&lt;a href="http://www.disabilitynow.org.uk/entertainment/arts/all-the-stages-a-world"&gt;here&lt;/a&gt;), and Adam has done a great job disseminating (&lt;a href="http://theadlab.blogspot.com/2011/08/designing-in-wild-talk.html"&gt;here&lt;/a&gt;, &lt;a href="http://theadlab.blogspot.com/2011/08/haptic-lotus-at-secret-garden-party.html"&gt;here&lt;/a&gt; and &lt;a href="http://guerillascience.co.uk/archives/2490"&gt;here&lt;/a&gt;).  &lt;br&gt;&lt;br&gt;Most recently, the academic paper &lt;a href="http://mcs.open.ac.uk/yr258/papers/ubic280_vanderlinden.pdf"&gt;"Haptic Reassurance in the Pitch Black for an Immersive Theatre Experience"&lt;/a&gt; was presented by the collaborator &lt;a href="http://crc.open.ac.uk/People/j.vanderlinden"&gt;Janet van der Linden&lt;/a&gt; and won the Best Paper Award at the at the prestigious Ubiquitous Computing conference (&lt;a href="http://www.ubicomp.org/ubicomp2011/"&gt;UbiComp&lt;/a&gt;) in China.  &lt;br&gt;&lt;br&gt;&lt;a href="http://www.flickr.com/photos/46276914@N05/6220301037/" title="IMG_1609 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm7.static.flickr.com/6050/6220301037_0f07a2b3f0.jpg" width="333" height="500" alt="IMG_1609"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;At first it felt odd to be credited as an author when I did not contribute to the writing of the paper.  However, I have come to realise that the paper simply would not have come to be if it were not for my technical contribution.  This may sound a little arrogant or egotistical, but I am simply realising the value of my part in a larger contribution.  When taking on the side project, I (naively) thought I was simply to be a spare pair of hands.  As it turned out, I did my fair share of the making, and then my co-technical assistant &lt;a href="http://info.uwe.ac.uk/news/uwenews/news.aspx?id=1319"&gt;David McGoran&lt;/a&gt; unfortunately broke his leg a week before the deadline.  &lt;br&gt;&lt;br&gt;I was drafted in and I worked tirelessly day and night for 5 days to fabricate, construct, solder, and wire all the Lotus devices along side my disabled and suffering friend.  Exhausted, I stepped onto a train to London with the box of bespoke items headed straight for the imminent opening of the show.  I was totally naive to the world of Theater, and was greeted by many hard working, stressed and anxious people.  I had come with the goods, shouldered with responsibility, and they naturally looked to me to solve the new slew of problems as we introduced the devices to the setup.  &lt;br&gt;&lt;br&gt;It was one of the most stressful experiences I had ever had, and after the show I had a complete aversion to the project.  I felt terrible.  But in fact, this project has taught me many great lessons.  One of the most important might be the perspective of knowing that hard work will pay off, but it may take time.  In this case, the authors of the paper did an exceptional job and now I have the immense pleasure of the gift of an award plaque.  &lt;br&gt;&lt;br&gt;It is also interesting to note that since the Lotus project I have taken on many more with higher stress levels and perhaps even longer hours (the PhD is included in this, of course!).  In some ways, I am observing again and again that it is the experiences that take me to breaking point (and some times, even the failures) that significantly increase my workload capacity, level of organisation and broaden prospective horizons.  &lt;br&gt;&lt;br&gt;In any case, I am proud to have worked with Janet van der Lindin, Yvonne Rogers, Maria Oshodi, Adam Spiers, David McGoran, Rafael Cronin and the others, in a tough project, but one that has more rewards than I imagined.  I am very grateful for my inclusion as an author, and humbly admit I did not realise the significance when I was originally notified!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-6739923154393322664?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/6739923154393322664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/10/haptic-lotus-ubicomp-2011-best-paper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6739923154393322664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6739923154393322664'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/10/haptic-lotus-ubicomp-2011-best-paper.html' title='Haptic Lotus, UBICOMP 2011 Best Paper Award'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm7.static.flickr.com/6050/6220301037_0f07a2b3f0_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-603946335032987393</id><published>2011-10-07T17:12:00.000+01:00</published><updated>2011-10-07T17:19:31.542+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3d printing'/><category scheme='http://www.blogger.com/atom/ns#' term='evolutionary algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>First 3D prints</title><content type='html'>So, things with the Makerbot thing-o-matic are moving along nicely.  I've had a few accidents but nothing too serious or costly.  Machines can be so idiosyncratic!  In the flickr window below are some examples of print jobs:&lt;br&gt;&lt;br&gt;&lt;object width="400" height="300"&gt; &lt;param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157627839027212%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157627839027212%2F&amp;set_id=72157627839027212&amp;jump_to="&gt;&lt;/param&gt; &lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=107931"&gt;&lt;/param&gt; &lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=107931" allowFullScreen="true" flashvars="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157627839027212%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157627839027212%2F&amp;set_id=72157627839027212&amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br&gt;&lt;br&gt;On the evolving front, I've rather taken to a program called OpenSCAD.  Instead of drawing 3D objects with a pointer device (like a mouse, or scribe) you code objects.  This means that dimensions and positions are explicitly stated.  I find this much more relaxing as I do not have to fiddle with dimensions and view perspectives.  I think this will also suit the evolutionary approach, as the text description of 3D models would be easy to generate as output from something like the C programming language.  &lt;br&gt;&lt;br&gt;This might sound like a backwards and horrible way to do it.  However, OpenSCAD retains the 3D render of your object, which is easily used to quickly check and adjust your model.  Here is a screen shot:&lt;br&gt;&lt;br&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-tGc-dROx4b8/To8lo01XoGI/AAAAAAAAAGk/v-oxZXHs7Is/s1600/OpenSCAD_screenshot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="200" width="320" src="http://4.bp.blogspot.com/-tGc-dROx4b8/To8lo01XoGI/AAAAAAAAAGk/v-oxZXHs7Is/s320/OpenSCAD_screenshot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Describing 3D models is not as hard as I thought it might be.  Here is a cyclinder:&lt;br&gt;&lt;pre&gt;&lt;br /&gt;cyclinder( h = 5, r = 4.5 );&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;And to subtract a cylinder from a cube (as if carving one from another):&lt;br&gt;&lt;pre&gt;&lt;br /&gt;difference() {&lt;br /&gt;     cube( [ 10, 10, 10 ] );&lt;br /&gt;     cylinder( h = 5, r = 4.5 ); &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Where 'h' is height, 'r' is radius, and the triplet in brackets represents a cube dimensions x,y,z.&lt;br&gt;&lt;br&gt;The other good thing is being able to plan out a drawing, and then group that drawing into a module.  You can then start another drawing, and call your previously defined modules as a component, and treat it like any other shape primitive.  This could be key to creating printable, modular forms to evolve.&lt;br&gt;&lt;br&gt;Great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-603946335032987393?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/603946335032987393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/10/first-3d-prints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/603946335032987393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/603946335032987393'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/10/first-3d-prints.html' title='First 3D prints'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-tGc-dROx4b8/To8lo01XoGI/AAAAAAAAAGk/v-oxZXHs7Is/s72-c/OpenSCAD_screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8647391369238896997</id><published>2011-10-06T11:15:00.000+01:00</published><updated>2011-10-06T11:15:52.073+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='simulation'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>Enki, light, stripped.</title><content type='html'>A while ago I was investigating the potential of running the &lt;a href=" "&gt;Enki simulator&lt;/a&gt; (authored by Stephane Magnenat, Markus Waibel, Antoine Beyeler) on the e-pucks.  As part of the process, I stripped the Enki source down, removing visualisation etc.  I found this on my hard drive today and thought I should upload it before I lose it again.  Of particular interest might be the makefile for the compiling and linking process.  Available &lt;a href="https://sites.google.com/site/creaturelabsprojects/code-scraps/enki_lite.tgz?attredirects=0&amp;d=1"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8647391369238896997?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8647391369238896997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/10/enki-light-stripped.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8647391369238896997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8647391369238896997'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/10/enki-light-stripped.html' title='Enki, light, stripped.'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-5837767227780364105</id><published>2011-09-14T14:58:00.000+01:00</published><updated>2011-09-14T15:04:55.532+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3d printing'/><category scheme='http://www.blogger.com/atom/ns#' term='evolutionary algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>MakerBot making Bots</title><content type='html'>One of my recent tasks has been to build the 'thing-o-matic' from &lt;a href="http://www.makerbot.com/"&gt;Makerbot Industries&lt;/a&gt;.  The process was remarkably easy.  I completed the majority of the physical build within a single weekend.  I had to take a break to work on my thesis, and I finished the electronics side up this week.  Here is a (pretty poor quality) stop motion of the machine printing a double helix, about 1 hour 15 in 1 minute 29:&lt;br&gt;&lt;iframe width="420" height="345" src="http://www.youtube.com/embed/FVPKewYfvg4" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br&gt;&lt;br&gt;I'm impressed with the speed at which it can build.  So far I have had some small issues, that haven't quite caused problems.  For instance, the extruding tool tip occasionally knocks the object it is building, which is probably a calibration error.  When starting a build, the machine doesn't quite wipe away excess plastic before starting, etc.  But so far, I'm really impressed.  Especially with how easy it is to build models from the internet.  &lt;br&gt;&lt;br&gt;From here, I have to investigate how to integrate this printer into a closed loop of artificial evolution.  I have almost limitless freedom to find a way to do this, preferably involving robots.  So far I have been thinking about the genetic representation of the problem.  &lt;br&gt;&lt;br&gt;The &lt;a href="http://www.thingiverse.com/"&gt;'thingiverse'&lt;/a&gt; is a huge online repository of 3d models, printed and validated by people using the Makerbot.  These models seem to be in the file format "stl", and if we look inside they look like this:&lt;br&gt;&lt;br&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;solid Default&lt;br /&gt;  facet normal -9.891329e-01 -1.039620e-01 -1.039620e-01&lt;br /&gt;    outer loop&lt;br /&gt;      vertex -4.959956e+01 -4.000151e+00 4.000000e+01&lt;br /&gt;      vertex -4.959956e+01 -1.977981e+00 3.797783e+01&lt;br /&gt;      vertex -4.949447e+01 -5.000000e+00 4.000000e+01&lt;br /&gt;    endloop&lt;br /&gt;  endfacet&lt;br /&gt;  facet normal -9.891329e-01 -1.039620e-01 -1.039620e-01&lt;br /&gt;    outer loop&lt;br /&gt;      vertex -4.949447e+01 -4.500076e+00 3.950008e+01&lt;br /&gt;      vertex -4.959956e+01 -1.977981e+00 3.797783e+01&lt;br /&gt;      vertex -4.949447e+01 -2.472383e+00 3.747238e+01&lt;br /&gt;    endloop&lt;br /&gt;  endfacet&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;I think this is a description of surfaces that make up the 3D object.  I think one option might be to try and evolve these surfaces.  The nice thing about this approach would be that we could render the result of evolution on a computer first, not requiring the printing time.  This would make assessing fitness and mutating hundreds of generations much easier, as we can simulate the whole thing.  &lt;br&gt;&lt;br&gt;A problem to this approach is the complexity in linking thousands of surfaces.  We could let evolution go crazy, and rely on fitness assessment to get rid of the bad stuff.   However,  I think we would either have to constrain how surfaces can connect, or come up with a neat form of genotype transcription that would generate a phenotype of plausible objects based on the previous surfaces laid.  This is a bit of a weird idea, as it means the genotype would be expressed as a function of itself - but evolution could refine the complexity of the phenotype expression for us.&lt;br&gt;&lt;br&gt;Another file format is gcode.  This is the file that is generated to move the tool head around on the print surface.  Gcode is the instructions to lay the plastic, and references x,y,z and to extrude plastic.  I think gcode inherits similar problems to stl files.  Again, its a bit complicated and long winded.  We could copy and paste in the start-up and shut-down routines, and evolve the building instructions.  This is what gcode looks like:&lt;br&gt;&lt;br&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;br /&gt;(&lt;alteration&gt;)&lt;br /&gt;(**** beginning of start.gcode ****)&lt;br /&gt;(This file is for a MakerBot Thing-O-Matic)&lt;br /&gt;(**** begin initialization commands ****)&lt;br /&gt;G21 (set units to mm)&lt;br /&gt;G90 (set positioning to absolute)&lt;br /&gt;M108 R5.0 (set extruder speed)&lt;br /&gt;M103 (Make sure extruder is off)&lt;br /&gt;M104 S225 T0 (set extruder temperature)&lt;br /&gt;M109 S125 T0 (set heated-build-platform temperature)&lt;br /&gt;(**** end initialization commands ****)&lt;br /&gt;(**** begin homing ****)&lt;br /&gt;G162 Z F500 (home Z axis maximum)&lt;br /&gt;G92 Z10 (set Z to 0)&lt;br /&gt;G1 Z0.0 (move z down 10)&lt;br /&gt;G162 Z F100 (home Z axis maximum)&lt;br /&gt;G161 X Y F2500 (home XY axes minimum)&lt;br /&gt;M132 X Y Z A B (Recall stored home offsets for XYZAB axis)&lt;br /&gt;(**** end homing ****)&lt;br /&gt;(**** begin pre-wipe commands ****)&lt;br /&gt;G1 X52.0 Y-57.0 Z10.0 F3300.0 (move to waiting position)&lt;br /&gt;M6 T0 (wait for toolhead parts, nozzle, HBP, etc., to reach temperature)&lt;br /&gt;G04 P60000 (Wait t/1000 seconds)&lt;br /&gt;(**** Start Acceleration ****)&lt;br /&gt;(Note: nozzles smaller than 0.5mm might require adjustments to this acceleration routine)&lt;br /&gt;M108 R1.0&lt;br /&gt;G04 P15000&lt;br /&gt;M101&lt;br /&gt;M108 R2.0&lt;br /&gt;G04 P10000&lt;br /&gt;M101&lt;br /&gt;M108 R3.0&lt;br /&gt;G04 P5000&lt;br /&gt;M101&lt;br /&gt;M108 R4.0&lt;br /&gt;G04 P5000&lt;br /&gt;M101&lt;br /&gt;M108 R5.0&lt;br /&gt;G04 P2500&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br&gt;A third option, which is a simplification, would be to evolve structures of modular 3d objects.  This would be like building something out of lego.  This would be much easier to evolve, as we can copy and paste in stl files with relative coordinates.  It would still need some error checking, for floating and disconnected objects.  However, when making a simplification like this, we are limiting the scope of evolution.  &lt;br&gt;&lt;br&gt;So the first thing I have to decide, is what to evolve, for what purpose, and how to determine if it was a successful solution.  Lots to think about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-5837767227780364105?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/5837767227780364105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/09/makerbot-making-bots.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5837767227780364105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5837767227780364105'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/09/makerbot-making-bots.html' title='MakerBot making Bots'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/FVPKewYfvg4/default.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3460178878430485590</id><published>2011-08-22T22:11:00.000+01:00</published><updated>2011-08-24T07:38:33.786+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='egg'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><title type='text'>Magnetic Quaking Egg</title><content type='html'>There are plenty of things I should of put on here, but for the time being...&lt;br /&gt;&lt;br /&gt;I have collaborated with &lt;a href="http://www.emmapowell.com"&gt;Emma Powell&lt;/a&gt; on an art piece.  It is in the Luggage exhibition curated by &lt;a href="http://www.matthewroyarnold.co.uk/"&gt;Matthew Arnold&lt;/a&gt; at the art gallery opposite College Green, Bristol.  My part was to build the electronics, but I also sorted out the fitting of stuff inside the suitcase.&lt;br /&gt;&lt;br /&gt;Here are some development photos, I'll get some photos of the work situated when the gallery officially opens tomorrow!  The egg is quite a charming object in its suitcase.  However, the real effect is picking it up and holding it.  It pulses gently in your hands.  It is not visual or audible.  It is very subtle.  It will be fun to see people interact with it, if I get the chance to hang around.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/46276914@N05/6065374912/" title="IMG_9865 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm7.static.flickr.com/6079/6065374912_03c8bd4620_z.jpg" width="427" height="640" alt="IMG_9865"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The circuit prototype.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/46276914@N05/6064820435/" title="IMG_9913 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm7.static.flickr.com/6076/6064820435_14a76bbb55_z.jpg" width="427" height="640" alt="IMG_9913"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The circuit mounted with standard AA batteries.  The white cylinder houses the vibration motor.  A reed switch is mounted in a groove in the wooden block at the top.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/46276914@N05/6064817993/" title="IMG_9916 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm7.static.flickr.com/6206/6064817993_e2ae02087b_z.jpg" width="640" height="427" alt="IMG_9916"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stuffing the egg with packing foam, before inserting the circuitry.  The foam dampens the mechanical feeling of the vibration motor, and snuggly holds the circuitry.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/46276914@N05/6064823615/" title="IMG_9861 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm7.static.flickr.com/6202/6064823615_f135d148f6_z.jpg" width="640" height="427" alt="IMG_9861"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first time the egg sat in the suitcase.  We decided not to go with the mottled purple velvet.  And the finished version features the egg in a little weaved harness.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Emma cast the egg from a real ostrich egg, and I built the electronics for it.  It was a nice simple circuit and took me back to my teenage years of tinkering with analogue electronics.  There is no mirco-controller (no arduino, etc).  &lt;br /&gt;&lt;br /&gt;Instead, it has a hex inverter (74hc14) linked up as a &lt;a href="http://en.wikipedia.org/wiki/Ring_oscillator"&gt;ring oscillator&lt;/a&gt;, which is timed with capacitors and resistors.  This slow oscillator triggers a second oscillator built using two inverting gates of a 74hc240.  The second oscillator causes a vibration motor to pulse, which is driven with the rest of the inverting gates of the 74hc240 ganged up.  &lt;br /&gt;&lt;br /&gt;A circuit diagram would have been much easier.  The savvy might recognise that description as &lt;a href="http://www.beam-wiki.org/wiki/PNCFree_Microcore"&gt;BEAM circuitry&lt;/a&gt;.  In actual fact, the circuit I used could be more efficient... but I planned it all out over a coffee and it worked well enough first time.  &lt;br /&gt;&lt;br /&gt;The best detail is the use of a change-over reed switch.  This allows the egg to be deactivated magnetically.  I clipped the normally-open leg off the reed switch, instead using the normally-closed leg.  This way, when the egg is removed from the suitcase (away from the magnets in the suitcase) the circuit is complete, and it starts pulsing in the recipients hand.  &lt;br /&gt;&lt;br /&gt;In theory, the batteries in this thing should last a very long time.  It is essentially off most of the time.  When it is on, it is powering only low-power CMOS, and about every 2 seconds a millisecond burst through a DC motor.  &lt;br /&gt;&lt;br /&gt;Emma Powell was a real pleasure to work with and hopefully we will have plenty more collaborations in the near future.  And it wouldn't be possible without the invitation from Matt Arnold. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3460178878430485590?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3460178878430485590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/08/magnetic-quaking-egg.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3460178878430485590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3460178878430485590'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/08/magnetic-quaking-egg.html' title='Magnetic Quaking Egg'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm7.static.flickr.com/6079/6065374912_03c8bd4620_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8304648378198439971</id><published>2011-07-21T13:33:00.000+01:00</published><updated>2011-07-21T13:33:40.379+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='#pragma'/><title type='text'>#pragma pack() update.</title><content type='html'>I  made a post a while back about the use of the #pragma pack(1) operator when coding for different platforms.  &lt;br /&gt;&lt;br /&gt;Yesterday I had a frustrating problem where the sizeof() a structure when passed to a function would change size.  It turns out it is because I did not close my #pragma pack(1) statement.  It meant that the point where I included a .h file with the #pragma statement from then on altered its memory packing routine.  &lt;br /&gt;&lt;br /&gt;Therefore, if using #pragma pack(1), close the statement with #pragma pack().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8304648378198439971?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8304648378198439971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/07/pragma-pack-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8304648378198439971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8304648378198439971'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/07/pragma-pack-update.html' title='#pragma pack() update.'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4841128352922923120</id><published>2011-07-19T13:23:00.000+01:00</published><updated>2011-07-19T13:59:48.687+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='simulation'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>Minimal E-Puck Simulation</title><content type='html'>I took this weekend to relax at my parents.&amp;nbsp; Whilst there, I decided to re-write my minimal simulation of the &lt;a href="http://www.e-puck.org/"&gt;e-pucks&lt;/a&gt; (written in C) into a program called &lt;a href="http://www.processing.org/download/"&gt;Processing&lt;/a&gt;.&amp;nbsp; Processing is written on the Java runtime, so it should run on any platform.&amp;nbsp; I wanted to do this to remove all the bloat that has occurred over my PhD. &lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/--MOJ31BWghU/TiVily459qI/AAAAAAAAAGU/69xfWeWIqeA/s1600/zoomed.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="350" src="http://4.bp.blogspot.com/--MOJ31BWghU/TiVily459qI/AAAAAAAAAGU/69xfWeWIqeA/s400/zoomed.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Zoomed in view of the simulation, showing IR proximity sensor activation.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;This might be useful for someone out there - any one interested in two wheeled robots with basic sensing capabilities. &amp;nbsp; Also, seeing a simulation graphically is a lot easier than trying to interpret lists of numbers.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The simulator represents e-pucks, and uses the two-wheel kinematics from &lt;a href="http://www.amazon.co.uk/Introduction-Autonomous-Mobile-Intelligent-Robotics/dp/0262015358/ref=sr_1_1?ie=UTF8&amp;amp;qid=1311072222&amp;amp;sr=8-1"&gt;Autonomous Mobile Robots&lt;/a&gt;.&amp;nbsp; The sensor orientation is correct for e-pucks.&amp;nbsp; I give the sensors a range of 50mm and use a noisy look-up table (taken from the real robots) for the proximity readings. But that is all - any other functionality and you'll have to figure out a way to implement it yourself.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3Mh818402gI/TiVilnyXSnI/AAAAAAAAAGQ/ndxpCWLwJwc/s1600/200_epucks.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="386" src="http://1.bp.blogspot.com/-3Mh818402gI/TiVilnyXSnI/AAAAAAAAAGQ/ndxpCWLwJwc/s400/200_epucks.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;200 e-pucks, moving and sensing.&amp;nbsp; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Running on my laptop, I have no problem simulating 200 robots simultaneously at 30 frames per second.&amp;nbsp; The simulation could do with a clock, but it simulates at roughly real-time speed.&amp;nbsp; The motor stepping is actually in 40ms intervals, but thats another exercise for the enthusiast.&lt;br /&gt;&lt;br /&gt;You should be able to view the simulation as a web applet after the break.&amp;nbsp; &lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="MiniSim_container" align="center"&gt;&lt;br /&gt;&lt;!-- This version plays nicer with older browsers,       but requires JavaScript to be enabled.       http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html      http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/ --&gt;&lt;br /&gt;&lt;script type="text/javascript"  src="http://www.java.com/js/deployJava.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;   /* &lt;![CDATA[ */   var attributes = {             code: 'MiniSim.class',            archive: 'http://sites.google.com/site/creaturelabsprojects/code-scraps/MiniSim.jar',            width: 400,             height: 400,          };          var parameters = {             image: 'loading.gif',            centerimage: 'true',          };          var version = '1.5';          deployJava.runApplet(attributes, parameters, version);          /* ]]&gt; */        &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;noscript&gt; &lt;div&gt;&lt;!--[if !IE]&gt; --&gt;&lt;br /&gt;&lt;object classid="java:MiniSim.class"                type="application/x-java-applet"               archive="MiniSim.jar"               width="400" height="400"               standby="Loading Processing software..." &gt;                   &lt;param name="archive" value="MiniSim.jar" /&gt;&lt;param name="mayscript" value="true" /&gt;&lt;param name="scriptable" value="true" /&gt;&lt;param name="image" value="loading.gif" /&gt;&lt;param name="boxmessage" value="Loading Processing software..." /&gt;&lt;param name="boxbgcolor" value="#FFFFFF" /&gt;&lt;!--&lt;![endif]--&gt;       &lt;!-- For more instructions on deployment,    or to update the CAB file listed here, see:   http://java.sun.com/javase/6/webnotes/family-clsid.html   http://java.sun.com/javase/6/webnotes/install/jre/autodownload.html --&gt;      &lt;object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"      codebase="http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab"      width="400" height="400"      standby="Loading Processing software..."  &gt;                &lt;param name="code" value="MiniSim" /&gt;&lt;param name="archive" value="MiniSim.jar" /&gt;&lt;param name="mayscript" value="true" /&gt;&lt;param name="scriptable" value="true" /&gt;&lt;param name="image" value="loading.gif" /&gt;&lt;param name="boxmessage" value="Loading Processing software..." /&gt;&lt;param name="boxbgcolor" value="#FFFFFF" /&gt;&lt;p&gt;&lt;strong&gt;     This browser does not have a Java Plug-in.      &lt;a href="http://www.java.com/getjava" title="Download Java Plug-in"&gt;       Get the latest Java Plug-in here.     &lt;/a&gt;   &lt;/strong&gt;        &lt;/p&gt;&lt;/object&gt;          &lt;!--[if !IE]&gt; --&gt;    &lt;/object&gt;&lt;br /&gt;&lt;!--&lt;![endif]--&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/noscript&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;You should be able to see the simulator as a web applet.&amp;nbsp; It will take some time to load.&amp;nbsp; Press the 'a' and 'z' key to change zoom level, or use your mouse wheel.&amp;nbsp; Click and drag to move the simulation.&amp;nbsp; Press 'i' to enable/disable the IR beams, and 'g' to enable/disable the grid.&lt;br /&gt;&lt;br /&gt;The source is available here:&lt;br /&gt;&lt;a href="http://sites.google.com/site/creaturelabsprojects/code-scraps/MiniSim.tgz"&gt;MiniSim.tgz&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sites.google.com/site/creaturelabsprojects/code-scraps/MiniSim.zip"&gt;MiniSim.zip&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4841128352922923120?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4841128352922923120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/07/minimal-e-puck-simulation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4841128352922923120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4841128352922923120'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/07/minimal-e-puck-simulation.html' title='Minimal E-Puck Simulation'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--MOJ31BWghU/TiVily459qI/AAAAAAAAAGU/69xfWeWIqeA/s72-c/zoomed.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3174238193144241474</id><published>2011-03-08T14:38:00.000Z</published><updated>2011-03-08T15:15:59.066Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='hypercubes'/><title type='text'>C Programming: Mapping / Addressing Hypercube Topologies</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Recently I have been working furiously to get some experiments done with the robots.  I had to conduct 50 hours of experiments, and combined with retakes I think I clocked something like 80 hours in the lab.  Lots of overnight sessions.  After that, I had to write my results up, which felt like the end of a marathon.  I'm still have corrections to make, but the bulk of it is over.  Phew!&lt;br /&gt;&lt;br /&gt;Today I want to post some more source code.  I am exploring how lots of nodes (computers, robots, anything that communicates) is effected by the way they are arranged.  I have had some trouble visualising how a hypercube is connected.  These two youtube videos explain it for 4 dimensions, (or 16 nodes).  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=ccws454YiVM&amp;amp;feature=fvwrel"&gt;Part 1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=2pRZCoWY6TU&amp;amp;feature=rec-LGOUT-exp_fresh+div-1r-1-HM"&gt;Part 2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, you can have hypercubes to as many dimensions you like, as long as you keep the number of nodes as a power of 2 (2, 4, 8, 16, 32).  I have found it impossible to visualise what that would look like.  Wikipedia has an &lt;a href="http://en.wikipedia.org/wiki/Hypercube"&gt;article&lt;/a&gt;, but it wasn't helping me to think of an efficient way to program an algorithm to efficiently map communication between the nodes.  Typically, I would want an elegant For Loop to whistle through each connection.  &lt;br /&gt;&lt;br /&gt;From those youtube videos, I realised that each node, with a binary address, maps to another node if only 1 bit changes.  So 0101 would map to 0001, 0100, 0111, and 1101.  I still couldn't figure out a sweet algorithm to loop through these bitwise values.  Instead, I opted for a brute force search that you run once and creates a look up table to use from there on.  &lt;br /&gt;&lt;br /&gt;Here is the source code after the break and a brief example of how it is called.&amp;nbsp;&amp;nbsp; You should be able to map any dimension of hypercube as long as it as the number of nodes is a power of 2 and your computer has enough memory :) Again, I can't guarantee its correct operation, but I hope it helps someone.  After making the initial call, hypercube_struct_t.map will contain a 2D table.  This maps the source node to a destination by decimal index.  &amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;Compile with -lm for the math.h library.&lt;br /&gt;&lt;br /&gt;I think this needs a bit more of an explanation.  &lt;br /&gt;1) Construct a list of bitmasks that are single bit values.  If we need 4 bits to address 16 nodes, we need 4 masks which will be 0001, 0010, 0100, and 1000. &lt;br /&gt;2) Take a source node address, such as 1100.&lt;br /&gt;2) Exclusive Or this with a potential target address, capture the result.&lt;br /&gt;3) Logical And the result with each mask value.  If any is true, only 1 bit must of changed, and we have a good mapping.&lt;br /&gt;4) We need to repeat this operation between the source node address and all other addresses. &lt;br /&gt;&lt;br /&gt;Importantly, we loop through a number of masks to however many dimensions there are, but we are only achieving the number of mappings up to the connection degree.&amp;nbsp; The number of nodes grows exponentially, whilst the connection degree grows linearly.&amp;nbsp; I think iterating through the look up table is an efficient method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;typedef struct hypercube_details {&lt;br /&gt;    int max_islands;        // Will contain  how many islands (power of 2)&lt;br /&gt;    unsigned int max_degree;    // Will contain the maximum degree of connectivity&lt;br /&gt;    unsigned int max_dimensions;    // Will contain max number of bits for address space&lt;br /&gt;    unsigned int ** map;        // mapping, 2d array : map[ an island ][ to max_degree ] &lt;br /&gt;} hypercube_struct_t;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int makeHypercube( hypercube_struct_t * hc_ptr, int islands );&lt;br /&gt;void freeHypercube( hypercube_struct_t * hc_ptr );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main(void) {&lt;br /&gt;&lt;br /&gt;    int source, connection;&lt;br /&gt;&lt;br /&gt;    // Create the hypercube variable    &lt;br /&gt;    hypercube_struct_t hypercube;&lt;br /&gt;&lt;br /&gt;    // Call the make function.&lt;br /&gt;    if( makeHypercube( &amp;amp;hypercube, 64) == 0 ) {&lt;br /&gt;        printf("Something went wrong :(\n");&lt;br /&gt;    } else {&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        // example usage:&lt;br /&gt;&lt;br /&gt;        // For each node/island.&lt;br /&gt;        for( source = 0; source &amp;lt; hypercube.max_islands; source++ ) {&lt;br /&gt;            printf("Island %d connects to islands: ",source);           &lt;br /&gt;            for( connection = 0; connection &amp;lt; hypercube.max_degree; connection++ ) {&lt;br /&gt;                printf("%d,", hypercube.map[source][connection]);                &lt;br /&gt;            }&lt;br /&gt;            printf("\n");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        // and eventually free up the memory&lt;br /&gt;        freeHypercube( &amp;amp;hypercube );&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int makeHypercube( hypercube_struct_t * hc_ptr, int islands ) {&lt;br /&gt;&lt;br /&gt;    unsigned int target,source,dimension, degree;&lt;br /&gt;    double d_temp;&lt;br /&gt;    &lt;br /&gt;    unsigned int * mask;&lt;br /&gt;    &lt;br /&gt;    hc_ptr-&amp;gt;max_islands = islands;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    printf("%d Islands\n", hc_ptr-&amp;gt;max_islands);&lt;br /&gt;&lt;br /&gt;    // The degree is how many other nodes one node connects too&lt;br /&gt;    hc_ptr-&amp;gt;max_degree = log2(hc_ptr-&amp;gt;max_islands);&lt;br /&gt;    printf("Max degree should be %d\n", hc_ptr-&amp;gt;max_degree);&lt;br /&gt;    &lt;br /&gt;    // Work out what power of base 2 this number is.&lt;br /&gt;    d_temp = log2(hc_ptr-&amp;gt;max_islands)/log2(2);&lt;br /&gt;    hc_ptr-&amp;gt;max_dimensions = (unsigned int)d_temp;&lt;br /&gt;    if( d_temp - (double)hc_ptr-&amp;gt;max_dimensions &amp;gt; 0.001 ) {&lt;br /&gt;        printf("Error: Number of islands is not a power of 2, abort\n");&lt;br /&gt;        return 0;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    printf("Max Dimensions %d\n", hc_ptr-&amp;gt;max_dimensions);&lt;br /&gt;&lt;br /&gt;    // We create a number of bit masks equal to the maximum bits&lt;br /&gt;    // required to map the addresses in binary.&lt;br /&gt;    mask = malloc( hc_ptr-&amp;gt;max_dimensions * sizeof( unsigned int ));&lt;br /&gt;    &lt;br /&gt;    mask[0] = 1;&lt;br /&gt;    for( dimension = 1; dimension &amp;lt; hc_ptr-&amp;gt;max_dimensions; dimension++ ) {&lt;br /&gt;        mask[dimension] = (int)pow(2,dimension);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // We create a look up table map for each island, with the&lt;br /&gt;    // max number of degree entries.&lt;br /&gt;    hc_ptr-&amp;gt;map = malloc( hc_ptr-&amp;gt;max_islands * sizeof( unsigned int *));&lt;br /&gt;    for( source = 0; source &amp;lt; islands; source++ ) {&lt;br /&gt;        hc_ptr-&amp;gt;map[source] = malloc( hc_ptr-&amp;gt;max_degree * sizeof( unsigned int ));&lt;br /&gt;    }        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    // We iterate through all the combinations and check for just a one &lt;br /&gt;    // bit change between addresses, saving to our map table.&lt;br /&gt;    // We check that we dont create more address mappings than we malloc'd&lt;br /&gt;    // by tracking the degree variable.  This shouldn't happen, but just to&lt;br /&gt;    // be safe :)&lt;br /&gt;    for( source = 0; source &amp;lt; hc_ptr-&amp;gt;max_islands; source++ ) {&lt;br /&gt;            &lt;br /&gt;        degree = 0;&lt;br /&gt;        &lt;br /&gt;        for( target = 0; target &amp;lt; hc_ptr-&amp;gt;max_islands; target++ ) {&lt;br /&gt;&lt;br /&gt;            for( dimension = 0; dimension &amp;lt; hc_ptr-&amp;gt;max_dimensions; dimension++ ) {&lt;br /&gt;&lt;br /&gt;                if( (source ^ target) == mask[dimension] ) {&lt;br /&gt;                    &lt;br /&gt;                    if( degree &amp;gt; hc_ptr-&amp;gt;max_degree ) {&lt;br /&gt;                    &lt;br /&gt;                        freeHypercube( hc_ptr );        &lt;br /&gt;                        printf("\n Error, found an address match beyond the max degrees, abort\n");&lt;br /&gt;                        return NULL;&lt;br /&gt;                    &lt;br /&gt;                    } else {&lt;br /&gt;&lt;br /&gt;                        hc_ptr-&amp;gt;map[source][degree] = target;&lt;br /&gt;                        degree++;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&amp;nbsp;    }&lt;br /&gt;        &lt;br /&gt;    free( mask );&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void freeHypercube( hypercube_struct_t * hc_ptr ) {&lt;br /&gt;    int i;&lt;br /&gt;&lt;br /&gt;    for( i = 0; i &amp;lt; hc_ptr-&amp;gt;max_islands; i++ ) {&lt;br /&gt;        free( hc_ptr-&amp;gt;map[i] );&lt;br /&gt;        hc_ptr-&amp;gt;map[i] = NULL;&lt;br /&gt;    }    &lt;br /&gt;    free( hc_ptr-&amp;gt;map );&lt;br /&gt;    hc_ptr-&amp;gt;map = NULL;&lt;br /&gt;&lt;br /&gt;    return;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3174238193144241474?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3174238193144241474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/03/mapping-hypercube-topologies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3174238193144241474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3174238193144241474'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/03/mapping-hypercube-topologies.html' title='C Programming: Mapping / Addressing Hypercube Topologies'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4456865184832210317</id><published>2011-01-21T15:21:00.000Z</published><updated>2011-01-21T15:23:12.032Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='guitar'/><category scheme='http://www.blogger.com/atom/ns#' term='box guitar'/><title type='text'>Box Guitar Part 2</title><content type='html'>&lt;a href="http://www.flickr.com/photos/46276914@N05/5375532548/" title="IMG_8010 by cptnkabuki, on Flickr"&gt;&lt;img src="http://farm6.static.flickr.com/5001/5375532548_3df2442a77.jpg" width="333" height="500" alt="IMG_8010" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;It is done!&amp;nbsp; For now.&amp;nbsp; I am tempted to build a small amplifier and speaker inside the body of the guitar, but I was not particularly impressed with the amplified sound (I tried it on my friends external amp), and I have heard internal amps can be troublesome with regard to feedback.&amp;nbsp; If I do make a change, I might place a proper pickup onto the sound board of the guitar, rather than piezo transducers. &amp;nbsp; &lt;br /&gt;I was pleasantly surprised by how well the guitar actually sounds, although it is a little quiet.&amp;nbsp; At least I won't disturb anybody with my playing.&amp;nbsp; I was hesitant about attempting fret pins, but actually, I am picking up the intuition of correctly fretting the strings without the fretboard.&amp;nbsp; By pure chance, I cut the dowel for the neck and bridge such that the action on the strings is very level, and at a suitable height for bottleneck playing.&lt;br /&gt;&lt;br /&gt;The neck hasn't snapped yet :)&amp;nbsp; A bit worried as it is pine I think, but I was looking at trees swaying in the wind and decided I will have faith in this bit of wood.&lt;br /&gt;&lt;br /&gt;This cost me less than £10 total!&amp;nbsp;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="300" width="400"&gt; &lt;param name="flashvars" value="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625748659363%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625748659363%2F&amp;amp;set_id=72157625748659363&amp;amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625748659363%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625748659363%2F&amp;amp;set_id=72157625748659363&amp;amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;I should give a nod to cigarboxnation as I have spent a fair amount of time on their forums.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4456865184832210317?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4456865184832210317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/01/box-guitar-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4456865184832210317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4456865184832210317'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/01/box-guitar-part-2.html' title='Box Guitar Part 2'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm6.static.flickr.com/5001/5375532548_3df2442a77_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8362679783768988021</id><published>2011-01-18T15:04:00.000Z</published><updated>2011-01-18T15:04:19.285Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='crafting'/><category scheme='http://www.blogger.com/atom/ns#' term='guitar'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Box Guitar Part 1</title><content type='html'>&lt;object height="300" width="400"&gt; &lt;param name="flashvars" value="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625852796584%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625852796584%2F&amp;amp;set_id=72157625852796584&amp;amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625852796584%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157625852796584%2F&amp;amp;set_id=72157625852796584&amp;amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8362679783768988021?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8362679783768988021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/01/box-guitar-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8362679783768988021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8362679783768988021'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/01/box-guitar-part-1.html' title='Box Guitar Part 1'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-5591859244596194474</id><published>2011-01-04T17:37:00.000Z</published><updated>2011-01-04T17:41:31.634Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='Parse csv with C'/><title type='text'>C for csv files</title><content type='html'>I want to post some C code I have written to take a large number of .csv files and read them into memory.  The code is a single function call that will assertain how many files you have, and the dimensions of your .csv file.  &lt;br /&gt;&lt;br /&gt;It assumes your .csv files are all identical in format (number of rows and columns).  It assumes you are using a comma as the separator.  There is no support for text fields, but it wouldn't be too hard to implement.&lt;br /&gt;&lt;br /&gt;The code therefore automates the laborious process of importing seperate .csv files, or writing routines to open each and parse them individually.  The files are stored in a 3D array, which you can simply loop through to create averages, run other stats on, or simply merge some how and write out to another .csv for something like MatLab.  &lt;br /&gt;&lt;br /&gt;When writing your program, #include "collate_csvs.h".  You need to declare a typedef'd struct I have made the same way you would any other variable.  You pass the address of this to the function call, providing your base file name string.  Therefore, in the following brief example your .csv files would be out0.csv, out1.csv, out2.csv... etc.&amp;nbsp; When you call collateCSVs, it fills in all the member variables of the csv_struct_t for you to use.&amp;nbsp; If the call returns 0, something went wrong and the function aborted.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt; main(&lt;span style="color: blue;"&gt;void&lt;/span&gt;) {&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// Variable declaration&lt;/span&gt;&lt;br /&gt;    csv_struct_t my_csv_files;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; file, row, col;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// Function call, imports your files.&lt;/span&gt;&lt;br /&gt;    collateCSVs( &amp;amp;my_csv_files, &lt;span style="color: maroon;"&gt;"out"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// Do some loops...&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;for&lt;/span&gt;( file = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; file &amp;lt; my_csv_files.num_files; file++ ) {&lt;br /&gt;        &lt;span style="color: blue;"&gt;for&lt;/span&gt;( col = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; col &amp;lt; my_csv_files.max_cols; col++ ) {&lt;br /&gt;            &lt;span style="color: blue;"&gt;for&lt;/span&gt;( row = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; row &amp;lt; my_csv_files.max_rows; row++ ) {&lt;br /&gt;                printf(&lt;span style="color: maroon;"&gt;"%f\n"&lt;/span&gt;, my_csv_files.csv_data[file][col][row]);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Compile the files with -c, and link to your program like:&lt;br /&gt;&lt;blockquote&gt;gcc -c collate_csvs.c -o collate_csvs.o&lt;br /&gt;gcc -c your_source.c -o your_source.o&lt;br /&gt;gcc collate_csvs.o your_source.o -o COLLATE_CSVS&lt;/blockquote&gt;&lt;br /&gt;Lastly, I'm sorry if you find any bugs, or if it is not commented enough for you.&lt;br /&gt;It is missing a routine to free up the 3D array from memory, I only use this code as a one-shot and it dies automatically. &amp;nbsp; &lt;br /&gt;It is a starting point at least :)&lt;br /&gt;The source code is hidden behind this jump (a bit bulky):&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;collate_csvs.h:&lt;br /&gt;&lt;hr /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;typedef&lt;/span&gt; &lt;span style="color: blue;"&gt;struct&lt;/span&gt; csv_details {&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; num_files;        &lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; max_rows;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; max_cols;&lt;br /&gt;    &lt;span style="color: blue;"&gt;double&lt;/span&gt; *** csv_data;    &lt;span style="color: green;"&gt;// Access as 3d array csv_data[FILE][COL][ROW]&lt;/span&gt;&lt;br /&gt;} csv_struct_t;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: green;"&gt;// Function call, provide base file name and pointer to struct.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt; collateCSVs( csv_struct_t * csv_struct_ptr, &lt;span style="color: blue;"&gt;char&lt;/span&gt; * base_file );&lt;/pre&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;collate_csvs.c:&lt;br /&gt;&lt;hr /&gt;&lt;pre&gt;#&lt;span style="color: blue;"&gt;include&lt;/span&gt; &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#&lt;span style="color: blue;"&gt;include&lt;/span&gt; &amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;.h&amp;gt;&lt;br /&gt;#&lt;span style="color: blue;"&gt;include&lt;/span&gt; &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#&lt;span style="color: blue;"&gt;include&lt;/span&gt; &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#&lt;span style="color: blue;"&gt;include&lt;/span&gt; &lt;span style="color: maroon;"&gt;"collate_csvs.h"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;#define&lt;/span&gt; NEWLINE &lt;span style="color: maroon;"&gt;10&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;#define&lt;/span&gt; COMMA    &lt;span style="color: maroon;"&gt;44&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;double&lt;/span&gt; *** make3dArray( &lt;span style="color: blue;"&gt;int&lt;/span&gt; x, &lt;span style="color: blue;"&gt;int&lt;/span&gt; y, &lt;span style="color: blue;"&gt;int&lt;/span&gt; z ) {&lt;br /&gt;    &lt;span style="color: blue;"&gt;double&lt;/span&gt; *** array_ptr;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; i,j;&lt;br /&gt;&lt;br /&gt;    array_ptr = malloc( &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;( &lt;span style="color: blue;"&gt;double&lt;/span&gt; **) * x );&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: green;"&gt;// Check for not enough memory&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt;( array_ptr == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;NULL&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;for&lt;/span&gt;( i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; i &amp;lt; x; i++ ) {&lt;br /&gt;        &lt;br /&gt;        array_ptr[i] = malloc( &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;( &lt;span style="color: blue;"&gt;double&lt;/span&gt; * ) * y );&lt;br /&gt;    &lt;br /&gt;        &lt;span style="color: green;"&gt;// Check for not enough memory&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt;( array_ptr == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;NULL&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;for&lt;/span&gt;( j = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; j &amp;lt; y; j++ ) {&lt;br /&gt;        &lt;br /&gt;            array_ptr[i][j] = malloc( &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;( &lt;span style="color: blue;"&gt;double&lt;/span&gt; ) * z );&lt;br /&gt;            &lt;br /&gt;            &lt;span style="color: green;"&gt;// Check for not enough memory&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt;( array_ptr == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;NULL&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;    }    &lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;return&lt;/span&gt; array_ptr;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;int&lt;/span&gt; collateCSVs( csv_struct_t * csv_struct_ptr, &lt;span style="color: blue;"&gt;char&lt;/span&gt; * base_file) {&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; file;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; col;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; row;&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; i,j;&lt;br /&gt;    &lt;span style="color: blue;"&gt;char&lt;/span&gt; buf[&lt;span style="color: maroon;"&gt;40&lt;/span&gt;];&lt;br /&gt;    &lt;span style="color: blue;"&gt;int&lt;/span&gt; c;&lt;br /&gt;    FILE * fp;&lt;br /&gt;&lt;br /&gt;    printf(&lt;span style="color: maroon;"&gt;"\n Collating .csv files with base filename '%s'\n"&lt;/span&gt;, base_file);&lt;br /&gt;    printf(&lt;span style="color: maroon;"&gt;"\n Attempting to find out how many files you have...\n"&lt;/span&gt;);&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: green;"&gt;// We try to open file zero.&lt;/span&gt;&lt;br /&gt;    file = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    sprintf(buf, &lt;span style="color: maroon;"&gt;"%s%d.csv"&lt;/span&gt;, base_file, file);&lt;br /&gt;    fp = fopen( buf, &lt;span style="color: maroon;"&gt;"r"&lt;/span&gt;);&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt;( fp == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) {&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" - Could not open file 0! Assuming no files. Abort\n"&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// We keep opening files until we run out&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;do&lt;/span&gt; {&lt;br /&gt;        file++;&lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: green;"&gt;// If we opened the last file ok, close it.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt;( fp != &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) {&lt;br /&gt;            fclose( fp );&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: green;"&gt;// try to open the next file.&lt;/span&gt;&lt;br /&gt;        sprintf(buf, &lt;span style="color: maroon;"&gt;"%s%d.csv"&lt;/span&gt;, base_file, file);&lt;br /&gt;        fp = fopen( buf, &lt;span style="color: maroon;"&gt;"r"&lt;/span&gt; );    &lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    } &lt;span style="color: blue;"&gt;while&lt;/span&gt; ( fp != &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; );    &lt;br /&gt;&lt;br /&gt;    printf(&lt;span style="color: maroon;"&gt;" - I found %d files (set limit to %d)\n"&lt;/span&gt;, file -&lt;span style="color: maroon;"&gt;1&lt;/span&gt;, file);&lt;br /&gt;&lt;br /&gt;    csv_struct_ptr-&amp;gt;num_files = file;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt;( csv_struct_ptr-&amp;gt;num_files &amp;lt; &lt;span style="color: maroon;"&gt;1&lt;/span&gt; ) {&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" - Too few files, abort\n"&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// We open the first file and use it to judge how many rows and &lt;/span&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// columns we will need.&lt;/span&gt;&lt;br /&gt;    sprintf(buf, &lt;span style="color: maroon;"&gt;"%s0.csv"&lt;/span&gt;, base_file); &lt;br /&gt;    fp = fopen( buf, &lt;span style="color: maroon;"&gt;"r"&lt;/span&gt; );&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt;( fp == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) {&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" I can't open the first file \"%s\", abort\n"&lt;/span&gt;, buf);&lt;br /&gt;        &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    }    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    printf(&lt;span style="color: maroon;"&gt;"\n Attempting to find out row and column dimensions...\n"&lt;/span&gt;);&lt;br /&gt;    row = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    col = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    j = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue;"&gt;while&lt;/span&gt;( ( c = fgetc( fp )) != EOF ) {&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt;( c != COMMA &amp;amp;&amp;amp; c != NEWLINE ) {&lt;br /&gt;            j++;&lt;br /&gt;        } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt;( c == COMMA ) {&lt;br /&gt;            i++;&lt;br /&gt;            j = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;        } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; ( c == NEWLINE ) {&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt;( j != &lt;span style="color: maroon;"&gt;0&lt;/span&gt; ) i++;&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt;( i &amp;gt; col ) col = i;&lt;br /&gt;            &lt;br /&gt;            i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;            row++;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    fclose( fp );&lt;br /&gt;    &lt;br /&gt;    printf(&lt;span style="color: maroon;"&gt;" - Sampled file 0, I found a max of %d columns, %d rows\n"&lt;/span&gt;, col, row);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// Create an array large enough to hold all of our data    &lt;/span&gt;&lt;br /&gt;    csv_struct_ptr-&amp;gt;max_cols = col;&lt;br /&gt;    csv_struct_ptr-&amp;gt;max_rows = row;&lt;br /&gt;    csv_struct_ptr-&amp;gt;csv_data = make3dArray( csv_struct_ptr-&amp;gt;num_files, col, row );&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;if&lt;/span&gt;( csv_struct_ptr-&amp;gt;csv_data == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) {&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" Not enough memory :(\n"&lt;/span&gt;);&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" abort\n"&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;        &lt;br /&gt;    &lt;span style="color: green;"&gt;// Finally, read in the data from each file and store&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;// in our array.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;for&lt;/span&gt;( file = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;; file &amp;lt; csv_struct_ptr-&amp;gt;num_files; file++ ) {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// Open the file to read, use sprintf to format&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// the filename string.&lt;/span&gt;&lt;br /&gt;        sprintf(buf, &lt;span style="color: maroon;"&gt;"%s%d.csv"&lt;/span&gt;, base_file, file );&lt;br /&gt;        &lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" Opening \"%s\" to read data: "&lt;/span&gt;, buf);&lt;br /&gt;&lt;br /&gt;        fp = fopen( buf, &lt;span style="color: maroon;"&gt;"r"&lt;/span&gt; );&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt;( fp == &lt;span style="color: blue;"&gt;NULL&lt;/span&gt; ) {&lt;br /&gt;            printf(&lt;span style="color: maroon;"&gt;" Error, could not open %s, abort\n"&lt;/span&gt;, buf);&lt;br /&gt;            &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;        }    &lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: green;"&gt;// Reset variables that index the arrays&lt;/span&gt;&lt;br /&gt;        i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;        col = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;        row = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;        c = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;    &lt;br /&gt;        memset( buf, &lt;span style="color: maroon;"&gt;'\0'&lt;/span&gt;, &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;(buf));&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// Read in the file data.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;while&lt;/span&gt;( ( c = fgetc( fp ) ) != EOF )  {&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt;( c != COMMA &amp;amp;&amp;amp; c != NEWLINE ) {&lt;br /&gt;                    &lt;br /&gt;                &lt;span style="color: green;"&gt;// We have a character&lt;/span&gt;&lt;br /&gt;                buf[i] = c;&lt;br /&gt;                i++;&lt;br /&gt;&lt;br /&gt;            } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; ( c == COMMA ) {&lt;br /&gt;                &lt;span style="color: green;"&gt;// We save the data, jump a column&lt;/span&gt;&lt;br /&gt;                csv_struct_ptr-&amp;gt;csv_data[file][col][row] = atof( buf );&lt;br /&gt;                &lt;br /&gt;                &lt;span style="color: green;"&gt;// Clear the buffer&lt;/span&gt;&lt;br /&gt;                memset( buf, &lt;span style="color: maroon;"&gt;'\0'&lt;/span&gt;, &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;( buf ));&lt;br /&gt;&lt;br /&gt;                col++;&lt;br /&gt;                i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            } &lt;span style="color: blue;"&gt;else&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt; ( c == NEWLINE ) {&lt;br /&gt;                &lt;span style="color: blue;"&gt;if&lt;/span&gt;( i != &lt;span style="color: maroon;"&gt;0&lt;/span&gt; ) {&lt;br /&gt;                    &lt;span style="color: green;"&gt;// We save the data, jump a column&lt;/span&gt;&lt;br /&gt;                    csv_struct_ptr-&amp;gt;csv_data[file][col][row] = atof( buf );&lt;br /&gt;                    memset( buf, &lt;span style="color: maroon;"&gt;'\0'&lt;/span&gt;, &lt;span style="color: blue;"&gt;sizeof&lt;/span&gt;( buf ));&lt;br /&gt;                }&lt;br /&gt;                &lt;span style="color: green;"&gt;// We want to drop a line.&lt;/span&gt;&lt;br /&gt;                col = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;                i = &lt;span style="color: maroon;"&gt;0&lt;/span&gt;;&lt;br /&gt;                row++;    &lt;br /&gt;&lt;br /&gt;            }    &lt;br /&gt;        }    &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// Close that file, ready for the next&lt;/span&gt;&lt;br /&gt;        fclose( fp );&lt;br /&gt;        printf(&lt;span style="color: maroon;"&gt;" - Done\n"&lt;/span&gt;);&lt;br /&gt;    }    &lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: maroon;"&gt;1&lt;/span&gt;;&lt;br /&gt;    &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-5591859244596194474?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/5591859244596194474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2011/01/c-for-csv-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5591859244596194474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5591859244596194474'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2011/01/c-for-csv-files.html' title='C for csv files'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4104897994387679203</id><published>2010-12-08T12:22:00.000Z</published><updated>2010-12-08T12:41:48.678Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='poetry'/><title type='text'>Poetry</title><content type='html'>&lt;div align="center"&gt;&lt;a href="http://www.amazon.co.uk/Narrow-North-Travel-Sketches-Classics/dp/0140441859/ref=sr_1_1?ie=UTF8&amp;qid=1291810185&amp;sr=8-1"&gt;&lt;img src="http://ecx.images-amazon.com/images/I/41H5DWM1FJL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU02_.jpg"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This morning I picked up my copy of &lt;i&gt;The Narrow Road to the Deep North and Other Travel Sketches&lt;/i&gt; by Matsuo Basho.  I missed two buses (long story) but it allowed me plenty of time to re-read.  I am deeply moved by the exploits, sentiment and words of the poet; particularly some of his philosophy offered in the books introduction.  I want to quote some here, and my own thoughts on the stuff.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;The leaves of the Basho [banana] tree are large enough to cover a harp.  When they are broken they remind me of the injured tail of a phoenix, and when they are torn, they remind me of a fan ripped in the wind.  The tree does bear flowers, but unlike other flowers, there is nothing gay about them.  The big trunk of the tree is untouched by the axe, for it is utterly useless as building wood. I love the tree, however, for its very uselessness... I sit underneath it, and enjoy the wind and rain that blow against it.&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;I really like the mindset of Basho, in that he seems to find interest and pleasure in the simplest of things, especially aspects and observations that are totally opposed to the drive and comforts of today's current consumerist society.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;What is important is to keep our mind high in the world of true understanding, and return to the world of daily experience to seek therein the beauty.  No matter what we may be doing at a given moment, we must not forget that it has a bearing upon our everlasting poetry.&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;He talks about the importance of abstracting your mind from daily troubles.  Whilst he finishes with the term &lt;i&gt;poetry&lt;/i&gt;, I feel that he is talking about our &lt;i&gt;soul&lt;/i&gt; or &lt;i&gt;spirit&lt;/i&gt; (&lt;i&gt;not&lt;/i&gt; in a religious sense), our &lt;i&gt;essence of being&lt;/i&gt; that we each carry and live with/as.  I also like the passage because it does not advise to try to totally remove ones concerns from daily activity, but to try and enjoy them from a combined higher perspective.  In that way, every thing can be fascinating.  It reminds me of the quote, "&lt;i&gt;There is no way to happiness, happiness is the way&lt;/i&gt;", and hints at the effect of the daily mindset on the long term good of ones spirit.  "&lt;i&gt;All stress comes from within&lt;/i&gt;".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I particularly like a section where he describes the role of self when writing poetry, but again I feel like it talks about the soul:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;Go to the pine if you want to learn about the pine, or to the bamboo if you want to learn about the bamboo.  And in doing so, you must leave your subjective preoccupation with yourself.  Otherwise you impose yourself on the object and do not learn.  &lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;I think this is interesting, because I often think of how my 'self' influences my perception of art, and I take it as an exercise to attempt to view art from as many other imaginary persons view points as possible, to perhaps catch a glance of the original artists own mindset.  Projecting oneself (or a fictitious character) is a common discussion in human-robot interaction.  The natural world however, is not a work of art, or a product of humans; it has existed far longer than humans and will likely out last us.  I feel like if we are to find our place in the world, then we must view it for what it actually is, and then only afterwards reflect on what our role and identity is.  The interjection of our experiences and existence would only undermine the foundation of understanding.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;Your poetry issues of its own accord when you and the object have become one - when you have plunged deep enough into the object to see something like a hidden glimmering there.  However well phrased your poetry may be, if your feeling is not natural - if the object and yourself are seperate - then your poetry is not true poetry but merely your subjective counterfeit.&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;In the above, I feel like he is saying that with a greater, unobstructed, understanding of the world, your soul will be truer, more apparent in oneself, and lead to a happier more meaningful life.  I think literally, he speaks of it being easier to write poetry when you are better integrated with your world - but surely poetry is the product of the soul (not simply brute force intellect)?  The parts '&lt;i&gt;However well phrased...&lt;/i&gt;' and '&lt;i&gt;...your subjective counterfeit&lt;/i&gt;' make me think that if you try to exist with presumptions and arrogance of self, no matter how well you pull it off, it will eventually undermine your well being.  &lt;br /&gt;&lt;br /&gt;I can think of many contentious issues - to be vegetarian, the desire for ownership and material possessions, the necessity of warfare - that seem to stem from self-importance and a dislocation from reality.  But I feel like even at a lower individual level; awareness of human beings as fallible creatures, existing for an infinitesimally small period of time, in a world without morals and reason, a world full of uncertainties and unknowns; and an appreciation for the startling beauty of the natural world; can lend to a happier state of mind.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;As I climbed one of the foothills called Takadate, where Lord Yoshitsune met his death, I saw the River Kitakami running through the plains of Nambu in its full force, and its tributary, Koromogawa, winding along the site of the Izumi-ga-shiro castle and pouring into the big river directly below my eyes. ... many a feat of chivalrous valour was repeated here during the short span of the three generations, but both the actors and deeds have long been dead and passed into oblivion.  When a country is defeated, there remain only mountains and rivers, and on a ruined castle in spring only grasses thrive.  I sat down on my hat and wept bitterly till I almost forgot time.&lt;br /&gt;&lt;blockquote&gt;A thicket of summer grass&lt;br /&gt;Is all that remains&lt;br /&gt;Of the dreams and ambitions&lt;br /&gt;Of ancient warriors.&lt;/blockquote&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4104897994387679203?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4104897994387679203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/12/poetry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4104897994387679203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4104897994387679203'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/12/poetry.html' title='Poetry'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3605576196979560356</id><published>2010-11-28T16:37:00.000Z</published><updated>2010-11-28T16:37:06.625Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='#pragma'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>#pragma pack(1)</title><content type='html'>Recently I have been moving towards conducting some experiments on the robots.  This is the real thing this time, and I intend to have everything run smoothly and as well organised as possible.  I am expecting the results of my coming experiments to become a significant part of my final thesis, so I need to do all I can to have a comprehensive set of data.  I have been debuggging from the microcontroller upwards, and moving all my code to a proper repository in the lab.  &lt;br /&gt;&lt;br /&gt;Today I found a nasty bug at the linux board level.  I had been transmitting data between the robots (epucks) and my PC over Wifi (using sockets) and found that if I did not organise my data structure in a specific way the operation would fail.  The data would get across, but be jumbled or offset in a strange way.  For a one off experiment, I could turn a blind eye and simply to get it work with some hacking.  But not now.  I need it to work reliably and so that I can expand its functionality quickly.&lt;br /&gt;&lt;br /&gt;It turns out to have been a memory packing problem that occurs at compile time.  The first clue was a sizeof() on the data structure, which came up as 48 bytes on my pc and 56 bytes on the epuck.  If I did a sizeof() to each of the structure members, and manually added up the result, it was the same (48) for both machines.  If I set the size of the structure manually when performing the transmit call, it failed.  So I had to find out why the epuck was reading the structure as 56 bytes.  &lt;br /&gt;&lt;br /&gt;The solution was a #pragma pack(1) at the top of my include file for the data structure.  This line tells the compiler to pack the data in memory in a specific way.  It seems that the word size of a processor prefers to have data in a certain format (for optimal processing?), and this is different for the epuck and my PC.  So even though the members of the structure added to 48, the epuck was packing it out in memory to 56.  #pragma stops this from happening.  &lt;br /&gt;&lt;br /&gt;I am sure there is more to it than this, because thousands of differing machines communicate over the web every day.  However, the epuck is a bit of a special case, it is not using a processor you would find in a laptop or desktop machine.  So I can forgive it, and add that niche feather to my hat.  The epucks can now communicate bug-free over WiFi!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3605576196979560356?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3605576196979560356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/11/pragma-pack1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3605576196979560356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3605576196979560356'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/11/pragma-pack1.html' title='#pragma pack(1)'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7667022976099133497</id><published>2010-11-10T12:25:00.000Z</published><updated>2010-11-11T18:06:40.171Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='tcp'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Interface C to Processing over TCP</title><content type='html'>I use &lt;a href="http://processing.org/"&gt;Processing&lt;/a&gt; to do a lot of visualisation and general hacks (we used it in Milk Pixel), but I do the majority of my work in system level C.&amp;nbsp; I was looking for a quick way to send data to Processing from the command line and took the Network/TCP route.&amp;nbsp; This code might also be useful for anyone looking to interface a Processing application with another program over a network, or simply create a C program as a command line interface between Processing and yet another program. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;It is normal for every PC to have the network loopback device 'localhost', or to regard the IP address 127.0.0.1 as itself, regardless of whether you have an external network connection available. So we can use that to transfer data between programs (albeit, with a fair bit of overhead...).&lt;br /&gt;&lt;br /&gt;Processing provides example code to create a TCP server and client, all neatly wrapped up in cosy layers of Java.&amp;nbsp; You'll need to run the example server.&amp;nbsp; It accepts strings of data as input, and the example code uses port 5204.&amp;nbsp; This can be changed, but for simplicities sake, here is some C to talk to that configuration:&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;#include &amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;#include &amp;lt;netinet/in.h&amp;gt;&lt;br /&gt;#include &amp;lt;netdb.h&amp;gt; &lt;br /&gt;#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;br /&gt;&lt;br /&gt;#define PROCESSING_HOST&amp;nbsp;&amp;nbsp;&amp;nbsp; "localhost"&amp;nbsp;&amp;nbsp;&amp;nbsp; // When on the same machine, otherwise IP&lt;br /&gt;#define PROCESSING_PORT 5204&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Match this to your processing code&lt;br /&gt;&lt;br /&gt;int sendProcessingMessage( char * msg ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int sockfd, n;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct sockaddr_in serv_addr;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct hostent *server;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // get socket&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sockfd = socket(AF_INET, SOCK_STREAM, 0);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (sockfd &amp;lt; 0) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(" pro_client.c: Error opening socket\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // find host&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; server = gethostbyname( PROCESSING_HOST );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (server == NULL) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(" pro_client.c: Error contacting host\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // fill in struct&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bzero((char *) &amp;amp;serv_addr, sizeof(serv_addr));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serv_addr.sin_family = AF_INET;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bcopy(&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (char *)server-&amp;gt;h_addr, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (char *)&amp;amp;serv_addr.sin_addr.s_addr,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; server-&amp;gt;h_length); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; serv_addr.sin_port = htons( PROCESSING_PORT );&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // connect&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (connect(sockfd,(struct sockaddr*)&amp;amp;serv_addr,sizeof(serv_addr)) &amp;lt; 0) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(" pro_client.c: Error connecting\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write data&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n = write(sockfd,msg,strlen(msg));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (n &amp;lt; 0) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(" pro_client.c: Error writing to socket\n"); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; close(sockfd);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // return success&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return n;&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It is pretty much any old tutorial on C sockets, but it has the right settings to mesh with the Processing configuration. &lt;br /&gt;&lt;br /&gt;I hope this helps somebody :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7667022976099133497?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7667022976099133497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/11/interface-c-to-processing-over-tcp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7667022976099133497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7667022976099133497'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/11/interface-c-to-processing-over-tcp.html' title='Interface C to Processing over TCP'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4483978615705980709</id><published>2010-10-04T14:55:00.000+01:00</published><updated>2010-10-04T14:55:39.807+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='humour'/><category scheme='http://www.blogger.com/atom/ns#' term='quote'/><title type='text'>Computer Science Humour</title><content type='html'>Looking for a sort algorithm, I came across this on &lt;a href="http://en.wikipedia.org/wiki/Bogosort"&gt;Wikipedia&lt;/a&gt; today and it made me smile:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;h3&gt;&lt;span class="mw-headline" id="Quantum_bogosort"&gt;Quantum bogosort&lt;/span&gt;&lt;/h3&gt;An &lt;a href="http://en.wikipedia.org/wiki/In-joke" title="In-joke"&gt;in-joke&lt;/a&gt; among some computer scientists is that &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Quantum_computing" title="Quantum computing"&gt;quantum computing&lt;/a&gt;  could be used to effectively implement a bogosort with a time  complexity of O(n). It uses true quantum randomness to randomly permute  the list. By the &lt;a href="http://en.wikipedia.org/wiki/Many-worlds_interpretation" title="Many-worlds interpretation"&gt;many-worlds interpretation&lt;/a&gt; of quantum physics, the quantum randomization spawns &lt;span class="texhtml"&gt;2&lt;sup&gt;&lt;i&gt;N&lt;/i&gt;&lt;/sup&gt;&lt;/span&gt;  (where N is the number of random bits) universes and one of these will  be such that this single shuffle had produced the list in sorted order.  The list is then tested for sortedness (requiring &lt;i&gt;n-1&lt;/i&gt;  comparisons); should it be out of order, the computer destroys the  universe - implementation of this step being left as an exercise for the  reader.&lt;sup class="reference" id="cite_ref-jargonfile_1-0"&gt;&lt;a href="http://en.wikipedia.org/wiki/Bogosort#cite_note-jargonfile-1"&gt;&lt;span&gt;[&lt;/span&gt;2&lt;span&gt;]&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;  The only observers will then be in the surviving universes and will see  that the randomization worked the first time and that the list is in  sorted order.&lt;br /&gt;Note, however, that while this algorithm is O(n) in time, permuting  the list requires O(n log n) bits of quantum randomness. (It also  assumes that destroying the universe is O(1) in operation - since it has  to be executed at most once.)&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4483978615705980709?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4483978615705980709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/10/computer-science-humour.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4483978615705980709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4483978615705980709'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/10/computer-science-humour.html' title='Computer Science Humour'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7225604121194616199</id><published>2010-10-02T20:18:00.000+01:00</published><updated>2010-10-02T20:31:23.787+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ethics'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>The Future of Robotics and Me</title><content type='html'>&lt;div style="text-align: justify;"&gt;On Friday 1st October I had lunch with academics from a multitude of disciplines hand-picked to take part in a discussion on the ethical issues surrounding contemporary robotics.&amp;nbsp; Friday was the third and final day, and I think the most satisfying in terms of feeling like we had achieved something.&amp;nbsp; I was priviliged to be there, and most certainly the smallest fish in the pond.&amp;nbsp; However I feel confident that even as PhD student, I contributed significantly to the development of the groups ideas.&amp;nbsp; My networking skills still require much practice, but I think I did well to speak my mind and contribute appropriately, so I feel as though I was noticed.&amp;nbsp; One compliment I received was that it was assumed I was the Oxford Uni post-doc because of the frequency and quality of my contributions.&amp;nbsp; This was highly flattering!&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;object height="300" width="400"&gt; &lt;param name="flashvars" value="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157624953029371%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157624953029371%2F&amp;amp;set_id=72157624953029371&amp;amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&amp;amp;lang=en-us&amp;amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157624953029371%2Fshow%2F&amp;amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157624953029371%2F&amp;amp;set_id=72157624953029371&amp;amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&amp;nbsp;&lt;a href="http://www.flickr.com/photos/46276914@N05/sets/72157624953029371/show/"&gt;( fullscreen )&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;I think there were a few more gains for me personally.&amp;nbsp; A question I was asked many times was 'what will you do when you finish your PhD?' which at first I had a little trouble answering.&amp;nbsp; There is an obvious answer (continue research) but I was rather open in stating that I have a burning desire to travel, and not knowing precisely if academia was for me given I am still in the middle of this new experience.&amp;nbsp; I think the root of this uncertainty was perhaps not knowing what my place in the field was and what the value was.&amp;nbsp; After three days discussing the issues of ethics and how to communicate effectively with the public, I came to realise that perhaps a higher meaning/value in my work is in fact to use my fortuitous placement within the research community to contribute in steering the future of the technology and also to communicate science.&amp;nbsp; It seems ambitious to remark on steering the technology, but if we as scientists do not each take on this responsibility, who will?&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;And so on leaving on the third day I felt remarkably inspired.&amp;nbsp; My research is not just about producing potential future technology, but it is about carving out a place for me to do something meaningful.&amp;nbsp; Furthermore, my developing skills and abilities are not just useful assets, but &lt;i&gt;enabling&lt;/i&gt;. It seems as though I should not ignore the abilities I am gifted with, and in which others have invested to develop.&amp;nbsp; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;There is so much more I want to talk about concerning the three days, but I think I will post my thoughts on serpate issues individually.&amp;nbsp; In the photobox above you can see some of the scenary we were in.&amp;nbsp; When I attended the TAROS conference a month ago I did not seize the opportunity to explore.&amp;nbsp; This time I was equipped!&amp;nbsp; I went jogging one morning and broke out into a clearing,&amp;nbsp; startling some deer.&amp;nbsp; The second morning I used the swimming facilities and took my first sauna.&amp;nbsp; Jogging shoes and swimming trunks will&amp;nbsp; now be mandatory travelling equipment. &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;So now I just have to resolve my inner conflict with travel intentions :)&amp;nbsp; All in good time...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7225604121194616199?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7225604121194616199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/10/epsrc-retreat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7225604121194616199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7225604121194616199'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/10/epsrc-retreat.html' title='The Future of Robotics and Me'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-2633501633043395680</id><published>2010-09-22T15:04:00.000+01:00</published><updated>2010-09-22T15:07:45.380+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>Problems with Signal Hopping</title><content type='html'>In my last post I mentioned that I was having some trouble with my gradient hopping algorithm, that the evolutionary algorithm would always optimise away from it, instead prefering a blind foraging algorithm.&amp;nbsp; I listed a couple of areas that could have been going wrong, and this past week I brute forced my way through most of them.&amp;nbsp; Well here is a brief follow up of what I discovered and what I intend to do now.&lt;br /&gt;&lt;br /&gt;So, if I didn't explain it before, the IR transmission has a limited range, approximately 2 robot body lengths.&amp;nbsp; This means a gradient is formed from a food source across the arena only when robots are within the transmission radius of another signaling robot.&amp;nbsp; If there is an open space, transmission is lost.&amp;nbsp; This means that unless the robots are densely packed within the arena, a gradient will not form, or at least, not extend very far.&amp;nbsp; Robots can only detect food when they are on top of it, so the gradient is essential to increase the perception of the swarm and improve foraging efficiency.&amp;nbsp; However, in a sparsely populated arena it is better to move quickly (even with a velocity penalty ) because signaling rarely has a benefit.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;So logic dictates we should densly pack an arena with robots.&amp;nbsp; This is what my inspiration paper did, placing 1000 robots in an arena.&amp;nbsp; However densly packing an arena with robots has a few problems in itself.&amp;nbsp; First, robots will struggle to navigate.&amp;nbsp; This means that it is better for robots to move slowly, to give themselves more time to detect and avoid collisions.&amp;nbsp; This is a problem for me because it means it takes a lot of simulation time to evaluate a solution, and I need this to be as quick as possible.&amp;nbsp; Slow movement still requires a computation, and more computations (total) to achieve something. &lt;br /&gt;&lt;br /&gt;There is also a problem with a densly packed arena because we require two conflicting directions of robot movement, not just random movement.&amp;nbsp; In this case, the best solution is almost certainly for all robots to follow the wall of the arena in a uniform direction to collect and deposit food.&amp;nbsp;&amp;nbsp; If we look at ants, they construct corridors of foraging (a bit dense, but &lt;a href="http://www.google.co.uk/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CBoQFjAA&amp;amp;url=http%3A%2F%2Fwww.bio.bris.ac.uk%2Fresearch%2Fbehavior%2FArmy_Ant_Traffic_Flow.pdf&amp;amp;rct=j&amp;amp;q=Self-organized%20lane%20formation%20and%20optimized%20traffic%20flow%20in%20army%20ants&amp;amp;ei=7N-ZTL_iJ8K5jAfC48EQ&amp;amp;usg=AFQjCNEvl7r6ApZ0TDjRbWAPHq2LL2JRJw&amp;amp;cad=rja"&gt;this&lt;/a&gt; paper explains how) to minimise collisions and traffic jams.&amp;nbsp; But their pheremone trails are persistent and reinforced, unlike the signal gradient I have been working with, which gives them something to construct a corridor around.&lt;br /&gt;&lt;br /&gt;When a signal hopped gradient forms, it is important that the transmission and recieving periods are asymetrical.&amp;nbsp; The reception of signal must be blocked for a period of time.&amp;nbsp; This is required because otherwise the retransmission by neighbours feeds back to the initial sender, and a positive feedback loop escalates the signal hops into infinity.&amp;nbsp; Furthermore, the gradient becomes self sustaining and not dependent on the location of food as a trigger. &lt;br /&gt;&lt;br /&gt;This positive feed back loop requires a bit of thinking, but it is mainly because of the time it takes for a robot to receive a signal, and because the robots are not 'clocked' in perfect synchrony.&amp;nbsp; Robot A can signal robot B, and then Robot B can signal back to robot A (this is without a time period blocking mechanism).&amp;nbsp; With a blocking mechanism, signaling becomes momentary, and usually the source robot has since moved away from food and the gradient is lost.&amp;nbsp; This can be partially solved by slowing the movement speed of robots, but again, this is a computationally costly solution I don't really want.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;I tried making sure the robots always took the lowest signal to hop (the food will be lowest), but isolated groups form that aggregate on their own phantom gradient.&amp;nbsp; The important thing is that with signal hopping, the navigation aid is temporary and transient.&amp;nbsp; Robots can only alter their navigation based on a single moment of information, unlike a persistent phereomone trail towards food. &amp;nbsp; I have been unable to successfully route traffic on a transient signal, robots typically move towards food, collide, and disperse randomly.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;All of the above had me thinking about a bigger problem. &amp;nbsp; What happens when the robots are not constrained to an enclosed environment.&amp;nbsp; What if we want robots to work in space, at sea or pretty much anywhere in the real world?&amp;nbsp; Any kind of limited range signal hopping is going to have problems unless the robots stay relatively clumped up together. &lt;br /&gt;&lt;br /&gt;I think this is drawing to an important point, question or train of thought.&amp;nbsp; Signal hopping is really a form of communication between robots and it is transient.&amp;nbsp; Laying down pheremone trails is persistent, and it is actually more like writing something down.&amp;nbsp; So, when we look at swarm systems, is it more important/useful to write things down, than communicate them?&amp;nbsp; Sure, it is possible to construct a swarm system based on transient communication, but can we evolve behaviours out of it?&amp;nbsp; It seems like a mechanism which is too delicate, not robust, and needle-in-a-haystack when it comes to evolution.&lt;br /&gt;&lt;br /&gt;So now I am going to take a look at some pheremone systems, and implement a virtual pheremone system for my robots, to see if that is more functional with my robots.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-2633501633043395680?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/2633501633043395680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/09/problems-with-signal-hopping.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2633501633043395680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2633501633043395680'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/09/problems-with-signal-hopping.html' title='Problems with Signal Hopping'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-1490974056895189223</id><published>2010-09-13T18:32:00.000+01:00</published><updated>2010-09-13T18:43:17.046+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GA'/><category scheme='http://www.blogger.com/atom/ns#' term='evolutionary algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>Bumpy road</title><content type='html'>I usually update when I feel like I have achieved something but today I thought I would update whilst things are in the perplexing development stage.&lt;br /&gt;&lt;br /&gt;So I have been working on implementing a slime-mould inspired aggregation algorithm to get the robots to forage for food.&amp;nbsp; If you've not heard of the slime-mould, check out &lt;a href="http://en.wikipedia.org/wiki/Dictyosteliida"&gt;this&lt;/a&gt; article on Wikipedia, particularly the life cycle diagram.&amp;nbsp; They have a fascinating level of intelligence.&amp;nbsp; The paper I am using as primary inspiration is &lt;a href="http://books.google.co.uk/books?id=Re0dM2muINEC&amp;amp;pg=PA1&amp;amp;lpg=PA1&amp;amp;dq=slime+mould+navigation+robot&amp;amp;source=bl&amp;amp;ots=M-LJTazcTP&amp;amp;sig=OM7y46k6hjB5-NUk3ejKPWUwQSA&amp;amp;hl=en&amp;amp;ei=oleOTJuSB86OjAeik_DOBg&amp;amp;sa=X&amp;amp;oi=book_result&amp;amp;ct=result&amp;amp;resnum=2&amp;amp;ved=0CBsQ6AEwAQ#v=onepage&amp;amp;q&amp;amp;f=false"&gt;here&lt;/a&gt;, but I'm afraid I can only find that google preview with free access.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;So in principle I have everything working.&amp;nbsp; My robots explore their environment and when they find a food source they broadcast a signal in all directions.&amp;nbsp; If another robot receives this signal, it adds 1 to the value and broadcasts this onwards.&amp;nbsp; A chain of robots creates a virtual gradient toward the food source, the location of which would otherwise be unknown to the robots.&amp;nbsp; One problem I came across was covered in that paper, requiring two gradients to allow robots to navigate upstream and downstream (with one gradient, outgoing robots collide with the incoming robots).&lt;br /&gt;&lt;br /&gt;So since I had this working with my hard coded, guessed parameters, I thought I would get a genetic algorithm to optimise it.&amp;nbsp; The result?&amp;nbsp; It optimises &lt;u&gt;NOT&lt;/u&gt; to use the gradient signalling mechanism.&amp;nbsp; In other-words, the search algorithm finds solutions that work better when the robots blindly forage for food.&amp;nbsp; How could this be?&amp;nbsp; Well, there are a number of ways in which the system as a whole could be failing:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The simulation is flawed:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Perhaps I haven't coded the signalling mechanism properly?&amp;nbsp;&lt;/li&gt;&lt;li&gt;I might not be giving enough simulated time for a solution to be revealed.&lt;/li&gt;&lt;li&gt;The simulated environment might not promote the 'solution'.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;The genetic algorithm representation is flawed:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Perhaps I have isolated the wrong parameters to evolve?&lt;/li&gt;&lt;li&gt;The metric which measures the utility of a solution could be rewarding the wrong aspect.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;The 'solution' is flawed:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;It could be that the distance at which the robots can signal is insufficient to benefit them.&lt;/li&gt;&lt;li&gt;The way in which the robots move and navigate interferes with the signalling gradient.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;And so this is a familiar situation for me.&amp;nbsp; If you look at literature concerning evolutionary algorithms, you will often see the development times to a solution quoted in the number of evolutionary generations, but not the months of tweaking that go into getting the algorithm to work in the first place.&lt;br /&gt;&lt;br /&gt;I'll let you know what the fix is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-1490974056895189223?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/1490974056895189223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/09/i-usually-update-when-i-feel-like-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1490974056895189223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1490974056895189223'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/09/i-usually-update-when-i-feel-like-i.html' title='Bumpy road'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8084116066843443173</id><published>2010-09-07T09:43:00.000+01:00</published><updated>2010-09-07T09:45:25.928+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><category scheme='http://www.blogger.com/atom/ns#' term='simulation'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='epuck'/><title type='text'>New Brains, New Visualisation</title><content type='html'>Whilst I was at the TAROS conference I put my mind to work on how to control the robots in the swarm with a behaviour based controller (or state machine).&amp;nbsp; One of the problems I get hung up on is the relative simplicity of the robots, and therefore the very limited set of states they can exist in.&amp;nbsp; Of course, this should be a good thing I guess, since it reduces the extent of the design problem.&amp;nbsp;&amp;nbsp; But I also find it hard to conceive a useful product of these simple interactions.&amp;nbsp; What can simple robots actually &lt;i&gt;do&lt;/i&gt;?&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Anyway.&amp;nbsp; I have been hard at work implementing some support infrastructure for my experiments.&amp;nbsp; Earlier I mentioned that I had enabled the epucks to communicate over WiFi, by handshaking with infrared.&amp;nbsp; I have used a similar idea to allow the robots to perceive areas of the arena as 'interesting'.&amp;nbsp; Each robot runs a WiFi component that checks with my desktop pc if it is within a specified area, and updates a virtual sensor.&amp;nbsp; On my desktop pc I simply create a text file which contains the coordinates and size of how ever many areas I want to create.&amp;nbsp; I can set a value in these areas to signify something important, such as 'nest' or 'food', or maybe even the value of food available to the robot.&lt;br /&gt;&lt;br /&gt;This method greatly improves the capabilities of the robots, creating more behaviours and states.&amp;nbsp; It is an abstraction, but I am coming to terms with the fact that the robots will never operate outside the lab anyway, so why make it harder?&lt;br /&gt;&lt;br /&gt;So whilst I was at TAROS I decided to code the simulation counter part.&amp;nbsp; My work relies on robots using a minimal simulation whilst they operate, so I had better be able to simulate the same thing!&amp;nbsp; Once I had this done, I set about programming a new behaviour based controller.&amp;nbsp; When things weren't working as expected, it became clear I needed a new method of visualising the numeric output of the simulator.&amp;nbsp; &lt;a href="http://processing.org/"&gt;Processing stepped in&lt;/a&gt; :)&amp;nbsp; One of the best things about processing (other than rapid development times) is the fact it will run on any operating system.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_dp41M8DAjZs/TIX54aev8HI/AAAAAAAAAEg/uJBz1lMiN7U/s1600/Gradient.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_dp41M8DAjZs/TIX54aev8HI/AAAAAAAAAEg/uJBz1lMiN7U/s320/Gradient.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The picture above is the new visualisation for my simulator.&amp;nbsp; It is much prettier.&amp;nbsp; Importantly, it contains the 'virtual' areas (green and blue : food and nest), and give a clear visualisation of the robots interacting.&amp;nbsp; I can now see a robot avoiding an obstacle (black circle).&amp;nbsp; The blue halos are the infra-red signals.&amp;nbsp; The white numbers is the value being transmitted.&amp;nbsp; In the above image, the robots have used signal-hopping to form a gradient towards food.&amp;nbsp; Robots with a green ring are carrying a food item.&amp;nbsp; It is still work in progress, but it is much more swarmish.&amp;nbsp;&amp;nbsp; This visualisation is much more flexible, allowing me to define how many robots to represent, how many obstacles, etc, etc.&lt;br /&gt;&lt;br /&gt;Since I have been developing a new controller, I decided to change the way I operate the epucks too.&amp;nbsp; Now the controller resides on the Linux board, and drives the epuck (previously, the controller parameters were transferred to the epuck, where the same controller was mirrored).&amp;nbsp; This removes the bottle neck in transferring data.&amp;nbsp; The only downside, is with all these extensions to my idea the Linux board is getting very highly computationally loaded and I need to verify the development times.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;On a side note:&lt;br /&gt;&lt;br /&gt;I have always been fond of&amp;nbsp; &lt;a href="http://www.bit-tech.net/gaming/2009/03/05/how-ai-in-games-works/3"&gt;GOAP&lt;/a&gt;.&amp;nbsp; It is a method of constructing finite state machines from a goal perspective.&amp;nbsp; It is a relatively new method in computer game AI that takes the programming load off the developer.&amp;nbsp; They create a pool of behaviours/actions that have prerequisites and costs.&amp;nbsp; They then assign the behaviours to the 'bad guys' that seem appropriate.&amp;nbsp;&amp;nbsp; Whilst playing the game, each bad guy does a quick search through its allocated behaviour set to meet it's own current goal.&amp;nbsp; This means that the statemachine does not have to be programmed for each enemy in the game.&amp;nbsp; It does rely on determining an acurate state...&amp;nbsp; I have been thinking about GOAP a lot, but I have not found a way to implement it in a swarm.&amp;nbsp; Yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8084116066843443173?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8084116066843443173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/09/new-brains-new-visualisation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8084116066843443173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8084116066843443173'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/09/new-brains-new-visualisation.html' title='New Brains, New Visualisation'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_dp41M8DAjZs/TIX54aev8HI/AAAAAAAAAEg/uJBz1lMiN7U/s72-c/Gradient.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4943290607430904770</id><published>2010-09-04T15:15:00.000+01:00</published><updated>2010-09-04T15:18:42.688+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mencoder'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='jpg'/><category scheme='http://www.blogger.com/atom/ns#' term='stop motion'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Stop Motion in Ubuntu</title><content type='html'>I had to capture a video of the robots performing a task over about 30 to 40 minutes.&amp;nbsp; A video of any quality at that length would be very long.&amp;nbsp; Instead, I used the stop motion technique.&amp;nbsp; I usually do this in Windows, but the web camera I have is a pain in the butt to get drivers for.&amp;nbsp; So here is how I got it all working together in Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install fswebcam &lt;/li&gt;&lt;ul&gt;&lt;li&gt;I had to download the source tarball from http://www.sanslogic.co.uk/fswebcam&lt;/li&gt;&lt;li&gt;tar xzvf&lt;/li&gt;&lt;li&gt;I had to install gd library&lt;/li&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install libgd2-xpm-dev&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;./configure, make, sudo make install&lt;/li&gt;&amp;nbsp;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;li&gt;Install Mencoder&lt;/li&gt;&lt;ul&gt;&lt;li&gt;sudo apt-get install mencoder&lt;/li&gt;&amp;nbsp;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;li&gt;Write a program/script to call fswebcam&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I wrote a C program to call fswebcam, with a sleep argument.&amp;nbsp; Not particularly precise.&lt;/li&gt;&lt;li&gt;Something like: fswebcam image%d.jpg&amp;nbsp; &lt;/li&gt;&lt;li&gt;Write out your image files sequentially.&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Note, buffer the numbering to maintain a logical directory listing.&amp;nbsp; E.g. image0001.jpg, image0002.jpg ... for up to 9999 images.&lt;/li&gt;&amp;nbsp;&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;Run mencoder to bring the files together into a movie.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;I placed the following into a .sh file:&lt;/li&gt;&lt;li&gt; #!/bin/sh&lt;br /&gt;&lt;br /&gt;mencoder mf://*.jpg -o out.mpg -ofps 25 -vf scale=352:288,harddup -of lavf -lavfopts format=mpg -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc -lavcopts vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vrc_maxrate=1152:vbitrate=1152:vmax_b_frames=0&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4943290607430904770?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4943290607430904770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/09/stop-motion-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4943290607430904770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4943290607430904770'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/09/stop-motion-in-ubuntu.html' title='Stop Motion in Ubuntu'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-2284784489235480946</id><published>2010-07-07T14:57:00.000+01:00</published><updated>2010-07-07T15:12:54.105+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>Technical Progress</title><content type='html'>(&amp;nbsp; Sorry for the text heavy update, and inconsistent references to things I haven't even mentioned before. )&lt;br /&gt;&lt;br /&gt;Soon I am going on vacation to Russia.&amp;nbsp; A week ago I had my first scientific paper accepted to the TAROS 2010 conference.&amp;nbsp; I've been working on the corrections for the paper, but over all I am not particularly happy with it.&amp;nbsp; However, in the peer review I had some good comments:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;b&gt;Relevance:&lt;/b&gt; &lt;i&gt;how well does the paper fit within the scope of Towards Autonomous Robotic Systems?&lt;/i&gt;: 4 (Appropriate) &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Correctness:&lt;/b&gt; &lt;i&gt;Does the paper appear to be flawed technically and/or methodologically?&lt;/i&gt;: 4 (The paper is technically good) &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Novelty:&lt;/b&gt; &lt;i&gt;How novel is the approach?&lt;/i&gt;: 5 (Very new, never seen this before) &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Working systems:&lt;/b&gt; &lt;i&gt;has the work been implemented in a working system?&lt;/i&gt;: 3 (Some technical evaluation, fair demo.) &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Clarity:&lt;/b&gt;&lt;i&gt; how well is the paper structured and presented?&lt;/i&gt;: 5 (Presentation is very clear)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Should this paper be considered for the best paper award?&lt;/i&gt;: 3 (definitely)&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt; This is a well written and presented paper.&amp;nbsp; The research question is well described and elaborated.&amp;nbsp; The results are interesting and should lead on to further work of possible considerable significance.&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I am bad at rewarding myself.&amp;nbsp; I have some criticisms, I know I can do better.&amp;nbsp; I know the next paper will be significant.&lt;br /&gt;&lt;br /&gt;So before I set out for Russia I have been working to update my methodology and implementation.&amp;nbsp; This means coding!&amp;nbsp; I have not indulged in coding for a long while because I am very aware that I have a habit of tinkering, when I need to be producing results. Today I have finished implementing the ability for the robots to communicate with each other over WiFi.&amp;nbsp; There are several advantages.&amp;nbsp; The most important for me is the ability to observe and control a greater number of the variables in my experiments.&lt;br /&gt;&lt;br /&gt;However, in the paper I published the robots communicated using infrared (IR).&amp;nbsp; I was maintaining an emphasis on using only the available hardware, and also to adhere to the swarm principles of local information.&amp;nbsp; The infrared only works over a distance of 2 robot body-lengths.&amp;nbsp; Unfortunately, it is very unstable and can only transmit 16 bits of data at once.&amp;nbsp; This is a very tiny amount of information.&amp;nbsp; I was using the 16bits in two halves, using the least significant 8 bits to transmit a gene value, and the most significant 8 to transmit which gene was being sent.&amp;nbsp; This meant that two robots had to transfer their genetic encoding gene by gene.&lt;br /&gt;&lt;br /&gt;This was a very slow process, and whilst it was sufficient for my early work I was anxious about the future prospects. &amp;nbsp; At this stage, a gene was a single whole numeric value.&amp;nbsp; But what if a gene becomes a state-action, or a real value with a decimal precision?&amp;nbsp; The other anxiety was how hard it was to track communication between robots.&amp;nbsp; In a gene by gene transfer over IR, there was no room to transmit the ID of who the data came from, and no way to ensure data only came from one robot.&amp;nbsp; In other words, my experiment had a significant variable that I could not trace or control; robots were engaging in multi-partner mating!&amp;nbsp; A genetic sequence could be composed from many sources.&amp;nbsp;&amp;nbsp; You could view this as a nice 'feature', but there was no way to judge its significance or impact.&lt;br /&gt;&lt;br /&gt;So, as I mentioned earlier, I've just finished implementing communication over WiFi.&amp;nbsp; The greatest advantage to this is the vast amount of data that can be transmitted between robots exceptionally quickly.&amp;nbsp; This means I can send the *entire* genetic sequence and any other information I fancy in one instance; such as who the genetic sequence came from (making communication tracable), the fitness/utility metric of the transmitted genetic sequence, I could even send the parameters of the simulation environment that each robot is using (if they happened to change between robots...).&amp;nbsp; A lot of this might not make sense if you haven't spoken to me about my research in person - apologies.&amp;nbsp; But robots being able to say more to each other has strong potential. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;The downside to WiFi is that the potential range is vast compared to the 60mm robots.&amp;nbsp; Using WiFi also presents a problem of how do robots initiate dialogue because it is not a directly observable quality like IR transmission.&amp;nbsp; When using computers, we use URL's or IP addresses to contact another machine because we know who we want to talk to.&amp;nbsp; But the robots are supposed to be exploring and conversing locally in an unplanned manner.&amp;nbsp; Subunits in a swarm generally don't communicate over such large scales, the robots shouldn't be able to check up on each other when ever and where ever they feel like it.&amp;nbsp; It may sound like I am imposing constraints (making my work harder!) but in reality it is a necessity for my research domain.&lt;br /&gt;&lt;br /&gt;I had a number of options to solve this problem.&amp;nbsp; We have a tracking system that can monitor the movements of the robots in the arena.&amp;nbsp;&amp;nbsp; Option 1 was to hack this system to allow robots to be aware of other nearby robots, and therefore start communicating.&amp;nbsp; Using WiFi, i could create a virtual sensor for a such a purpose, but it requires quite a work around.&amp;nbsp; Instead, I decided to first try and use the already functioning IR communication, this way, robots can observe the local presence of another robot by directly receiving an IR transmission.&amp;nbsp; This transmission contains the IP address of the IR sending robot, allowing the receiver to initiate conversation back over WiFi.&amp;nbsp; In so doing, we have WiFi constrained to locality.&amp;nbsp; Backwards enough?&lt;br /&gt;&lt;br /&gt;In getting the IR initiated WiFi to work, I improved the stability of the IR by reducing the data length to 8 bits.&amp;nbsp; 8 bits gives me 256 numbers, which is the range of a /24 subnet domain, and more addresses than robots we have available.&amp;nbsp; Reducing the IR to 8 bits improved the speed and stability in transmission (less corrupted data) and consequently the speed at which the IR code executes.&amp;nbsp; All of that that takes place on teh DsPIC board controlling the robot.&amp;nbsp; Unfortunately, depending on an instant of IR communication, and transferring this data up to the Linux Board over the SPI bus revealed a bug which hadn't been a problem - the stability of the SPI bus between the two boards!&amp;nbsp; ARG! After two days of reverse engineering I had this fixed.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;At this point I made another decision which I like.&amp;nbsp; If you are getting a sense of the overwhelming details contained in my research, I am glad.&amp;nbsp; Instead of allowing robots to communicate over WiFi with each other directly (robot to robot), I decided to write a program to mediate the communications.&amp;nbsp; Basically, I wrote a server to act as a telephone exchange between robots.&amp;nbsp; My reason for this was to allow me to track communications, but it has a secondary benefit of allowing me to track the evolutionary progress of each robot.&amp;nbsp; As my robots evolving their controllers, they update their progress to my server.&amp;nbsp; My server program maintains a database of each robots progress.&amp;nbsp; When a robot requests communication with another robot, what it actually receives back is the last update from that robot stored by the server.&amp;nbsp; This way, I see who is talking to who, and I have the evolutionary progress of each robot stored in one place.&lt;br /&gt;&lt;br /&gt;During this work, I exposed another problem.&amp;nbsp; Very occasionally, the WiFi communication to the server stalled and failed to receive a response.&amp;nbsp; Consequently, the linux board waited indefinitely for a response from the WiFi and the SPI bus stopped operating and the actual robot stopped working.&amp;nbsp; Occaisionally sounds managable, but if I am trying to control the number of robots in a group, and some 'occasionally stop', it ruins everything.&amp;nbsp; Fortunately, I changed the default WiFi protocol to instead timeout and make a couple of retries to communicate, which fixes that problem.&amp;nbsp; Phew.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Lastly, I &lt;i&gt;did&lt;/i&gt; write a program to hack the motion capture system a long while ago.&amp;nbsp; So I thought I should squeeze this in too.&amp;nbsp; So, when a robot communicates with another, I also store their relative positions in the arena.&amp;nbsp; This should allow me to conduct analysis of such things as frequency of communcation versus the spatial distribution of robots, or even check for erronous instances of communication.&amp;nbsp; Because all of this is a computer program I have written, I get it to store all of this data in a format I like (comma seperated) to the harddisk, which I can then import to proper data analysis tools.&amp;nbsp; So now the data for all the robots in the swarm (potentially 52 working autonomously) will be logged for my convenient review at a later date - at the press of a button!&lt;br /&gt;&lt;br /&gt;I had concerns about abstracting some of the functionality of the robots to an external system, but I think the reliance on IR keeps it credible.&amp;nbsp; So yes, the WiFi packets are routed through an external system, but you could have ad-hoc WiFi.&amp;nbsp; Again, WiFi requires IP addresses in a system which should be ID-less (and decentralised...), but its not a problem in my experiment scenario.&amp;nbsp; Can I assume technology will significantly improve in due time?&amp;nbsp; I think so.&amp;nbsp; I can hear Alan telling me not to make my PhD harder than it needs to be, and futhermore, as he advised, I have weighed up the pro's and con's of abstraction and found a solution which benefits the swarm (still localised) and me (lots of data to analyse).&lt;br /&gt;&lt;br /&gt;I will try and draw a diagram of all the components of my system and post it on here.&amp;nbsp; I think I remember Linus Torvalds remarking that a good programmer is measured by their ability to maintain the logic and struture of a problem in their mind.&amp;nbsp; I'm not sure if I can get it all out.&lt;br /&gt;&lt;br /&gt;I'm pleased because I have produced a significant amount of work in the lead up to my vacation, that means the remainder of my summer should be highly productive.&amp;nbsp; I am excited to get a paper published that I am proud of!&lt;br /&gt;&lt;br /&gt;Sorry for the text heavy update, and inconsistent references to things I haven't even mentioned before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-2284784489235480946?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/2284784489235480946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/07/technical-progress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2284784489235480946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2284784489235480946'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/07/technical-progress.html' title='Technical Progress'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3505046337245831178</id><published>2010-05-05T14:43:00.000+01:00</published><updated>2011-03-10T15:00:41.671Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='extant'/><category scheme='http://www.blogger.com/atom/ns#' term='milk pixel'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>Talking Robots</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;And it could get messy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_dp41M8DAjZs/S-FzBJM05tI/AAAAAAAAADw/wHkMNAgmUeg/s1600/6robots.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_dp41M8DAjZs/S-FzBJM05tI/AAAAAAAAADw/wHkMNAgmUeg/s320/6robots.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In that picture above 6 of the e-puck robots are communicating with each other over infrared.&amp;nbsp; They are actually trading solutions to a problem that they are trying to figure out.&amp;nbsp; Six robots is the most I have tried this with and unfortunately I did not get any significant findings - this time!&amp;nbsp; This photograph really reminds me of one of my favourite episodes of Star Trek as a kid: &lt;a href="http://en.wikipedia.org/wiki/The_Quality_of_Life_%28Star_Trek:_The_Next_Generation%29"&gt;The Quality of Life&lt;/a&gt;.&amp;nbsp; In this episode they find 3 sentient robots that work together to solve problems (I seem to remember them having replicators to manufacture the tools they required in real time!).&amp;nbsp; On days like today I realise I am fulfilling my dreams.&amp;nbsp; Sorry about the bad quality picture.&amp;nbsp; And the dirty yogurt pot.&amp;nbsp; And the empty lunch box. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;Oh, and check out this photo of my computer screen:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_dp41M8DAjZs/S-F1cRLhpMI/AAAAAAAAAD4/5FbYKYjymJk/s1600/terminals.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_dp41M8DAjZs/S-F1cRLhpMI/AAAAAAAAAD4/5FbYKYjymJk/s320/terminals.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;That is the interface into each robots' brain.&amp;nbsp; It was pure lucky convenience that I had defined 6 colour schemes from a previous experiment.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I just had a supervision meeting with my second supervisor and it has made me quite nervous.&amp;nbsp; After discussing all my exciting results and avenues of research I was cautioned that I have actually created a massively complex solution/scenario.&amp;nbsp; One that might be extremely difficult to investigate empirically, to prove exactly what is happening within the system.&amp;nbsp; It is a very wise caution because I know it is true.&amp;nbsp; But sometimes you have to have something said at you to fully realise it.&lt;br /&gt;&lt;br /&gt;I regularly struggle to keep all the elements of my ideas in a coherent form in my mind.&amp;nbsp; At some point I need to take the time to step back and think about exactly what I am trying to investigate and/or prove.&amp;nbsp; Scarily, I am over half way through now, so its about time I really considered my Thesis and the structure of work I intend to make.&amp;nbsp; This caution at the end of the meeting made me chuckle as last night Lana was expressing the fact that she fears she might struggle to understand my work, despite her best intentions.&amp;nbsp; Well, it seems like everyone does/might!&amp;nbsp; &lt;br /&gt;&lt;br /&gt;The meeting aside, I am feeling very motivated at the moment.&amp;nbsp; I went to give a presentation at the BITE center in NE London on PhD life.&amp;nbsp;&amp;nbsp; It went very well.&amp;nbsp; It was reassuring to hear the other PhD students all talk about how much of a 'lonely journey' a PhD can feel like.&amp;nbsp; I was also proud of myself as there was some questions given to previous students that were left hanging open, so before I started my own presentation I addressed these prior questions and received a round of applause.&amp;nbsp; Maybe I can be good at presentations!&lt;br /&gt;&lt;br /&gt;Milk Pixel is on the road!&amp;nbsp; If you are about in Bristol this weekend we will be at the Glass Works for your amusement.&amp;nbsp; &lt;a href="http://www.sbaweb.co.uk/node/1628"&gt;Potential Indifference - Milk Pixel&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My side project with Extant is starting to go live, which means I can talk about it!&amp;nbsp; Check out the &lt;a href="http://www.extant.org.uk/question.html"&gt;Extant&lt;/a&gt; web page (and my small mention!) and the &lt;a href="http://www.thequestion.org.uk/"&gt;official page&lt;/a&gt; for the up-coming production (has nice pictures!).&amp;nbsp; This has been a good project and now the finishing line is in sight.&amp;nbsp; I have to admit that I am very excited about having my free time back.&amp;nbsp; Come June, all my current side projects shall have come to a close, leaving plenty of time for surfing :D&lt;br /&gt;&lt;br /&gt;I should really put my biography up on the Bristol Robotics Laboratory webpage.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3505046337245831178?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3505046337245831178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/05/stand-back-im-going-to-try-science.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3505046337245831178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3505046337245831178'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/05/stand-back-im-going-to-try-science.html' title='Talking Robots'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_dp41M8DAjZs/S-FzBJM05tI/AAAAAAAAADw/wHkMNAgmUeg/s72-c/6robots.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-633105435858944778</id><published>2010-04-20T14:50:00.000+01:00</published><updated>2010-04-20T15:00:44.792+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ladybirds'/><title type='text'>Ladybirds</title><content type='html'>Its been a while since I made a post and I think that is because I have been meaning to post about progress in my PhD, and I haven't felt there has been much.  Its been a long dark winter for me.  &lt;br /&gt;&lt;br /&gt;To break the ice, I will post some photos I took recently of ladybirds.  They had taken up residency in my flat for the winter and with the warmer weather awoke from their deep slumber.  They were trapped inside the living room behind the windows.  I scrapped them into a box and took photo graphs of them taking flight.  I like the results!  &lt;br /&gt;&lt;br /&gt;I'm still figuring out Flickr. The interface doesn't seem obvious to me, is it just me?&lt;br /&gt;&lt;br /&gt;&lt;object width="400" height="300"&gt; &lt;param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623679826963%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623679826963%2F&amp;set_id=72157623679826963&amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623679826963%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623679826963%2F&amp;set_id=72157623679826963&amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Here is a link to a slideshow which will resize the photos to your screen size, i think: &lt;a href="http://www.flickr.com/photos/46276914@N05/sets/72157623679826963/show/"&gt;Slideshow&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I really like the first image, where you can see the fully unfurled wings of the ladybird.  Isn't it great that beetles can fold their wings up into that protective casing?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-633105435858944778?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/633105435858944778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/04/ladybirds.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/633105435858944778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/633105435858944778'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/04/ladybirds.html' title='Ladybirds'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7308143221811419933</id><published>2010-03-05T14:31:00.000Z</published><updated>2010-03-05T14:31:20.551Z</updated><title type='text'>tagged!</title><content type='html'>&lt;a href="http://ilovesewing.blogspot.com/"&gt;Claire&lt;/a&gt; tagged me in a random photo thing.&amp;nbsp; I don't have that many connections here, but I'll tag &lt;a href="http://theadlab.blogspot.com/"&gt;adam&lt;/a&gt;, perchance he reads this and has a minute of time ;)&lt;br /&gt;&lt;br /&gt;The game?&lt;div style="font-style: italic; text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;span class="Apple-style-span" style="font-family: georgia; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://theadlab.blogspot.com/"&gt;1: Open your first photo folder, &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: georgia; font-style: italic; text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://theadlab.blogspot.com/"&gt;2: scroll to the 10th photo, &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: georgia; font-style: italic; text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://theadlab.blogspot.com/"&gt;3: Post the photo and the story behind it, &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span style="font-style: italic;"&gt;&lt;a href="http://theadlab.blogspot.com/"&gt;4: Tag 5 or more peeps to continue the thread&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_dp41M8DAjZs/S5EUHKcnICI/AAAAAAAAADk/gnPp7TM9Ywg/s1600-h/DSC00028.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_dp41M8DAjZs/S5EUHKcnICI/AAAAAAAAADk/gnPp7TM9Ywg/s320/DSC00028.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Well, it could of been a lot worse!&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;My first folder is 101MSDCF, because thats the folder my camera creates and I'm a lazy filing person.&amp;nbsp; That was the graduate show of my undergrad course.&amp;nbsp; It brings back memories!&amp;nbsp; Those two robots balance like the segway, they were made by my friends Paul and Gary.&amp;nbsp; They both succeeded, and we joked that they should get their robots to joust.&amp;nbsp; My robot was on the side somewhere.&amp;nbsp; By this stage I was so sick of the thing I didn't want to be within 100' of it haha.&amp;nbsp; It was gloriously sunny, so I went and drunk lots of free wine in the courtyard.&amp;nbsp; Its a shame, the preceeding and next photo were group shots of various friends haha.&amp;nbsp; That was over two years ago... how time flies!&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7308143221811419933?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7308143221811419933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/03/tagged.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7308143221811419933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7308143221811419933'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/03/tagged.html' title='tagged!'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_dp41M8DAjZs/S5EUHKcnICI/AAAAAAAAADk/gnPp7TM9Ywg/s72-c/DSC00028.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4749348271815517260</id><published>2010-01-29T16:43:00.000Z</published><updated>2010-01-29T16:43:11.089Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='journal'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Journal</title><content type='html'>I decided to make a book.&amp;nbsp; I briefly looked online for a general how-to's, because I wanted to make quite a fat book so it didn't seem imediately obvious.&amp;nbsp; Figuring it out is half the fun though.&amp;nbsp; Here is the result!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_dp41M8DAjZs/S2MN6diGYuI/AAAAAAAAAC8/2qGK7CWU27c/s1600-h/IMG_0438.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_dp41M8DAjZs/S2MN6diGYuI/AAAAAAAAAC8/2qGK7CWU27c/s320/IMG_0438.JPG" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I like its fatness.&amp;nbsp; It is like a tome.&amp;nbsp; I like the way the pages don't match up, it looks rough-cut and natural.&amp;nbsp; I used too much PVA across the cover, hence the damp looking patchiness, but it gives it a used/homemade feeling I like to think.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;It was actually very cheap to make.&amp;nbsp; I bought an A3 sketch pad and cut it into roughly A5 pages, and used the hard cardboard backing of the pad to make the cover sheets and spine.&amp;nbsp; The brown fabric is a bedsheet from primark, for about £3 (of which, there is plenty left).&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The bit I was quite excited about trying to make was the bridge in the bind on the spine.&amp;nbsp; The book is so fat, it has to be detached from the cover along the spines length to open properly.&amp;nbsp; Here is the effect we are all no doubt familiar with:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/_dp41M8DAjZs/S2MO9ZM19PI/AAAAAAAAADE/3DTvExUl1U4/s1600-h/IMG_0441.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_dp41M8DAjZs/S2MO9ZM19PI/AAAAAAAAADE/3DTvExUl1U4/s320/IMG_0441.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt; &lt;/div&gt;Although, not a particularly clear image.&amp;nbsp; Also, you can see the stitching I used to bind the leaves into bunches.&amp;nbsp; I didn't feel particularly pressed to make it a neat job, or keep the looping hidden within the spine.&amp;nbsp; Only time will tell how long this book will actually keep together!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4749348271815517260?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4749348271815517260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/01/journal.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4749348271815517260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4749348271815517260'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/01/journal.html' title='Journal'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dp41M8DAjZs/S2MN6diGYuI/AAAAAAAAAC8/2qGK7CWU27c/s72-c/IMG_0438.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-5220993837454704817</id><published>2010-01-17T11:51:00.000Z</published><updated>2010-01-17T11:51:18.861Z</updated><title type='text'>Musical Jam</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_dp41M8DAjZs/S1L5Pl06NHI/AAAAAAAAAC0/dEErXtfOFVA/s1600-h/trumpet_tiny.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_dp41M8DAjZs/S1L5Pl06NHI/AAAAAAAAAC0/dEErXtfOFVA/s320/trumpet_tiny.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Last night I went to my friend Pauls' house and my friend Ben came along too.&amp;nbsp; Between us we had a guitar, bass acoustic, trumpet, saxophone and harmonicas.&amp;nbsp; It was the first time I had tried to simply create music with other people and it was really quite hard!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It was like making jam actually.&amp;nbsp; We had all these ingredients (each of us with differing taste in music) and we had to keep putting energy in to get it to eventually set.&amp;nbsp; I have to admit that Ben and Paul were much better with their instruments and at collaborating/improvising than me.&amp;nbsp; It reminded me of dancing - at times I was just overwhelmed with what was going on.&amp;nbsp; A slight hesitation on my part meant I [felt like I] would have to wait a whole bar to come back in again.&lt;br /&gt;&lt;br /&gt;In that one evening I learnt alot though.&amp;nbsp; My trumpet is in the key of Bb, and Pauls' sax was in something else.&amp;nbsp; We had to sit down and work out how to transpose (?) each instrument.&amp;nbsp; I also learnt what a 3rd and 5th is, and generally some good practice on improvising under pressure.&amp;nbsp; Oh, and relaxing about making mistakes, and just finding a way back into the music. Meeting up and playing with people has also given me a lot of motivation to keep practicing.&lt;br /&gt;&lt;br /&gt;I am really excited for the next time, these are my first steps into a band!&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-5220993837454704817?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/5220993837454704817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/01/musical-jam.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5220993837454704817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5220993837454704817'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/01/musical-jam.html' title='Musical Jam'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_dp41M8DAjZs/S1L5Pl06NHI/AAAAAAAAAC0/dEErXtfOFVA/s72-c/trumpet_tiny.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7336860372247007717</id><published>2010-01-07T14:14:00.000Z</published><updated>2010-01-07T14:19:04.183Z</updated><title type='text'>Maow-maow</title><content type='html'>&lt;object width="400" height="300"&gt; &lt;param name="flashvars" value="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623159187368%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623159187368%2F&amp;set_id=72157623159187368&amp;jump_to="&gt;&lt;/param&gt;&lt;param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&amp;lang=en-us&amp;page_show_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623159187368%2Fshow%2F&amp;page_show_back_url=%2Fphotos%2F46276914%40N05%2Fsets%2F72157623159187368%2F&amp;set_id=72157623159187368&amp;jump_to=" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;That is my cat.  &lt;br /&gt;&lt;br /&gt;On cold winter days she likes watch the world from the cosy comfort of the living room.  But it makes me wonder, does my cat have idle thoughts?  Or is it simply waiting apprehensively for the next exciting creature to flutter around on the bird table?  It wouldn't make sense that her mind could be so occupied with observing prey that she wouldn't want to be out there physically chasing them, devouring their brains.  &lt;br /&gt;&lt;br /&gt;I sat and watched her, what could be going through her mind?  And would it be in cat speech?  I guess assuming everything has an inner monologue is a very human thing to do, but it amuses me.  &lt;br /&gt;&lt;br /&gt;She is also getting too old to be territorial, especially when there is so much snow outside.  Eventually she has to leave the house to relieve herself, but immediately after she comes back in to warm her paw-pads up on the surface of the boiler.&lt;br /&gt;&lt;br /&gt;Recently she has begun to wail like a banshee.  She does it when she wakes up, like she is suddenly aware of being all alone.  Maaaaaaaaaaaooooooooow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7336860372247007717?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7336860372247007717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/01/maow-maow.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7336860372247007717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7336860372247007717'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/01/maow-maow.html' title='Maow-maow'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-5743302950428874658</id><published>2010-01-04T23:45:00.000Z</published><updated>2010-01-04T23:53:00.252Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Plants'/><category scheme='http://www.blogger.com/atom/ns#' term='Succulents'/><title type='text'>Succulents</title><content type='html'>So I collect succulents.  Plump, fleshy and water retaining.  A sister to the cacti, but they don't have spines.  I have about 8 types now I think, but recently one shed *all* of its leaves :(  They are normally incredibly robust, I'm not sure what happened to this one.  Anyway, so I picked them all up and I have managed to coax the majority of them into spawning roots.  Check out these photos:&lt;br /&gt;&lt;br /&gt;A box of creation:&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/149233441/box_of_saplings_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;img src="http://th00.deviantart.net/fs71/300W/i/2010/004/d/0/box_of_saplings_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its a marvel (of design?)&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/149234006/sapling_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;img src="http://th09.deviantart.net/fs70/300W/i/2010/004/c/b/sapling_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In all truth, they are not hard to stimulate into new growth.  When I was around 13 years old I used to visit my friend Alex and we would play computer games for entire days on end.  This is where I got my first succulent.  I wasn't sure what it was, but it was certainly curious.  I snapped a branch away (I'm so sorry Mr Tree) and took it home to plant it.  Since then it has spawned many offspring (with my further help!) and grown to about 2 foot tall.  Unfortunately I only have a tiny sapling of it in Bristol, but it is sure to grow into a healthy specimin.  Ironically, Alex and I don't talk anymore, and yet that plant is commonly known as a friendship tree. heh.&lt;br /&gt;&lt;br /&gt;The fantastic thing is that they seem quite happy to grow from only a leaf!  Imagine that, if something of my body could simply replicate entire form, and only with the resources that remain to start it off!  Why do people fear self-replicating nano machines? We already live with them :)&lt;br /&gt;&lt;br /&gt;I find a good technique is to lay the leaves out on a moist tissue (in a tray, i would advice) and place it into a dark cupboard for a while - it should spawn roots.  Check it and give the tissue some moisture every now and then.  &lt;br /&gt;&lt;br /&gt;That one above isn't a Friendship Plant, I'm not sure which it is!  I will have loads spare soon enough if anyone would like a baby plant to nurture.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-5743302950428874658?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/5743302950428874658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2010/01/succulents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5743302950428874658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/5743302950428874658'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2010/01/succulents.html' title='Succulents'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-1578609471130977473</id><published>2009-12-14T10:13:00.000Z</published><updated>2009-12-14T10:33:18.575Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='arnolfini'/><category scheme='http://www.blogger.com/atom/ns#' term='milk pixel'/><category scheme='http://www.blogger.com/atom/ns#' term='robot lantern'/><title type='text'>Milk Pixel, Lantern Robot and the Arnolfini</title><content type='html'>We did it!&lt;br /&gt;&lt;br /&gt;...just.  What a manic last couple of days.  We almost didn't pull through because aspects of the milk pixel project were left to the last minute.  However, alls well that ends well.  Here are some photos:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/146724935/Milk_Pixel__Arnolfini_II_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;img src="http://th01.deviantart.net/fs71/300W/i/2009/348/7/8/Milk_Pixel__Arnolfini_II_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Left to right) Paul O'Dowd (me), Adam Spiers, Tom Burton.  Other group members not in the photo are Jason Welsby and Richard Craig.  In the background, Milk Pixel!  And if you have a keen eye, the robot in a lantern is on the desk :)  The project was placed in the darkroom theater and provided visuals next to live music, spoken word and a series of short films projected onto the wall.  The array of milk bottles visually reacted to sound and movement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/146724791/Milk_Pixel__Arnolfini_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;  &lt;img src="http://th05.deviantart.net/fs70/300W/i/2009/348/5/0/Milk_Pixel__Arnolfini_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A bit of an abstract photo.  You can see all the wires going into the milk bottle caps.  This is where the RGB LEDs were located.  Thats 192 pins to toggle to build an image.  We used 8 CAN bus nodes to control them, although this almost didnt work.  Tom and I built a multi-plexer (out of CMOS logic AND gates!) to do the same job that was driven by a single microcontroller.  So we had control of the 192 pins through 6 pins of the microcontroller.  I liked the old-school approach of our technique!  It didn't get used, but I did some serious coding over 3 days for that chip - so its well broken in now :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/146724464/Robot_Lantern__Arnolfini_III_by_cptnkabuki.jpg"&gt;&lt;br /&gt;  &lt;img src="http://th04.deviantart.net/fs70/300W/i/2009/348/4/b/Robot_Lantern__Arnolfini_III_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So thats how the little lantern robot ended up looking.  I sprayed the thing gold and dry brushed it over with some black paint.  Notice the RGB led on its back.  This changed colour depending on what it was doing.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/146723956/Robot_Lantern__Arnolfini_II_by_cptnkabuki.jpg"&gt;&lt;br /&gt;  &lt;img src="http://th09.deviantart.net/fs70/300W/i/2009/348/5/9/Robot_Lantern__Arnolfini_II_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Throughout the exhibition I placed the completed lantern robot on the desk at reception.  It got some really good exposure!  And I didn't have to change the batteries.  I got good comments.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.deviantart.com/download/146723677/Robot_Lantern__Arnolfini_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;  &lt;img src="http://th03.deviantart.net/fs70/300W/i/2009/348/5/9/Robot_Lantern__Arnolfini_I_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thats a shot of the thing in the dark room theater.  I managed to get the robot to walk forwards, jump backwards, head-butt the glass, sit down, fall over and shake itself.  Quite a behavioral repertoire!  I actually ran out of storage space on the chip.  I didn't figure out a good way of doing a random number generator, so instead I created a large table of random numbers which it indexed through to select behaviours.  It also used the same table to decide how long to perform any of its behaviours.  fun fun fun.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-1578609471130977473?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/1578609471130977473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/12/milk-pixel-lantern-robot-and-arnolfini.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1578609471130977473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1578609471130977473'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/12/milk-pixel-lantern-robot-and-arnolfini.html' title='Milk Pixel, Lantern Robot and the Arnolfini'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-1601409584250050875</id><published>2009-12-04T14:58:00.000Z</published><updated>2009-12-04T15:10:28.291Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='arnolfini'/><category scheme='http://www.blogger.com/atom/ns#' term='robot lantern'/><title type='text'>Robot Lantern II</title><content type='html'>Progress!&lt;br /&gt;&lt;br /&gt;I picked up this glass jar in Habitat today.  It has a nice shape, slightly wider at the base but perfectly smooth with rounded edges.  There is also no emboss on the base, which could turn out handy.  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://fc01.deviantart.net/fs50/f/2009/338/3/2/Robot_Latern_Progress_II_by_cptnkabuki.jpg"&gt;&lt;img src="http://th01.deviantart.net/fs50/300W/f/2009/338/3/2/Robot_Latern_Progress_II_by_cptnkabuki.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The jar is stoppered with cork. This was an intentional find.  The next job is to bend some thin brass rods to push into the cork, which will form a cage effect around the jar.  The rod I have in mind wont reach all the way around the jar, so i have to think of some way form a junction.  Maybe some folded sheet brass.&lt;br /&gt;&lt;br /&gt;At the moment I am unsure if I want the jar upside-down to allow the robot to walk on the cork, or the correct way.  I think there are several good reasons for the latter.  One, it looks like a robot trapped in a jar - aiding the victorian curiosity theme.  Secondly, this robot will be powered by two wires which can conveniently hang through the cork down to the robot.  In which case, I think I will add some extra wires through the top and cut them short, freying them so it looks as if the robot has partially escaped his tether.&lt;br /&gt;&lt;br /&gt;I have quite a set of glass paints, so I am going to age the glass with some yellows and black.  There is a little bit of work to do on the robot too.  I have to add a Red/Green/Blue Light Emitting Diode (LED) for the candle effect.&lt;br /&gt;&lt;br /&gt;I was thinking about how to draw the audience in from a distance and an idea struck me on the bus.  By mistake, I programmed the robot to twitch at high speeed - it looked as if it was highly frustrated or having a panic attack.  This made me think that I could use this behaviour coupled with some strobing white and blue light to look like it is blowing a fuse!  And thats how I came to use a RGB LED as opposed to simple yellow ones.  Conveniently, red and green make yellow, and i can use just the blue and all three for white.  So it should be simple to mix the colour signals.&lt;br /&gt;&lt;br /&gt;I'm not sure if I want to hang the lantern or if i should mount it atop a brass candelabrum.  It could make a fun desk lamp after the exhibition!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-1601409584250050875?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/1601409584250050875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/12/robot-lantern-ii.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1601409584250050875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1601409584250050875'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/12/robot-lantern-ii.html' title='Robot Lantern II'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3571255094447852450</id><published>2009-11-26T16:25:00.001Z</published><updated>2009-12-01T19:42:27.796Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='latern'/><category scheme='http://www.blogger.com/atom/ns#' term='arnolfini'/><category scheme='http://www.blogger.com/atom/ns#' term='milk pixel'/><category scheme='http://www.blogger.com/atom/ns#' term='robots'/><title type='text'>Robot in a Lantern</title><content type='html'>A robot post, hurrah!  Not much of one unfortunately, just a quick post before I leave to catch my bus. &lt;br /&gt;&lt;br /&gt;There is an open exhibition happening at the Arnolfini gallery in Bristol city centre, and I have set myself the task of creating a small piece of robot art work for it!  The idea is to have a small robot crawling around inside a latern with an electronic candle on its back.  It should look just like a latern from a distance, but closer you will probably be able to hear the motors.  And on close inspection, a small robot scratching at the glass!&lt;br /&gt;&lt;br /&gt;Today I put together the circuit board.  Its very small and very simple.  The robot won't have to do much other than crawl around and flicker some lights.  Here is a photo:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fc05.deviantart.net/fs50/f/2009/330/e/9/walker_prototype_I_by_cptnkabuki.jpg"&gt;&lt;img src="http://th05.deviantart.net/fs50/300W/f/2009/330/e/9/walker_prototype_I_by_cptnkabuki.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It looks hilarious when it is moving :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3571255094447852450?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3571255094447852450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/robot-in-latern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3571255094447852450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3571255094447852450'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/robot-in-latern.html' title='Robot in a Lantern'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3002549483948639453</id><published>2009-11-20T14:22:00.000Z</published><updated>2009-11-20T14:36:39.031Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deviantart'/><category scheme='http://www.blogger.com/atom/ns#' term='Mushrooms'/><category scheme='http://www.blogger.com/atom/ns#' term='photos'/><category scheme='http://www.blogger.com/atom/ns#' term='fungus'/><title type='text'>Mushroom hunting</title><content type='html'>I promised to post some more pictures from last weekend, so here they are!  I got up at 6am last Sunday and headed out into Leigh Woods with my camera.  I also borrowed my flat mates tripod which was a lot of fun.  I zig-zagged through the woods and found many mushrooms off the beaten path.  Here are the best.  I took over 270 photos haha.  The light that weekend was fantastic.  I uploaded some photos to deviantart.com and within 24 hours I have had some of them favourite-ed and a comment!  thats so rewarding!  I think I might have to upload more photos :)  Again, you should be able to click these for the full resolution image.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fc07.deviantart.net/fs50/f/2009/323/8/e/Fungus_at_dawn_1_by_cptnkabuki.jpg"&gt;&lt;img src="http://th07.deviantart.net/fs50/300W/f/2009/323/8/e/Fungus_at_dawn_1_by_cptnkabuki.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fc09.deviantart.net/fs50/f/2009/323/4/3/Fungus_at_dawn_II_by_cptnkabuki.jpg"&gt;&lt;br /&gt;&lt;img src="http://th09.deviantart.net/fs50/300W/f/2009/323/4/3/Fungus_at_dawn_II_by_cptnkabuki.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fh00.deviantart.net/fs50/300W/f/2009/323/c/1/Fungus_at_dawn_III_by_cptnkabuki.jpg"&gt;&lt;img src="http://th00.deviantart.net/fs50/300W/f/2009/323/c/1/Fungus_at_dawn_III_by_cptnkabuki.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hopefully this blog will load a bit better with deviantart hosting as they keep image thumbnails :D  &lt;br /&gt;&lt;br /&gt;Hmm, not much robot stuff recently!  I will try to make that my next post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3002549483948639453?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3002549483948639453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/mushroom-hunting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3002549483948639453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3002549483948639453'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/mushroom-hunting.html' title='Mushroom hunting'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4632601906421712017</id><published>2009-11-16T12:01:00.000Z</published><updated>2009-11-16T12:12:12.938Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sunrise'/><category scheme='http://www.blogger.com/atom/ns#' term='Painting'/><category scheme='http://www.blogger.com/atom/ns#' term='downs'/><category scheme='http://www.blogger.com/atom/ns#' term='stained glass'/><title type='text'>Painting</title><content type='html'>&lt;a href="http://www.creaturelabs.co.uk/images/glass/sunrise.JPG"&gt;&lt;img width=600 src="http://www.creaturelabs.co.uk/images/glass/sunrise.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'm enjoying my new flat, it has great views of the Downs - a massive green space in Bristol.  I have been trying to get up at 6am and this morning I was treated to a fantastic sunrise whist I finished off my latest 'stained glass' painting (its glass paint on plastic).  Its an image from the first Hellboy comic.  My render isn't quite true to the colours used in the comic, but it is one of my favourites yet!    I had a good weekend, I will post a couple more photos later!&lt;br /&gt;&lt;br /&gt;From a distance:&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/glass/hellboy2.JPG"&gt;&lt;img width=600 src="http://www.creaturelabs.co.uk/images/glass/hellboy2.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More true colours:&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/glass/hellboy1.JPG"&gt;&lt;img width=600 src="http://www.creaturelabs.co.uk/images/glass/hellboy1.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And a shot of work in progress:&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/glass/in_progress.JPG"&gt;&lt;img width=600 src="http://www.creaturelabs.co.uk/images/glass/in_progress.JPG"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4632601906421712017?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4632601906421712017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/painting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4632601906421712017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4632601906421712017'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/painting.html' title='Painting'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-3531609455789351193</id><published>2009-11-10T15:18:00.000Z</published><updated>2009-11-10T16:04:29.391Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tiny'/><category scheme='http://www.blogger.com/atom/ns#' term='insects'/><category scheme='http://www.blogger.com/atom/ns#' term='photos'/><title type='text'>Tiny Things</title><content type='html'>It is coming up for a year since I bought my camera and I have over 6000 photos!  I've been deliberating upgrading from compact to dSLR, but now that I write that down it seems justified :D  &lt;br /&gt;&lt;br /&gt;I thought I would compile some photos of really small things.  I like the tiny world, its fascinating.  &lt;br /&gt;&lt;br /&gt;&lt;del&gt;You should be able to click the images to view them at their native resolution :)&lt;/del&gt;  &lt;br /&gt;&lt;del&gt;Photobucket resized the images :'(&lt;/del&gt;&lt;br /&gt;Fixed!&lt;br /&gt;&lt;br /&gt;Sorry if this takes a long time to load :|&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC00186.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC00186.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04091.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04091.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC00918.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC00918.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC00470.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC00470.JPG"&gt; &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC00136.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC00136.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC03938.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC03938.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04589.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04589.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04629.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04629.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04673.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04673.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04757.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04757.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC05496.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC05496.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC04845.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC04845.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC05547.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC05547.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC05500.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC05500.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.creaturelabs.co.uk/images/tiny_things/DSC05564.JPG" target="_blank"&gt; &lt;img width=600 src="http://www.creaturelabs.co.uk/images/tiny_things/DSC05564.JPG"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-3531609455789351193?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/3531609455789351193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/tiny-things.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3531609455789351193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/3531609455789351193'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/tiny-things.html' title='Tiny Things'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-6547267913817486354</id><published>2009-11-03T18:30:00.000Z</published><updated>2009-11-03T18:33:44.317Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Chip Tunes'/><title type='text'>Chip Tunes</title><content type='html'>A while a go a friend showed me &lt;a href="http://www.kohina.com/"&gt;kohina&lt;/a&gt;.  It keeps and plays an archive of old chip tune music, from old video games.  &lt;br /&gt;&lt;br /&gt;Too much of it can get irritating.  However something interesting, most this music used to be programmed into hardware chips (hence the name).  These days its easy enough to record high quality music.  But back then there were programmers who would work out the waveforms to generate this sort of music - it all had to be squeezed into a chip on a cartridge!  Thats why it sounds so simple of course, but some of it is musical genius.&lt;br /&gt;&lt;br /&gt;Some tunes have synthesised words and voices! :D&lt;br /&gt;&lt;br /&gt;Heres a radio link, you can open this in windows media or vlc as a network stream:&lt;br /&gt;&lt;br /&gt;http://www.kohina.com/kohinasolanum.m3u&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-6547267913817486354?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/6547267913817486354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/chip-tunes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6547267913817486354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/6547267913817486354'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/chip-tunes.html' title='Chip Tunes'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8413214544681035619</id><published>2009-11-03T17:27:00.000Z</published><updated>2009-11-03T18:10:11.363Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Manchester'/><category scheme='http://www.blogger.com/atom/ns#' term='Walking with Robots'/><title type='text'>Manchester, Walking with Robots.</title><content type='html'>So last weekend I went away to to Manchester for the Manchester Festival of Science.  It was a lot of fun.  The main event was based in the Manchester Museum of Science and Industry (MOSI).  Claire Rocks had put in a huge amount of effort organising 3 years of &lt;a href="http://www.walkingwithrobots.org/"&gt;Walking with Robots&lt;/a&gt; and this was the finale.  I spent long hours talking to the publics about robots, mostly children.  Just like at the Bristol Festival of Nature I was suprised at how much kids under 10 seemed to know about robots - even specifics about how sensors work!  &lt;br /&gt;&lt;br /&gt;I also got to do some fun stuff I wouldn't of thought I would be that good at.  One evening I went along to a bar in Manchester and moved around sitting myself with complete strangers.  I had the epuck robots with me, so I simply asked them what they thought the robots might be doing and used that to start conversation!  The following day I went to a massive shopping centre (Trafford Centre) and did much the same - although this time I had to chase people down!&lt;br /&gt;&lt;br /&gt;Over the five days it made me remember my years at college when I would scour the internet for news items and web pages on any kind of robots.  Now I stand on the opposite side and try to explain myself to others!  It made me feel very privaledged and made me feel excited about robots again.  Working with the robots can be tough, but I shouldn't forget how much work it has taken to get here, its been worth it! &lt;br /&gt;&lt;br /&gt;Here are some pictures:&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05910.jpg"&gt;&lt;br /&gt;&lt;br /&gt;I particularly liked this robot.  Its a boat that is completely sealed and can self-right if capsized.  It has a clear top to charge its batteries via solar power.  The sail is fixed (correct term?) in that its not a sheet of canvas, but more like an aeroplane wing (an aerofoil).  The white box on top is an ultrasound unit used to detect wind direction.  I've not looked into this yet, but I guess that since wind is air pressure it affects the ultrasound ping time - doppler shift?.  The robot uses electricity to move the sail into wind and to steer with a rudder.  Apparently it can track GPS waypoints, but no one has managed to sail the Atlantic autonomously - what a great challenge!&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05945.jpg"&gt;&lt;br /&gt;&lt;br /&gt;This robot was cute but it didnt really do much other than roll about making japanese noises!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05941.jpg"&gt;&lt;br /&gt;&lt;br /&gt;Manchester had a really mixed set of architectures.  It might not be to everyones taste, but it was interesting for a new comer like me!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05944.jpg"&gt;&lt;br /&gt;&lt;br /&gt;I thought that tall building looked great, but it did seem to be the only tall building around.  I asked a taxi driver why it had the tall trellace on top, and he explained that they built it without; however the tv studio next door complained about noise from air turbulance over the top of the beast.  So that trellace breaks that up!  Something I had never considered before!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05988.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The most outrageous entrance to a shopping centre.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05937.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The epucks came to the pub!  This was a fantastic way to get science out there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05992.jpg"&gt;&lt;br /&gt;&lt;br /&gt;I like this photo.  I like low-down shots of e-pucks!  Its like being in their world.  You can see a robot dinosaur in the background :D&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img width=600 src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05993.jpg"&gt;&lt;br /&gt;&lt;br /&gt;This might win cutest photo award.  The kids loved Pleo the dinosaur, although I do wonder how long the novelty would last.  Suprisingly this company went bust, I think its because the robot cost £200, and for that you could get a games console.  I wonder what the mark up was, if any?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8413214544681035619?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8413214544681035619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/11/manchester.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8413214544681035619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8413214544681035619'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/11/manchester.html' title='Manchester, Walking with Robots.'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7962748987901175472</id><published>2009-10-28T15:36:00.000Z</published><updated>2009-10-28T17:23:39.672Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='microcontrollers'/><category scheme='http://www.blogger.com/atom/ns#' term='AVR'/><title type='text'>Background Scheduling on an AVR</title><content type='html'>So the other day I decided to try and implement something tricky on a microcontroller - task scheduling!  It is not a normal feature for a microcontroller but it can be useful.  I thought it would be fun to try and explain the process here!&lt;br /&gt;&lt;br /&gt;My first attempt at this post had a lengthy explaination as to why a scheduler might be necessary.  Lets just leap into the deep end.  Most computers have a main processor (the CPU) which has to be divided up between what you want to achieve.  Interupts are used to steal the CPU from one task and give it to another.  Microcontrollers are very simple computers however (normally used for washing machines etc!) and usually don't have enough interupts to match all the tasks the robot has to do on time.  Instead, we can use one interupt to share the CPU out!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/schedule_struct.jpg"&gt;&lt;br /&gt;&lt;br /&gt;So above is a description of a task.  The 'counter' is sort of like a clock.  Every time our interupt steals the CPU time it adds one to this counter.  The second value, 'cycle', is set by the programmer (or robot!) to determine how often the task should be activated.  Therefore, the counter keeps ticking up, and when it matches the cycle time we activate the task.  &lt;br /&gt;&lt;br /&gt;The 'activate' value is actually just a flag to turn off a task.  Sometimes we want to temporarily turn of a task, but keep it in the schedule. If 'activate' was to equal zero (false), we simply stop adding 1 to the counter.&lt;br /&gt;&lt;br /&gt;So when the counter matches the cycle time, we call upon our (*function) variable.  This is actually a reference to another piece of code which will check sensors, move motors etc.  Normally, the interupt will be ticking along and simply adding one to the counter of the task.  But everynow and then it has to run off to complete the code pointed at by (*function).  Once this has happened we reset the counter to 0 to start the clock until the task is required again.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/scheduling_list.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So the final element in our task description is the *next variable.  This is actually a neat trick to automate the process of checking each scheduled task.  What *next does is point to another task.  It means that we can create lots of tasks and string them all up in a list.  Each time the interupt fires it updates the counter for the current task then uses *next to move to the next task in the list.  It repeats this until *next doesn't point at anymore tasks.  So we don't need lots of interupts to check lots of tasks, but instead one interupt fires then looks along a list of tasks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/scheduling_ticks.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So this method has a two-fold requirement.  The interupt must run fast enough to check each item in the list (and perhaps activate and complete each tasks bit of code), but must run slow enough so that there is some main CPU time to get on with the usual stuff.  If our CPU was running 10,000 times a second but our interrupt was firing at 9000 times a second, that would leave only 1000 'ticks' to do the normal stuff, or complete the  background tasks.  Hopefully you can see the conflict!  &lt;br /&gt;&lt;br /&gt;In the above diagram, the blue main code is running along the top on the black clock signal (black spikes!).  This gets stopped by our green spikes, the interupt, which runs off to check the list of tasks.  On the second sequence, it finds that the second tasks requires activation.  So in the second, we would steal a bit more CPU time than normal.  However, because the main clock is running 10million ticks a second compared to our interupts 100,000, this should be quite ok.&lt;br /&gt;&lt;br /&gt;Using a structure in C to represent a task might be seen as a bit overkill.  However, this method is nice though, because we can use functions like malloc() to add tasks to our scheduler on the fly.  So instead of having to work out the timings to get lots of things to work simultaneously, or work out in which order things should be processed, we can add things or take them away by simply making a call to something like addTask( moveRobot, 3000), specifying the code and timing, and the scheduler will take care of the rest.&lt;br /&gt;&lt;br /&gt;Furthermore, we can add the same task more than once.  This might not seem that useful, but we can have some fun by writing code to create a waveform on an output pin, and then set it as a task twice but with different cycle times.  &lt;br /&gt;&lt;br /&gt;Being able to change things on the fly is something I find exciting for robots.  Rather than have a distinct sequence of processes, robots can work out for themselves what a good timetable of events is.&lt;br /&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7962748987901175472?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7962748987901175472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/10/background-scheduling-on-avr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7962748987901175472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7962748987901175472'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/10/background-scheduling-on-avr.html' title='Background Scheduling on an AVR'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-4228500275744830861</id><published>2009-10-15T14:08:00.001+01:00</published><updated>2009-10-15T15:16:32.942+01:00</updated><title type='text'>Milk Pixel, Craftivism</title><content type='html'>&lt;img src="http://4.bp.blogspot.com/_XUvXjsmQ-Q8/SsnBnFhU1GI/AAAAAAAAAcM/3mApas03PW8/s320/Logo_border_small.jpg"&gt;&lt;br /&gt;&lt;br /&gt;I have got involved with an open event at the Arnolfini due for December this year.  I'm very excited, I've always enjoyed art and now I get to exhibit something in a public place!&lt;br /&gt;&lt;br /&gt;You can check out the event webpage &lt;a href="http://www.craftivism.net"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Currently our blurb is:&lt;br /&gt;&lt;quote&gt;&lt;br /&gt;"Milk Pixel is a semi technical piece of interactive fun that we hope to have ready in time for Craftivism..."&lt;br /&gt;&lt;/quote&gt;&lt;br /&gt;And we are trying hard not to spill the beans before then.  &lt;br /&gt;&lt;br /&gt;I am also going to make a few of my own interactive robots, if I have time.  Milk Pixel is a group project (Adam Spiers, Tom Burton, Jason Welsby, Richard Craig, myself) and we already have a substantial amount done.  I have boxes of electronic junk at home, so I quite want to cobble some interesting things together.  This is an opportunity for me to make robots for no other reason than fun :)&lt;br /&gt;&lt;br /&gt;It should be great, I hope my friends can make it down in December!  &lt;br /&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05782.jpg"&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05783.jpg"&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;img src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC05823.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-4228500275744830861?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/4228500275744830861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/10/milk-pixel-craftivism.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4228500275744830861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/4228500275744830861'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/10/milk-pixel-craftivism.html' title='Milk Pixel, Craftivism'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_XUvXjsmQ-Q8/SsnBnFhU1GI/AAAAAAAAAcM/3mApas03PW8/s72-c/Logo_border_small.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-7292360491711860026</id><published>2009-10-15T13:54:00.000+01:00</published><updated>2009-10-15T14:00:35.828+01:00</updated><title type='text'>End of Year Report: Part II</title><content type='html'>Horray!  &lt;br /&gt;&lt;br /&gt;I have finished the first draft of my end of year report, but it is very rough.  The report is almost entirely speculative unfortunately.  I have spent the year investigating the robots and their potential.  I am confident that I have a good foundation, but the lack of hard results in the report troubles me.  &lt;br /&gt;&lt;br /&gt;I am reminding myself that I started this PhD solo, not part of larger, directed project.  Its a small comfort, but I am telling myself that wading through all the literature to find a research area has been no easy job!  In fact... I'm still not sure if I am 100% there yet!  &lt;br /&gt;&lt;br /&gt;I have handed the report in and I am doing my best not to open the document until i receive feedback.  I get the feeling I could edit the thing forever.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-7292360491711860026?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/7292360491711860026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/10/end-of-year-report-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7292360491711860026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/7292360491711860026'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/10/end-of-year-report-part-ii.html' title='End of Year Report: Part II'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-8702049529114575535</id><published>2009-08-04T02:24:00.000+01:00</published><updated>2009-08-03T18:26:25.065+01:00</updated><title type='text'>End of Year Report: Part I</title><content type='html'>Today I have officially begun my 'End of first year report', for lack of a better name.  The report is supposed to reflect what I have learnt over the past year and state my intentions for the next two.  I am sure the report is also intended to help me pull my ideas together and keep me on track.  &lt;br /&gt;&lt;br /&gt;After the  business with the &lt;a href="http://swarmsofrobots.blogspot.com/2009/08/july-6th-was-beginning-of-5-day.html"&gt;submarine competition&lt;/a&gt;, I returned to work and didn't recognise my own code.  So last week deconstructed my source code into a library form, but more about that later.  I also started pulling together all of the reading I had completed into a bibliography, required for my literature review.  This was something I had started but had let slip.&lt;br /&gt;&lt;br /&gt;Documenting all of my reading really made me realise just how many components there are to a swarm robotic system (real, not simulated!), and also the surrounding topics supporting my ideas.  Already my bibliography has 114 entries, and I still have a few folders remaining to add into the archive.  These are not books I should mention, but probably average 2000 words a paper.  It still seems like a lot.&lt;br /&gt;&lt;br /&gt;So today I also started another initiative.  I picked up a small (A5) exercise book and labelled it 'Quotes'.  I have highlighted passages on papers, so now I am actively keeping a quick reference to help speed up writing.  Obviously, this will be a little bit time consuming, but if I can stick to it I think it will be very useful for finding citations.  Perhaps this should be in my bibliography, but sometimes I know I read something particular which just needs to be more accessible.&lt;br /&gt;&lt;br /&gt;Today I have broken down my report into the relevant sections and now I must decide how much emphasis should be made to each, and which citation to provide.  It is quite exciting, but I am sure this will become an epic slog after a week.  I am looking forward to publishing the finished document on here though.  I have written a few short literature reviews previously in the year, but hopefully this one will be comprehensive enough to keep me happy, inspired, and feeling on top of everything!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-8702049529114575535?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/8702049529114575535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/08/end-of-year-report-part-i.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8702049529114575535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/8702049529114575535'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/08/end-of-year-report-part-i.html' title='End of Year Report: Part I'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-2366162291074908158</id><published>2009-08-03T16:54:00.000+01:00</published><updated>2009-08-03T18:07:21.769+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAUC-E'/><title type='text'>SAUC-E 2009</title><content type='html'>July 6th was the beginning of a 5 day competition to build an autonomous underwater robot.  The robot had to complete a number of tasks using its own intelligence, and our robot came in 7th of 8, beating Cambridge!&lt;br /&gt;&lt;br /&gt;[The Team]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/teamphoto_resized.jpg" alt="Photobucket" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;The competition is annual so teams have the entire year to build something, but this was UWE's first entrance and we began the process in March. After the initial bureaucracy and the time to pull a stable team together, we had approximately two months to get something working.  Mix in exams and coursework, and we were on a tight schedule.  Furthermore, all but one of the other teams were veterans of the competition, so their robots were actually systematic upgrades spanning the years.  Tough competition.&lt;br /&gt;&lt;br /&gt;[Burning the midnight oil]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/DSC04343.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;I had not done anything like this before.  Matt Studley, one of my PhD supervisors, had recommended me to the position of team leader for UWE's entrance.  I took the position but I certainly underestimated the stamina required to keep a team on track.  I started with buckets of enthusiasm but was really knocked back in the early period of the project where a fluctuating team destroyed all and any attempts at progress.  Luckily, my second in command &lt;a href="http://mechapinata.com/"&gt;Tom Rooney&lt;/a&gt; picked up the challenge, set his heart on a design and harassed the workshop technicians until something was built.   Actually having a physical robot makes things substantially easier.&lt;br /&gt;&lt;br /&gt;[ One of the french teams]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0224.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Making a first time entrance into a competition like this is definitely a most challenging endeavour.  Conceptually many of the problems are similar to land based robotics, which is normally quite challenging (but do-able) in itself.  However, here we had a fresh team (myself included) that had no idea about hydrodynamics, best known methods to seal electronics, good brands of marine components, etc.  Simply building a robot and anticipating the perceptual problems the robot would face was a daunting task.&lt;br /&gt;&lt;br /&gt;[A german team ]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0229.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;The week proceeding the competition the team was able to make it to a diver training pool in Somerset.  On the first day the submarine completely flooded with water.  It was then that we learned from another team the the IP-68 rated connectors we had spent a large amount of money on were notorious among teams for leaking (Bulgin).  Great.  Connectors are essential - you need to have the majority of your control system waterproof but communicating to powered external components.&lt;br /&gt;&lt;br /&gt;[The other german team, this was an impressive feat of engineering]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0238.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;South Hampton university lent us one of their SeaCon connectors which worked like a dream.  However, our pin count was now significantly reduced as we did not have enough time to order more connectors of the same brand.  So we had to make do, reducing our robot to one serial connection to debug the whole system.  To use this connector required going back to the workshops to machine a whole new back-plate for the submarine!&lt;br /&gt;&lt;br /&gt;[South Hamptons robot]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0267.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Marios Georgiou had spent his time constructing a pressure gauge sensor to allow us to determine depth.  This turned out to be a fantastic piece of work.  When we looked at the commercial products we were flabbergasted with the cost - typically in high hundreds.  Obviously these products are watertight to great depths, accurate and reliable.  We had already allocated the majority of our budget to some purpose designed thrusters at an educational price of £400 each (!), on the basis that next year we would spend the budget on another quality piece of equipment, and so on.  I think the price of these products gives an indication of the difficulty in design for submarine components.&lt;br /&gt;&lt;br /&gt;[Harriet Watt, who have won 4 years in a row  - its their expertise!]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0252.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;So, one interesting problem we had with Marios' homebrew pressure gauge sensor was that the raw reading was fed through our single connector, and in so doing the oscillating motor signals induced noise into the raw signal.  This combined signal-and-noise was then amplified to a detectable range and interpreted by our system, becoming useless.  The solution was to relocate the amplifying circuitry and analogue-to-digital converter outside the submarine with the pressure gauge itself.&lt;br /&gt;&lt;br /&gt;[Our robot weighing in at 13kg, one of the lightest there]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0135.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;The result was then communicated over an I2C bus through the connector along side the motor cables.  The conversion into digital 0 -&gt; +5v made the transmission robust to noise.  The obvious problem became making it watertight!  Again, more word-of-mouth advice gave us the solution of potting compound.  This is used on car electronics to render it watertight.  It is a resin that can be poured like liquid and sets hard.  Without a convenient mould, we used a Dr. Pepper bottle to encase our pressure gauge circuitry - giving our robot a Dr Pepper shaped undercarriage, which was amusing!&lt;br /&gt;&lt;br /&gt;[The ex-MOD swimming pool, its huge!  That white thing on the right is a crane gantry that allows them to place stuff in the pool.  The pale blue machines down the left side are actually massive, and allow the side sections of the pool to be moved independantly to create various waves]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0151.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;We added an entire kilogram of potting compound in waterproofing of various electronics, and our robot was still too positively bouyant!  That was probably the biggest mistake for us this year, or biggest hole in our knowledge.  Bath universities robot was 63kg in weight, and was 30grams positively bouyant.   Our robot weighed 13kg, and was 2.5kg bouyant!  We added so much lead as dead weight, which could of been batteries (or something else actively useful!).&lt;br /&gt;&lt;br /&gt;[Another team shot.  Geez, my hair can be high volume]&lt;br /&gt;&lt;img width="400" src="http://i7.photobucket.com/albums/y282/CptnKabuki/IMG_0216.jpg" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-2366162291074908158?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/2366162291074908158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/08/july-6th-was-beginning-of-5-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2366162291074908158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/2366162291074908158'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/08/july-6th-was-beginning-of-5-day.html' title='SAUC-E 2009'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-267236337893984214.post-1149209929193979571</id><published>2009-07-28T18:55:00.000+01:00</published><updated>2009-08-03T18:06:55.369+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Slugs'/><title type='text'>Slugs</title><content type='html'>&lt;span style="font-size:100%;"&gt;Well as always I am behind on my posts - before I have even made my first post to this blog!  I have autonomous submarines to talk about, some experiments with genetic algorithms, some visual processing...&lt;br /&gt;&lt;br /&gt;I missed the bus so I thought I would make a quick post.  My flat has an out-house toilet, although it is not as bad as it sounds.  It is a fantastic observation point for insects however!  Over the weeks I have seen the rise and fall of entire arachnid empires.   Recently I have been watching a pair of slugs, specifically &lt;a href="http://en.wikipedia.org/wiki/Limax_maximus"&gt;&lt;i&gt;Limax maximu&lt;/i&gt;&lt;/a&gt;.  It interests me that I have always seen the slugs as a pair.   How do they recognise each other?  Do their brains have the capacity for devotion?   Perhaps it is just happenstance.&lt;br /&gt;&lt;br /&gt;Anyway, these two are almost full grown (nearing 20cm)  so they are cool to watch.  I couldn't help but wonder how much they can see.  I decided to place my hand on the floor with a finger extended above and beyond the path of the slug.  It didn't seem bothered, until about 15mm away, when the slug raised its 'head' to inspect with its optical tentacles.  The tentacles slowly retracted with its forward velocity, remaining at a constant few millimeters away from my finger.  Once within a certain range, the slug used the optical tentacles to feel.  I assume that once a certain distance has been reached the tentacles can actually be used as tactile input, moving around to ascertain more information than sight alone.   I can't help but think their behaviours trigger on perceptual thresholds.  The slug reared up and ran its mouth parts over my finger.  Apparently, I'm not that tasty, and the slug continued on. &lt;br /&gt;&lt;br /&gt;The mating sequence for this slug is supposed to be quite something.  If I manage to capture the act I will post some photos, but otherwise Wikipedia has some &lt;a href="http://upload.wikimedia.org/wikipedia/commons/4/41/Slug-oh_my%21.jpg"&gt;here&lt;/a&gt; and &lt;a href="http://upload.wikimedia.org/wikipedia/commons/5/55/Mating_Great_Grey_Slug_4124.jpg"&gt;here&lt;/a&gt;, and more of the slug on the main page that are better than any I have.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/267236337893984214-1149209929193979571?l=www.paulodowd.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.paulodowd.com/feeds/1149209929193979571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.paulodowd.com/2009/07/sight.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1149209929193979571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/267236337893984214/posts/default/1149209929193979571'/><link rel='alternate' type='text/html' href='http://www.paulodowd.com/2009/07/sight.html' title='Slugs'/><author><name>Paul</name><uri>http://www.blogger.com/profile/09107021239456042759</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_dp41M8DAjZs/St7mn8Vsc9I/AAAAAAAAABI/e9j7WQzYcmA/S220/tiny_me.jpg'/></author><thr:total>0</thr:total></entry></feed>
