<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Fanjita's Rants (Entries tagged as raspberry pi)</title>
    <link>http://www.fanjita.org/serendipity/</link>
    <description>Yes, it really does mean that.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.6 - http://www.s9y.org/</generator>
    <pubDate>Fri, 14 Sep 2012 00:01:48 GMT</pubDate>

    <image>
        <url>http://www.fanjita.org/serendipity/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Fanjita's Rants - Yes, it really does mean that.</title>
        <link>http://www.fanjita.org/serendipity/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Raspberry Rover part 2 : The Hardware</title>
    <link>http://www.fanjita.org/serendipity/archives/61-Raspberry-Rover-part-2-The-Hardware.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/61-Raspberry-Rover-part-2-The-Hardware.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=61</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 320px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a  class=&quot;serendipity_image_link&quot;   rel=&#039;lightbox&#039; href=&#039;http://www.fanjita.org/serendipity/uploads/DSC06424.JPG&#039;&gt;&lt;!-- s9ymdb:34 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;320&quot; height=&quot;240&quot;  src=&quot;http://www.fanjita.org/serendipity/uploads/DSC06424.serendipityThumb.JPG&quot;  alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;The new, improved, but uglier Raspberry Rover!&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;A few months back, I posted about my prototype &quot;Raspberry Rover&quot; - and then I had to stop work on it for a while, because things were busy at work, and my part-time work on &lt;a href=&#039;http://www.ifringe.co.uk/&#039;&gt;iFringe&lt;/a&gt; and &lt;a href=&#039;http://www.fringeguru.com/&#039;&gt;FringeGuru&lt;/a&gt; were reaching their busiest time of the year with the Edinburgh Fringe Festival coming up.
&lt;p&gt;Recently I was able to pick it back up again, and fix a few of the snags that I&#039;d come up against.  It&#039;s now in a state where I feel able to share some of the lessons learnt.  It&#039;s far from perfect, but it is functional with some clear ways forwards.
&lt;p&gt;This posting will deal with the hardware design, and I&#039;ll talk about software and further plans for the future later. &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/61-Raspberry-Rover-part-2-The-Hardware.html#extended&quot;&gt;Continue reading &quot;Raspberry Rover part 2 : The Hardware&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 11 Sep 2012 21:41:34 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/61-guid.html</guid>
    <category>raspberry pi</category>
<category>raspberrypi</category>
<category>robot</category>

</item>
<item>
    <title>Running a Raspberry Pi from batteries</title>
    <link>http://www.fanjita.org/serendipity/archives/60-Running-a-Raspberry-Pi-from-batteries.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/60-Running-a-Raspberry-Pi-from-batteries.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=60</wfw:comment>

    <slash:comments>7</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;&lt;a  class=&quot;serendipity_image_link&quot;   rel=&#039;lightbox&#039; href=&#039;http://www.fanjita.org/serendipity/uploads/pi_batteries.png&#039;&gt;&lt;!-- s9ymdb:33 --&gt;&lt;img class=&quot;serendipity_image_right&quot; width=&quot;320&quot; height=&quot;242&quot;  src=&quot;http://www.fanjita.org/serendipity/uploads/pi_batteries.serendipityThumb.png&quot;  alt=&quot;Battery options side-by-side&quot; /&gt;&lt;/a&gt;
&lt;p&gt;One of the essential properties of a mobile, Raspberry Pi-based robot is that it needs to run on battery power - trailing a power cord around is not much use.
&lt;p&gt;The problem is that the Pi takes an appreciable amount of current (say 500mA, depending on activity and attached peripherals), and needs a pretty narrow input voltage range (5V +/- 0.25V, or so).  Because battery voltage varies pretty wildly depending on the current charge level, running directly from a battery is not really sensible.
&lt;p&gt;So, I set about looking into various options for converting standard battery voltages into something suitable for the Pi.
&lt;h3&gt;Using a linear regulator&lt;/h3&gt;
&lt;p&gt;The traditional approach, back when I was first tinkering with electronics about 30 years ago, would be to put together enough batteries to get a significantly higher voltage than 5V (say, 4x nonrechargeable AA to get 6V, or 6x rechargeable AA for 7.2V), and then run that through a linear regulator (e.g. 7805-series IC) to get a steady 5V.
&lt;p&gt;There are 2 main problems with this approach.&lt;ol&gt;&lt;li&gt;Linear regulators are inefficient, and effectively burn off the excess voltage as heat.  That means that you&#039;re just wasting battery life, and also probably have to deal with dissipating that heat with a heatsink.&lt;li&gt;The Pi draws quite a lot of current, so it would need quite a large regulator, along with a large heatsink.&lt;/ol&gt;
&lt;p&gt;Fortunately, there are much better approaches nowadays, in the form of switched-mode regulators, which are much much more efficient, even at high currents.
 &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/60-Running-a-Raspberry-Pi-from-batteries.html#extended&quot;&gt;Continue reading &quot;Running a Raspberry Pi from batteries&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 02 Jul 2012 22:22:10 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/60-guid.html</guid>
    <category>attiny</category>
<category>raspberry pi</category>
<category>raspberrypi</category>
<category>robot</category>

</item>
<item>
    <title>The Raspberry Rover</title>
    <link>http://www.fanjita.org/serendipity/archives/59-The-Raspberry-Rover.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/59-The-Raspberry-Rover.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=59</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;Here&#039;s a little video of my work-in-progress robot rover.  It uses a Raspberry Pi, running OpenCV with a webcam, to see and react to its environment.
&lt;p&gt;The current program is just a proof-of-concept prototype - it looks in the field of view for any strongly green objects.  If it can see one, it turns to face it, then advances until it is close.  If it can&#039;t see any, then it turns on the spot until it can.
&lt;p&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/ADkJ0FW_9Og&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;The current platform was built very cheaply - parts from a &lt;a href=&#039;http://www.iwantoneofthose.com/iwoot/gift-toys/3-in-1-all-terrain-robot/10427343.html&#039;&gt;3 in 1 All Terrain Robot&lt;/a&gt; from I Want One Of Those, a &lt;a href=&#039;http://shop.ciseco.co.uk/slice-of-pi/&#039;&gt;Slice of Pi&lt;/a&gt; prototyping board from Ciseco, a cheap Hue HD webcam, plus a &lt;a href=&#039;http://www.hobbytronics.co.uk/motor-control/h-bridge-driver-sn754410&#039;&gt;2-channel H-Bridge motor control IC&lt;/a&gt; from Hobbytronics, and of course the &lt;a href=&#039;http://raspberrypi.org&#039;&gt;Raspberry Pi&lt;/a&gt;.  Total cost is probably about £60.
 &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/59-The-Raspberry-Rover.html#extended&quot;&gt;Continue reading &quot;The Raspberry Rover&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 11 Jun 2012 23:50:10 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/59-guid.html</guid>
    <category>opencv</category>
<category>raspberry pi</category>
<category>raspberrypi</category>
<category>webcam</category>

</item>
<item>
    <title>Capturing webcam video with OpenCV on Raspberry Pi / Arch Linux</title>
    <link>http://www.fanjita.org/serendipity/archives/57-Capturing-webcam-video-with-OpenCV-on-Raspberry-Pi-Arch-Linux.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/57-Capturing-webcam-video-with-OpenCV-on-Raspberry-Pi-Arch-Linux.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=57</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 320px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:30 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;320&quot; height=&quot;262&quot;  src=&quot;http://www.fanjita.org/serendipity/uploads/piportrait.serendipityThumb.png&quot; title=&quot;Self portrait via OpenCV&quot; alt=&quot;Self portrait via OpenCV&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Self-portrait of a Raspberry Pi&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Although installing OpenCV on the Raspberry Pi was made very easy by Arch Linux (see &lt;a href=&#039;http://www.fanjita.org/serendipity/archives/56-Running-OpenCV-headlessly-in-Arch-Linux.html&#039;&gt;previous blog post&lt;/a&gt;), persuading OpenCV to capture images from my webcam was substantially harder.  But, eventually I managed to get it working.  Here&#039;s how.
&lt;p&gt;My first attempt followed a sample program found on &lt;a href=&#039;http://stackoverflow.com/questions/2601194/displaying-webcam-feed-using-opencv-and-python&#039;&gt;Stack Overflow&lt;/a&gt;.  But what I found was that I was repeatedly receiving &lt;code&gt;select timeout&lt;/code&gt; errors on the &lt;code&gt;cv.QueryFrame(...)&lt;/code&gt; call.  I also received 3 &lt;code&gt;VIDIOC_QUERYMENU: Invalid argument&lt;/code&gt; errors every time I called &lt;code&gt;cv.CaptureFromCAM(...)&lt;/code&gt;, and &lt;code&gt;Xlib:  extension &quot;RANDR&quot; missing on display &quot;localhost:10.0&quot;&lt;/code&gt; the first time that I called &lt;code&gt;cv.NamedWindow(...)&lt;/code&gt;.  Following those errors, the captured frame was displaying as a black screen, so I assumed that one of them was fatal.
 &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/57-Capturing-webcam-video-with-OpenCV-on-Raspberry-Pi-Arch-Linux.html#extended&quot;&gt;Continue reading &quot;Capturing webcam video with OpenCV on Raspberry Pi / Arch Linux&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 06 Jun 2012 22:31:54 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/57-guid.html</guid>
    <category>opencv</category>
<category>python</category>
<category>raspberry pi</category>
<category>raspberrypi</category>

</item>
<item>
    <title>Running OpenCV headlessly in Arch Linux</title>
    <link>http://www.fanjita.org/serendipity/archives/56-Running-OpenCV-headlessly-in-Arch-Linux.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/56-Running-OpenCV-headlessly-in-Arch-Linux.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=56</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been experimenting with trying to get a usable &lt;a href=&#039;http://opencv.org&#039;&gt;OpenCV&lt;/a&gt; environment up and running on my Raspberry Pi, so that I can experiment with using it for machine vision.  The catch is that I don&#039;t have a decent monitor and keyboard hooked up to the Pi, and I&#039;m using Arch Linux - so most available tutorials aren&#039;t quite applicable to me.  This blog post describes what I&#039;ve done so far to get up and running using remoted X-Windows to get the job done.
&lt;p&gt;Since I have an iMac as my main development machine, I already have a decent X server built in.  I&#039;ve happily used that in the past to remote VirtualBox virtual machine desktops from Debian, and it&#039;s a convenient and efficient way of running graphical apps on a headless server.  So, that seems the logical way to go here.
&lt;p&gt;The first step was to get a basic X client up and running on the Pi.  This was probably the hardest part, and involved a lot of searching around, via both pacman and Google.  Below are what should be the minimal set of steps to get this working, to save future readers from the trouble...
 &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/56-Running-OpenCV-headlessly-in-Arch-Linux.html#extended&quot;&gt;Continue reading &quot;Running OpenCV headlessly in Arch Linux&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 05 Jun 2012 20:33:41 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/56-guid.html</guid>
    <category>headless</category>
<category>opencv</category>
<category>raspberry pi</category>
<category>raspberrypi</category>
<category>x11</category>

</item>
<item>
    <title>Initial Raspberry Pi adventures : Setting up a webcam</title>
    <link>http://www.fanjita.org/serendipity/archives/55-Initial-Raspberry-Pi-adventures-Setting-up-a-webcam.html</link>
            <category>Raspberry Pi</category>
    
    <comments>http://www.fanjita.org/serendipity/archives/55-Initial-Raspberry-Pi-adventures-Setting-up-a-webcam.html#comments</comments>
    <wfw:comment>http://www.fanjita.org/serendipity/wfwcomment.php?cid=55</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.fanjita.org/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    

    <author>nospam@example.com (Fanjita)</author>
    <content:encoded>
    &lt;p&gt;I recently got my &lt;a href=&#039;http://raspberrypi.org/&#039;&gt;Raspberry Pi&lt;/a&gt;, and although I haven&#039;t had a lot of time to play with it, I&#039;ve been able to do a little bit of mucking around.
&lt;p&gt;I initially started with the Debian OS distribution, since I already run several Debian servers (such as this one) and it, or Ubuntu, are usually my distro of choice.  But the experience with Debian on the Pi seems pretty flaky - no sshd by default (which matters to me since I only plan to run my Pi without a screen), and lots of people seem to have trouble getting hardware up and running (especially webcams), so in this case I fairly quickly moved over to Arch Linux - if only for the experience of playing around with another distro. &lt;br /&gt;&lt;a href=&quot;http://www.fanjita.org/serendipity/archives/55-Initial-Raspberry-Pi-adventures-Setting-up-a-webcam.html#extended&quot;&gt;Continue reading &quot;Initial Raspberry Pi adventures : Setting up a webcam&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 02 Jun 2012 22:32:59 +0100</pubDate>
    <guid isPermaLink="false">http://www.fanjita.org/serendipity/archives/55-guid.html</guid>
    <category>opencv</category>
<category>raspberry pi</category>
<category>raspberrypi</category>
<category>webcam</category>

</item>

</channel>
</rss>