<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog My Wiki!</title>
	<atom:link href="http://www.suppertime.co.uk/blogmywiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.suppertime.co.uk/blogmywiki</link>
	<description>life&#039;s a beach and then you die</description>
	<lastBuildDate>Sat, 25 May 2013 22:57:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Weather forecast on a RaspberryPi printer &#8211; now with added Pi</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/05/raspi-wx/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/05/raspi-wx/#comments</comments>
		<pubDate>Sat, 25 May 2013 21:52:37 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[GFR]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1286</guid>
		<description><![CDATA[Here&#8217;s how I get the weather printed on my RaspberryPi-powered GoFreeRange internet printer every morning at 6AM. Overview I made a GoFreeRange printer using a RaspberryPi instead of an Arduino. I signed up for IFTTT and got it to send &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/05/raspi-wx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how I get the weather printed on my RaspberryPi-powered GoFreeRange internet printer every morning at 6AM.</p>
<p><a title="Daily weather forecast on my little printer by gilesbooth, on Flickr" href="http://www.flickr.com/photos/gilesbooth/8822835008/"><img src="http://farm8.staticflickr.com/7358/8822835008_923814614d.jpg" alt="Daily weather forecast on my little printer" width="374" height="500" /></a></p>
<p><strong>Overview</strong></p>
<ul>
<li>I <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/">made a GoFreeRange printer using a RaspberryPi</a> instead of an Arduino.</li>
<li>I signed up for <a href="https://ifttt.com">IFTTT</a> and got it to send a local weather forecast sent as a text file to a folder in my DropBox account each day at 6am.</li>
<li>I wrote a shell script on the RaspberryPi which looks to see if there&#8217;s weather forecast in my DropBox account. If there is, it downloads it to the RaspberryPi. It then moves the remote DropBox copy of the forecast to another folder so it doesn&#8217;t get printed again. The script then calls a Python script to send the forecast to the <a href="http://printer.gofreerange.com/">GoFreeRange printer backend server</a> so it prints out on my printer.</li>
<li>I scheduled this shell script to run every 5 minutes on the RaspberryPi using crontab.</li>
</ul>
<p>&nbsp;</p>
<p><strong>Details</strong></p>
<p>I know there&#8217;s a <a href="http://printer-weather.herokuapp.com/">Printer Weather app</a> for the GoFreeRange printer, but I can&#8217;t get it to work and, knowing nothing about Ruby, I don&#8217;t have a clue how to install it myself &#8211; but I still want a weather forecast to come out of my little printer first thing in the morning.</p>
<p><a href="http://www.suppertime.co.uk/blogmywiki/2013/05/printweather/">The first time I got this working</a>, I had to have a Mac turned on, as this was running <a href="http://jdharper.com/blog/automatically-printing-text-files-to-a-thermal-printer/">JD Harper&#8217;s Python script</a> to poll DropBox for new files to print. Having to keep a Mac running was a bit of a drag, especially when my little printer is being run by a RaspberryPi that just loves to run Python scripts.</p>
<p>The problem is that although there&#8217;s a Linux version of DropBox, it doesn&#8217;t work on the Pi&#8217;s ARM processor, and you need to have a DropBox folder mounted or sync&#8217;d locally on the Pi for the script to work.</p>
<p>Then I discovered <a href="https://github.com/andreafabrizi/Dropbox-Uploader">Andrea Farbrizi&#8217;s Dropbox-Uploader shell script</a>. This doesn&#8217;t mount or sync a DropBox folder by itself, but it does allow you to upload and download files to and from DropBox on a RaspberryPi. Amazingly useful! So I installed it on my Pi and got it working.</p>
<p>I also installed <a href="http://jdharper.com/blog/automatically-printing-text-files-to-a-thermal-printer/">JD Harper&#8217;s Python script</a> on the RaspberryPi &#8211; amazingly this pretty much worked first time, much easier than it had been to get running on my old iMac.</p>
<p>I put everything in a folder called /home/pi/dropbox/gfr/ on the Pi including a directory called txt for the downloaded weather text files, with 2 sub-directories, one called ToPrint and another called Printed.</p>
<p>I had hours of fun making sure all the files were accessed by absolute paths and filenames so when the scripts were run by cron, cron would know where to find everything. (Cron&#8217;s not very good at looking for things, you really have to point things out to it. It must be a man.)</p>
<p>My IFTTT recipe looks rather like this, except I&#8217;ve changed it so the resulting file is always called &#8216;weather.txt&#8217; &#8211; this just makes the coding a bit easier on the Pi:<br />
<a href="http://www.flickr.com/photos/gilesbooth/8803603099/" title="Using IFTTT to print daily weather forecast on my little printer by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8412/8803603099_fbd3e55509.jpg" width="312" height="500" alt="Using IFTTT to print daily weather forecast on my little printer"></a></p>
<p>Here&#8217;s what my shell script <strong>weather.sh</strong> looks like:</p>
<p><code><br />
#!/usr/bin/env bash</p>
<p># bash script by Giles Booth www.suppertime.co.uk/blogmywiki<br />
# (c) 2013 Giles Booth<br />
# for printing daily weather report on my Go Free Range printer<br />
# using Andrea Fabrizi's Dropbox-Uploader shell script<br />
# and JD Harper's printtxt.py python script to poll local<br />
# folders and send text files to the GoFreeRange backend print server</p>
<p># put a directory listing of Dropbox ToPrint folder in a text file<br />
/home/pi/dropbox/gfr/dropbox_uploader.sh list txt/ToPrint &gt; /home/pi/dropbox/gfr/ToPrint.txt</p>
<p># if there's a remote file called weather.txt download it and move<br />
# remote copy to 'Printed' folder in my DropBox</p>
<p>if grep -R "weather.txt" /home/pi/dropbox/gfr/ToPrint.txt<br />
then<br />
/home/pi/dropbox/gfr/dropbox_uploader.sh download txt/ToPrint/weather.txt /home/pi/dropbox/gfr/txt/ToPrint/weather.txt<br />
/home/pi/dropbox/gfr/dropbox_uploader.sh upload /home/pi/dropbox/gfr/txt/ToPrint/weather.txt txt/Printed/weather.txt<br />
/home/pi/dropbox/gfr/dropbox_uploader.sh delete txt/ToPrint/weather.txt<br />
else<br />
echo "no weather found"<br />
fi</p>
<p># clean up list of files to print<br />
rm /home/pi/dropbox/gfr/ToPrint.txt</p>
<p># now run the python script to print local text files<br />
python /home/pi/dropbox/gfr/printtxt.py</code></p>
<p>And here&#8217;s what my crontab.txt looks like:</p>
<p><code>*/5 * * * * /home/pi/dropbox/gfr/weather.sh > /home/pi/dropbox/gfr/tempfile.txt 2>&#038;1</code></p>
<p>This runs weather.sh every 5 minutes and writes a log file called tempfile.txt so I can see what&#8217;s been going wrong, if anything. I loaded the crontab with the<br />
<code>crontab crontab.txt</code><br />
command. I still need to get this cron task to load up when the Pi is first switched on, though.</p>
<p>The other thing on my &#8216;To do&#8217; list is to get the Pi to print any file in my DropBox &#8216;ToPrint&#8217; folder, not just one named weather.txt</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8813110374/" title="Daily weather forecast on my printer - rain, of course by gilesbooth, on Flickr"><img src="http://farm4.staticflickr.com/3698/8813110374_372285fc27.jpg" width="500" height="374" alt="Daily weather forecast on my printer - rain, of course"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/05/raspi-wx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily weather forecast on my little internet printer</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/05/printweather/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/05/printweather/#comments</comments>
		<pubDate>Fri, 24 May 2013 15:19:41 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[GFR]]></category>
		<category><![CDATA[internet printer]]></category>
		<category><![CDATA[little printer]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[weather]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1270</guid>
		<description><![CDATA[Rain, of course I want the weather forecast waiting for me on my little Raspberry Pi-powered internet printer in the morning. I tried signing up for the Printer Weather forecast app but it never worked &#8211; maybe it&#8217;s not running &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/05/printweather/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/gilesbooth/8813110374/" title="weather on my printer - rain, of course by gilesbooth, on Flickr"><img src="http://farm4.staticflickr.com/3698/8813110374_372285fc27.jpg" width="500" height="374" alt="weather on my printer - rain, of course"></a><br />
<em>Rain, of course</em></p>
<p>I want the weather forecast waiting for me on <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/">my little Raspberry Pi-powered internet printer</a> in the morning. I tried signing up for the <a href="http://printer-weather.herokuapp.com/">Printer Weather forecast app</a> but it never worked &#8211; maybe it&#8217;s not running at the moment. I couldn&#8217;t work out how to install it myself, so I was a bit stuck.</p>
<p>Then I had an idea. I use <a href="http://ifttt.com/">IFTTT</a> to email myself a weather forecast every morning. IFTTT stands for If This, Then That (or is it &#8216;If That, Then This&#8217;?). It glues together different web sites and services like Gmail, Flickr and Twitter in ways that can be incredibly useful. I had an idea to use the weather service on IFTTT combined with <a href="http://jdharper.com/blog/automatically-printing-text-files-to-a-thermal-printer/">JD Harper&#8217;s really neat idea for using Dropbox text files as a way of printing to a GoFreeRange printer</a>.</p>
<p>His insanely clever idea is to use a Python script to poll a Dropbox folder for text files &#8211; as new ones appear, his script reformats them as HTML, sends them off to the <a href="http://printer.gofreerange.com/">GFR backend print server</a> with your printer&#8217;s URL, so the text prints. It then moves the text files to another folder so they don&#8217;t get printed twice.</p>
<p>Like JDHarper, I have a Mac, but I had a few issues getting his Python script to work. I had to install &#8216;elementtree&#8217; and update the Mac&#8217;s version of Python from 2.4.4 to 2.7.7 as getcode() wasn&#8217;t supported in Python 2.4.4</p>
<p>I then <a href="http://stackoverflow.com/questions/4145387/cron-syntax-mac-os-x">used crontab to get the Mac to run the Python script every minute</a>. (There&#8217;s another <a href="http://rossb.biz/blog/2011/os-x-cron-jobs-a-simple-tutorial/">really useful guide to scheduling tasks with cron in MacOS X here</a>.) My crontab.txt file looked a bit like this:<br />
<code>* * * * * cd /Users/gilesbooth/RaspPi/printer/ ; python printtxt.py</code><br />
The first bit changes the directory the folder where JD Harper&#8217;s Python code lives, and the second bit runs it.<br />
I loaded it by typing<br />
<code>crontab crontab.txt</code><br />
at the command line.</p>
<p>It worked! I could now drop a text file, anywhere in the world, into one of my Dropbox folders, and (as long as my Mac is turned on) it prints on my little printer, wherever the printer may be.</p>
<p>This is where IFTTT comes in, and things get really tasty. Instead of getting the weather emailed to me, I changed my IFTTT recipe to send it as a text file at 6am each day straight into the Dropbox folder which is polled by the Python script on the iMac. I added a bit of HTML to the forecast to make it easier to read, but it works!</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8803603099/" title="Using IFTTT to print daily weather forecast on my little printer by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8412/8803603099_fbd3e55509.jpg" width="312" height="500" alt="Using IFTTT to print daily weather forecast on my little printer"></a></p>
<p>Obviously, having to have my iMac turned on sucks rather. So the next thing to do is to get the RaspberryPi to do the work of the iMac, if it&#8217;s possible to get the Pi to poll Dropbox folders&#8230; and some pictures would be nice. I might also re-write the Python script to make the formatting prettier.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8822835008/" title="Daily weather forecast on my little printer by gilesbooth, on Flickr"><img src="http://farm8.staticflickr.com/7358/8822835008_923814614d.jpg" width="374" height="500" alt="Daily weather forecast on my little printer"></a><br />
<em>looking brighter</em></p>
<p><b>Post-script</b></p>
<p>I have now managed to get it all running on a Raspberry Pi, with no need to have an Mac running to get files from DropBox to the GFR print server. Details to follow in a <a href="http://www.suppertime.co.uk/blogmywiki/2013/05/raspi-wx/">new post here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/05/printweather/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Root my Nook!</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/05/root-my-nook/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/05/root-my-nook/#comments</comments>
		<pubDate>Sun, 19 May 2013 17:57:24 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[thrift]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Nook]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1253</guid>
		<description><![CDATA[With apologies to any Australian readers &#8211; although if I break it, that may be an appropriate usage of the word &#8216;root&#8217;. The Barnes &#038; Noble Nook Simple Touch has been on sale for £29. £29! At that price, it &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/05/root-my-nook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>With apologies to any Australian readers &#8211; although if I break it, that may be an appropriate usage of the word &#8216;root&#8217;.</em></p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8745350516/" title="Nook on the hook by gilesbooth, on Flickr"><img src="http://farm8.staticflickr.com/7292/8745350516_a536bb5c92.jpg" width="374" height="500" alt="Nook on the hook"></a></p>
<p>The Barnes &#038; Noble Nook Simple Touch has been on sale for £29. £29! At that price, it would be rude not to buy one, especially when it can be hacked to run extra apps. You can pay $30 for a tiny e-Ink test screen for an Arduino, so £29 for a larger screen with a computer glued to the back seems like an amazing bargain.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8775973479/" title="The Common Reader by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8131/8775973479_4022f319c0.jpg" width="500" height="375" alt="The Common Reader"></a><br />
<em>Nook Simple Touch side-by-side with my old 3G Kindle. The Kindle has sound capabilities but the Nook has a touch-screen. And it was £29.</em></p>
<p>The £29 Simple Touch as shipped is a perfectly decent eReader, black &#038; white e-Ink display, no backlight, but it does have a touch screen &#8211; it doesn&#8217;t allow you to add any extra apps, though, even though under the hood it&#8217;s running Android. This means you can turn it into a simple, very very cheap, Android tablet computer.</p>
<p>This is where rooting comes in. You just need a micro SD card (I used a 2GB one I found in an old phone), a USB reader for said card and a computer you can use to write a disk image to the SD card.</p>
<p>I activated my Nook using a Nook account, <a href="http://uk.nook.com/support/nook-simple-touch-software-updates">updated the firmware to 1.2.1 from the uk.nook.com</a> site (the update on the US site didn&#8217;t seem to work) and then I followed these instructions: <a href="http://www.babblingengineer.com/how-to/how-i-turned-my-nook-into-an-e-reader-monster/">http://www.babblingengineer.com/how-to/how-i-turned-my-nook-into-an-e-reader-monster/</a></p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8750411150/" title="Scary... by gilesbooth, on Flickr"><img src="http://farm3.staticflickr.com/2887/8750411150_2ace907b59.jpg" width="374" height="500" alt="Scary..."></a></p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8752579411/" title="Rooting my Nook by gilesbooth, on Flickr"><img src="http://farm6.staticflickr.com/5444/8752579411_ff301b8b75.jpg" width="374" height="500" alt="Rooting my Nook"></a></p>
<p>followed by these to get the Google apps installed: <a href="http://forum.xda-developers.com/showthread.php?t=2086582">http://forum.xda-developers.com/showthread.php?t=2086582</a></p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8752580029/" title="Rooting my Nook by gilesbooth, on Flickr"><img src="http://farm4.staticflickr.com/3678/8752580029_428df98d51.jpg" width="500" height="374" alt="Rooting my Nook"></a></p>
<p>I was able to get Gmail and the GoogleMarket working, but have had no luck with Google Chat. I tried using the Amazon Marketplace, but it said that it didn&#8217;t work in my country (the UK), so you need another way of installing apps. I managed to get a few apps installed using the Google Market app (such as Goodreads and Dropbox), but there&#8217;s a snag &#8211; you can&#8217;t search it, so installing SearchMarket is pretty essential. If you&#8217;re an avid reader, you may find Goodreads reason enough to root your Nook, along with the Kindle software. It does seem a bit perverse, but then I have quite a lot of books &#8216;on Kindle&#8217;. It&#8217;s supposed to be hard to get the Kindle software to work, but I managed to read an archived book ok:</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8756650717/" title="Reading a Kindle book on a Nook by gilesbooth, on Flickr"><img src="http://farm8.staticflickr.com/7411/8756650717_8a47960d26_n.jpg" width="239" height="320" alt="Reading a Kindle book on a Nook"></a></p>
<p>The default web-browser is pretty crashy, though Opera Mobile seems to be much more stable. Gmail is also a bit crashy if I&#8217;m honest, but maybe that&#8217;s because I&#8217;ve removed the SD card. Importantly, though, the Nook still works as an e-Reader, and all the Barnes &#038; Noble software remains.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8752588933/" title="Gmail on my rooted Nook by gilesbooth, on Flickr"><img src="http://farm6.staticflickr.com/5455/8752588933_c5381d4728.jpg" width="500" height="374" alt="Gmail on my rooted Nook"></a></p>
<p>There are some recommended apps and tips here: <a href="http://lifehacker.com/5926798/turn-your-rooted-nook-into-the-ultimate-ereader-with-these-10-apps">http://lifehacker.com/5926798/turn-your-rooted-nook-into-the-ultimate-ereader-with-these-10-apps</a></p>
<p>Here&#8217;s a screengrab of the app screen after I&#8217;d installed a few more:</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8757806472/" title="shot_000001 by gilesbooth, on Flickr"><img src="http://farm8.staticflickr.com/7336/8757806472_ee5cac7265_n.jpg" width="240" height="320" alt="shot_000001"></a></p>
<p>which is oddly in colour &#8211; in fact, it looks more like this:</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8757808592/" title="shot_000001bw by gilesbooth, on Flickr"><img src="http://farm8.staticflickr.com/7379/8757808592_dc1a6ae831_n.jpg" width="240" height="320" alt="shot_000001bw"></a></p>
<p>This is my first Android device. Wow, they made taking screenshots hard, didn&#8217;t they, compared with iOS? I guess Apple made it easy on iOS by way of apology for making it so impossible to remember in OS X. Cmd, shift, alt, option, cross fingers, 4 is it?</p>
<p><i>Post-script</i></p>
<p>I&#8217;ve found another work-around for the search box not working in the Android Market app &#8211; you can use a web-browser on your computer, log into Google, go to play.google.com and send apps to your &#8216;phone&#8217; (i.e. Nook), and they then appear under &#8216;My apps&#8217; in the Market app, so you can install them. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/05/root-my-nook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding an LED to the internet printer</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/04/led-printer/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/04/led-printer/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 15:08:48 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[ICT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[GFR]]></category>
		<category><![CDATA[Go Free Range]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[rasperry pi]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1243</guid>
		<description><![CDATA[Sometimes I&#8217;m not sure if my little Raspberry Pi-powered GoFreeRange internet printer is actually working or not &#8211; the Raspberry Pi is hidden inside the box, and you can&#8217;t usually see the onboard LEDs. Today I thought my printer had &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/led-printer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/gilesbooth/8693123342/" title="Adding an LED to my little Internet printer by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8255/8693123342_bc2859ea77.jpg" width="500" height="374" alt="Adding an LED to my little Internet printer"></a></p>
<p>Sometimes I&#8217;m not sure if <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/">my little Raspberry Pi-powered GoFreeRange internet printer</a> is actually working or not &#8211; the Raspberry Pi is hidden inside the box, and you can&#8217;t usually see the onboard LEDs. Today I thought my printer had been quiet &#8211; it turned out the mains plug had fallen out. So I decided to add an LED that lights up when the Python script that makes the printer work starts running, and which can be fitted to the top of the soap box. (I know there are lights, and even a button, on the original Arduino-powered GFR printer, but I&#8217;m not sure what they do).</p>
<p>I connected the GND pin (pin 6) on the Raspberry Pi to a breadboard (via the black wire in the photo), so the GND pin can be shared by the thermal printer and the LED. I connected GND back to the printer (with the orange wire).</p>
<p>I connected the GND rail on the breadboard to a 330 ohm resistor (all I had) to the short leg of an LED. </p>
<p>Then I connected the long leg of the LED to a GPIO pin on the Raspberry Pi &#8211; pin 7 (GPIO 4) &#8211; that&#8217;s the red wire in this photo.</p>
<p>I added this code near the top of the printer.py Python script, just after all the other import commands:</p>
<p><code>import RPi.GPIO as GPIO<br />
# to use Raspberry Pi board pin numbers<br />
GPIO.setmode(GPIO.BOARD)<br />
# set up GPIO output channel<br />
GPIO.setup(7, GPIO.OUT)<br />
GPIO.output(7,GPIO.HIGH)</code></p>
<p>This then lights an LED when the Python script starts running. It doesn&#8217;t, of course, necessarily tell me it&#8217;s <em>stopped</em> running, but at least I know there&#8217;s power to the Pi and the script has started at least once since it booted up.</p>
<p>This probably commits all kinds of crimes against coding and electronics &#8211; advice and suggestions for improvements are most welcome!</p>
<p>The next step is to get an LED to light when it polls for new stuff to print, or when stuff is incoming &#8211; perhaps a different colour LED for incoming data? Though stuff coming out of the printer is usually a pretty big clue that there&#8217;s incoming data, so I&#8217;m not sure exactly how useful that would be. I might also see if I can get the button to shut the Pi down so it can be safely unplugged.</p>
<p><strong>Polling blinking</strong></p>
<p>Here&#8217;s how I got the LED to blink when the code is polling for new content. I added the following lines near the top of the printer.py script:</p>
<p><code>import RPi.GPIO as GPIO<br />
# to use Raspberry Pi board pin numbers<br />
GPIO.setmode(GPIO.BOARD)<br />
# set up GPIO output channel<br />
GPIO.setup(7, GPIO.OUT)<br />
GPIO.output(7,GPIO.LOW)</code></p>
<p>The last line isn&#8217;t probably necessary, but it was useful for me when testing to get the script to turn the light off when it started up.</p>
<p>I then modified the last section of the printer.py code so it read like this:</p>
<p><code>while(True):<br />
    GPIO.output(7,GPIO.HIGH)<br />
    checkForDownload()<br />
    GPIO.output(7,GPIO.LOW)<br />
    time.sleep(pollingTimeoutSecs)</code></p>
<p>This causes the LED to blink momentarily when it polls for new data, so I know the script is running.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/04/led-printer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a GoFreeRange internet printer with a Raspberry Pi</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 13:44:57 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[GoFreeRange]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[RaspberryPi]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1206</guid>
		<description><![CDATA[I love the idea of the Berg Little Printer, but it&#8217;s expensive: a self-contained box that lets you rip &#038; read internetty stuff such as weather, messages, diary events, travel news, whatever anyone can think of. I already have a &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><object type="application/x-shockwave-flash" width="400" height="225" data="http://www.flickr.com/apps/video/stewart.swf?v=109786" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=6e453cfd23&#038;photo_id=8674144629"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=109786"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=109786" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=6e453cfd23&#038;photo_id=8674144629" height="225" width="400"></embed></object></p>
<p>I love the idea of the <a href="http://bergcloud.com/littleprinter/">Berg Little Printer</a>, but it&#8217;s expensive: a self-contained box that lets you rip &#038; read internetty stuff such as weather, messages, diary events, travel news, whatever anyone can think of. I already have a thermal printer I used for my <a href="http://www.suppertime.co.uk/blogmywiki/little-box-of-poems/">Little Box of Poems</a>, so I decided to make an open source <a href="http://gofreerange.com/printer">GoFreeRange internet printer</a> instead. The GoFreeRange printer normally uses an Arduino, but as I have the wrong kind of Arduino, I wanted to use a Raspberry Pi instead.</p>
<p>You can read more about little thermal internet printers in <a href="http://www.wired.com/design/2012/04/iny-printer-trend/">this Wired article</a> from 2012.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8671158235/" title="Untitled by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8401/8671158235_a5005e9ae4.jpg" width="374" height="500" alt="Untitled"></a></p>
<p>Here&#8217;s roughly how I did it (more details to follow):</p>
<ul>
<li>I made a fresh Raspberry Pi SD card using the normal default Raspbian Wheezy disk image: <a href="http://www.raspberrypi.org/downloads">http://www.raspberrypi.org/downloads</a></li>
<li>I got the Raspberry Pi on t&#8217;internet using a wifi dongle, setting it up using the GUI wifi tool on the desktop, and enabled SSH using the raspi-config tool so I could log into it from a computer with no keyboard or mouse connected to the Pi. I also used the raspi-config tool to expand the disk image to fill the SD card and update the system software. I did not get the Pi to boot into the graphical environment at startup, as I was going to be running it &#8216;headless&#8217;.</li>
<li>I powered up my thermal printer and connected it to the Raspberry Pi <a href="http://www.suppertime.co.uk/blogmywiki/2012/12/pi-poems/">in the same way I did with The Little Box of Poems</a>. I put the Raspberry Pi and printer in an old washing tablet box.</li>
<li>I followed Andrew Nicolaou&#8217;s instructions: <a href="https://github.com/andrewn/raspi-printer#readme ">https://github.com/andrewn/raspi-printer#readme </a>- I changed the baud rate in cmdline.txt &#8211; this causes the Raspberry Pi to send its Linux boot messages to the printer as well as the video output. It&#8217;s a bit verbose &#8211; I got a yard of nerdy gubbins spewing out of my printer, but it worked. (You can disable this if you like, see below).<br />
<a href="http://www.flickr.com/photos/gilesbooth/8670875723/" title="Raspberry Pi boot screen text coming out of printer by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8115/8670875723_97de0ba5fa.jpg" width="500" height="374" alt="Raspberry Pi boot screen text coming out of printer"></a>
</li>
<li>Then, following Andrew&#8217;s instructions, I installed the python-serial library. I was a bit thrown about the bit where he says to save a file with your unique printer ID. I didn&#8217;t have one, and I didn&#8217;t know how to get one. It seemed like a bit of a catch-22, so eventually I just ran his printer.py script anyway.</li>
<li>I then went to this page on my desktop computer and made a note of the printer URL: <a href="http://printer.gofreerange.com/my-printer">http://printer.gofreerange.com/my-printer</a> &#8211; somehow the file with my unique printer ID seemed to get made in the process. I did a test print &#8211; it worked!</li>
<p><a href="http://www.flickr.com/photos/gilesbooth/8672191826/" title="Untitled by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8258/8672191826_af7da40b86.jpg" width="500" height="374" alt="Untitled"></a></p>
<li>Then, having saved my printer URL in a notepad, I signed up for Printer Mail &#8211; <a href="http://printer-mail.herokuapp.com/">http://printer-mail.herokuapp.com/</a>. This means people can send messages to my printer by filling in a simple form on a web page. Brilliant!</li>
</ul>
<p>I had a couple of kernel panics &#8211; the Pi rebooted itself without warning. Not sure why, need to investigate. I&#8217;d like to make the boot-up text a bit less verbose too.</p>
<p>As I&#8217;m running the printer script manually, I need to follow Andrew&#8217;s instructions on getting it to run automatically when you boot the Pi up, and get all the gubbins in a self-contained box.</p>
<p>People sending my printer messages from anywhere they can get on the internet all over the world is pretty damn cool, but other possible uses include waking up to <a href="https://github.com/freerange/printer-weather">a daily printed weather report</a> and <a href="http://chrisroos.co.uk/blog/2012-04-12-bookmark-printing-service-for-the-go-free-range-printer-platform">printing paper bookmarks</a> customised for the book you&#8217;re reading. Or <a href="https://ifttt.com/recipes/38795">print out anything you star in Google Reader</a>. What&#8217;s that you say? Oh well, you get the idea.</p>
<p>The Raspberry Pi version of the GoFreeRange printer doesn&#8217;t have a button &#8211; it just prints anything that&#8217;s sent it. I have a big red shiny button in my printer box that&#8217;s going spare, but I quite like the idea that no human intervention is required, it just squirts out&#8230; stuff.</p>
<p>I&#8217;ve been away from my printer all day, working a late shift. Quite excited to see what might be on it when I get home&#8230;</p>
<p>What&#8217;s next?! Excited&#8230; very excited.</p>
<hr />
<p>I also signed up for the Printer Paint app &#8211; so you can draw me a picture on your computer and send it to my little printer.  I love pictures appearing on my printer &#8211; send me one! <a href="http://printer-paint.herokuapp.com/send/blogmywiki">http://printer-paint.herokuapp.com/send/blogmywiki</a></p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8679594845/" title="Incoming message from His Dudeness by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8523/8679594845_22f5ee5b09.jpg" width="500" height="374" alt="Incoming message from His Dudeness"></a></p>
<p><strong>Addendum:</strong></p>
<p>I&#8217;ve now disabled serial port login on the Pi, to see if that helps with stability &#8211; following the instructions here: <a href="http://www.hobbytronics.co.uk/raspberry-pi-serial-port">http://www.hobbytronics.co.uk/raspberry-pi-serial-port</a>. I did this when I made the Little Box of Poems, and it seems like a good idea. You just comment out the last line of /etc/inittab, the one that reads<br />
<code>T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100</code><br />
by putting a # (hash) at the start of the line. There are also instructions there on how to stop the printer spewing out all the Linux boot-up info when you turn the Pi on.</p>
<p><strong>Post-script to the addendum</strong></p>
<p>I had trouble getting the Python script to run at startup. This is quite important, because I want my little printer to just start working &#8211; and stay working &#8211; when I plug it in. I don&#8217;t want to have to log in by SSH to start the script running. </p>
<p>I couldn&#8217;t get the update-rc.d method to work, so instead I edited /etc/rc.local by typing<br />
<code>sudo nano /etc/rc.local</code><br />
and adding the line<br />
<code>sudo python /home/pi/raspi-printer/printer.py</code><br />
to it. This seems to work.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8679895593/" title="I've got pandas on my printer by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8519/8679895593_350a9a0447.jpg" width="374" height="500" alt="I've got pandas on my printer"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/04/making-a-gofreerange-printer-with-a-raspberry-pi/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Dorothy Parker in Reverse</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/04/dorothy-parker-in-reverse/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/04/dorothy-parker-in-reverse/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 09:14:07 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[fiction]]></category>
		<category><![CDATA[literature]]></category>
		<category><![CDATA[nostalgia]]></category>
		<category><![CDATA[relationships]]></category>
		<category><![CDATA[book club]]></category>
		<category><![CDATA[Dorothy Parker]]></category>
		<category><![CDATA[short stories]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1203</guid>
		<description><![CDATA[An unsuccessful attempt to get a book club to pick The Collected Works of Dorothy Parker as their next book reminded me that I once rewrote her short story &#8216;A Telephone Call&#8217;, swapping the genders to see if it still &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/04/dorothy-parker-in-reverse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>An unsuccessful attempt to get a book club to pick <em>The Collected Works of Dorothy Parker </em>as their next book reminded me that I once rewrote her short story &#8216;A Telephone Call&#8217;, swapping the genders to see if it still worked. I think it does.</p>
<blockquote><p>PLEASE, God, let her telephone me now. Dear God, let her call me now. I won&#8217;t ask anything else of You, truly I won&#8217;t. It isn&#8217;t very much to ask. It would be so little to You, God, such a little, little thing. Only let her telephone now. Please, God. Please, please, please.</p>
<p>If I didn&#8217;t think about it, maybe the telephone might ring. Sometimes it does that. If I could think of something else. If I could think of something else. Maybe if I counted five hundred by fives, it might ring by that time. I&#8217;ll count slowly. I won&#8217;t cheat. And if it rings when I get to three hundred, I won&#8217;t stop; I won&#8217;t answer it until I get to five hundred. Five, ten, fifteen, twenty, twenty-five, thirty, thirty-five, forty, forty-five, fifty&#8230;. Oh, please ring. Please.</p>
<p>This is the last time I&#8217;ll look at the clock. I will not look at it again. It&#8217;s ten minutes past seven. She said she would telephone at five o&#8217;clock. &#8220;I&#8217;ll call you at five, darling.&#8221; I think that&#8217;s where she said &#8220;darling.&#8221; I&#8217;m almost sure she said it there. I know she called me &#8220;darling&#8221; twice, and the other time was when she said good-by. &#8220;Good-by, darling.&#8221; She was busy, and she can&#8217;t say much in the office, but she called me &#8220;darling&#8221; twice. She couldn&#8217;t have minded my calling her up. I know you shouldn&#8217;t keep telephoning them &#8211; I know they don&#8217;t like that. When you do that they know you are thinking about them and wanting them, and that makes them hate you. But I hadn&#8217;t talked to her in three days &#8211; not in three days.</p></blockquote>
<p>I still heartily recommend the Penguin <em>Collected Dorothy Parker</em>. It&#8217;s a big book, but made of short stories. You can pick &amp; choose, like sweets. Leave some of the poetry if you like. There will always be hard-centred, unloved ones left ignored, but you will also find some praline-filled iced gems, with a bittersweet aftertaste.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/04/dorothy-parker-in-reverse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maths is not an exact science</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/03/maths-is-not-an-exact-science/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/03/maths-is-not-an-exact-science/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 19:17:41 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[education]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1177</guid>
		<description><![CDATA[Recently I&#8217;ve been going through the peculiar hell that is the Teaching Agency maths skills test. Anyone who wants to be a teacher has to pass this, even if you just want to teach GCSE English. Everyone says &#8216;you&#8217;ll be &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/03/maths-is-not-an-exact-science/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been going through the peculiar hell that is the Teaching Agency maths skills test. Anyone who wants to be a teacher has to pass this, even if you just want to teach GCSE English. Everyone says &#8216;you&#8217;ll be fine&#8217; &#8211; at least everyone who&#8217;s not tried to sit this test. It&#8217;s been made more <em>rigorous</em>, you see. It&#8217;s a pig. </p>
<p>There are 12 questions that are spoken, and by the time the voice has finished, you have a mere 18 seconds to type the answer, without using a calculator. The problems are not trivial or simple. After your time is up, it clicks over to the next question. You can&#8217;t go back and review an answer. And if you get one straight away (working in radio means I&#8217;m quite good at adding and subtracting time), you can&#8217;t click forward and use the time for a harder question. It&#8217;s torture. If you&#8217;re a masochist with time on your hands, you can try it yourself here: <a href="http://www.education.gov.uk/QTS/Numeracy/assessment_engine.html">http://www.education.gov.uk/QTS/Numeracy/assessment_engine.html</a></p>
<p>An esteemed colleague has suggested that, if asked for feedback, I should say that I&#8217;d have enjoyed the mental maths section much more if the questions had been read in person by the Secretary of State for Education. Unfortunately, my opinion has not been sought.</p>
<p>The next part of the paper comprises 16 questions, mostly about interpreting visual representations of statistical data: tables, scatter graphs, bar charts, even pie charts (which I now know, thanks to @clogsilk, are <a href="http://www.stevefenton.co.uk/Content/Pie-Charts-Are-Bad/">evil</a>).</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8520347298/" title="60/365 Maths is not an exact science by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8386/8520347298_b30c43e215.jpg" width="500" height="374" alt="60/365 Maths is not an exact science"></a></p>
<p>The sample papers all include something most of you will never come across: the box and whisker diagram. I met one candidate at an interview whose boyfriend had a maths degree, and he&#8217;d never heard of them. But I got to grips with them, I thought I understood them&#8230; until I tried the sample question pictured above (in a book on passing the exam).</p>
<p>On the diagram, the box &#038; whiskers tell us: the lowest mark was 25, the highest mark was 90, the median mark (the one in the middle when you line them all up) was 60, and the inter-quartile range is from 40 to about 73.</p>
<p>These facts are not in question. True or false answers are required. Maths is an exact science, right? Some people find comfort in numbers. Numbers are not like people. Numbers are reliable. They do not do mad things randomly, like push you in a canal, fail to call you back or tell you that green isn&#8217;t your colour.</p>
<p>My answers were TRUE, FALSE, TRUE.</p>
<p>The book said: FALSE, TRUE, TRUE.</p>
<p>I think the book is wrong. For the first statement, they say that a quarter of the pupils DIDN&#8217;T get over 70. Well, the upper quartile is about 73, so a quarter of them certainly got more than 73, and the last time I checked, 73 was more than 70. Okay, that quarter didn&#8217;t get any marks between 70 and 72, but they DID get more than 70.</p>
<p>The second one is a bit less clear, but I&#8217;m sure I&#8217;m right and the book is wrong. Bear with me here. We know the median is 60. This means if you line all the scores up in a row, 60 will be in the middle &#8211; or the two values either side have a mean value of 60. We&#8217;re not told how many pupils there are. If there&#8217;s an odd number of pupils, that means one pupil scored <em>exactly</em> 60, because they are in the middle (the median). This means that half the pupils scored <strong>60 or less</strong>, but it&#8217;s false to say that half the pupils scored less than 60 &#8211; slightly fewer than half got less than 60.</p>
<p>Some may say I&#8217;m splitting hairs, some say it&#8217;s the words that are the problem here, not the numbers. But the words seem quite clear to me. It&#8217;s the cold, hard binary answers that are wrong.</p>
<p>Anyway, I passed my skills test. With a little help from my friends.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/03/maths-is-not-an-exact-science/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Q: When is an A&amp;E not an A&amp;E?</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2013/02/q-when-is-an-ae-not-an-ae/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2013/02/q-when-is-an-ae-not-an-ae/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 11:14:48 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[children]]></category>
		<category><![CDATA[family life]]></category>
		<category><![CDATA[Lewisham]]></category>
		<category><![CDATA[NHS]]></category>
		<category><![CDATA[saveLewishamAE]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1172</guid>
		<description><![CDATA[A: When it is closed to blue lights. Lewisham A&#038;E has not been reprieved. An A&#038;E that does not admit blue lights, that takes the 75% of the less-seriously ill people who would have gone before, which refers the seriously &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2013/02/q-when-is-an-ae-not-an-ae/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/gilesbooth/8432789791/" title="31/365 Jeremy Hunt announcing downgrading of Lewisham Hospital by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8215/8432789791_7e1fcaae3b.jpg" width="500" height="374" alt="31/365 Jeremy Hunt announcing downgrading of Lewisham Hospital"></a></p>
<p>A: When it is closed to blue lights.</p>
<p>Lewisham A&#038;E has not been reprieved. An A&#038;E that does not admit blue lights, that takes the 75% of the less-seriously ill people who would have gone before, which refers the seriously ill to another hospital, is not an A&#038;E. It is an urgent care centre with a different name.</p>
<p>I would like someone to stand up in the House of Commons and ask a simple, direct question (why do MPs so often ask long, multiple questions when a single inquiry would be so much more effective?): <strong>What, exactly, is the difference between the proposed downgraded A&#038;E and the urgent care centre proposed by the Special Adminstrator?</strong></p>
<p>It&#8217;s not always obvious that a condition is life-threatening. My wife was taken to Lewisham A&#038;E &#8211; we didn&#8217;t know it at the time, but she had a ruptured ectopic pregnancy. This was quickly diagnosed by Lewisham A&#038;E and she was rushed into theatre. She had lost 5 litres of blood when they opened her up. If she&#8217;d then been sent to Woolwich she&#8217;d have been dead by the time she got there.</p>
<p>Her first pregnancy was apparently straightforward. But when our eldest son was born, he was unexpectedly small and had a blood condition call polycythemia &#8211; he was rushed straight into neo-natal intensive care in Lewisham, just a couple of floors away from where he was born. He spent 2 weeks there and they saved his life. The pregnancy appeared to be normal, but we unexpectedly needed serious medical intervention.</p>
<p>Things are not always what they seem. You can&#8217;t always tell if a medical problem is serious until it&#8217;s too late.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2013/02/q-when-is-an-ae-not-an-ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little Box of Poems with a Raspberry Filling</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2012/12/pi-poems/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2012/12/pi-poems/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 17:44:39 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[computers]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[poetry]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[ICT]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1149</guid>
		<description><![CDATA[Back in October 2012 I made my first Little Box of Poems &#8211; this is a self-contained box that prints out a random short poem when you press a big red shiny button. I like having poems instead of receipts &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2012/12/pi-poems/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/VEZQNFAhvYM" frameborder="0" allowfullscreen></iframe></p>
<p>Back in October 2012 I made <a href="http://www.suppertime.co.uk/blogmywiki/2012/10/howtopoems/">my first Little Box of Poems</a> &#8211; this is a self-contained box that prints out a random short poem when you press a big red shiny button. I like having poems instead of receipts in my wallet. And it makes a good educational project combining physics (wiring), DT (making the box), ICT (programming) and English (writing or finding poems).</p>
<p>It was made using a little £40 Adafruit-type thermal printer and an Arduino microcontroller. I found that I could only get about a dozen short poems in the Arduino before it started spewing out gibberish, I guess because it ran out of memory. I could have claimed this as some sort of machine-generated found-poetry art project, but I wanted proper poems like what the poets originally wrote.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8333169692/" title="random poems by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8084/8333169692_cae172b73f.jpg" width="500" height="333" alt="random poems"></a></p>
<p>As luck would have it, my original Arduino-based Little Box of Poems inspired Carrie Anne Philbin to make <a href="http://geekgurldiaries.blogspot.co.uk/2012/12/little-box-of-geek-project.html">The Little Box of Geek</a>. This is another box that prints random stuff when you press a button &#8211; in this case random nuggets of geeky wisdom. Crucially, Carrie Anne used a Raspberry Pi instead of an Arduino. This means you can add much more stuff into your box, and also opens up the possibility of getting stuff off the internet. Do have a look at her blog and videos posted under the Geek Gurl Diaries banner &#8211; her aim is to get girls more engaged with IT and ICT in school.</p>
<p>Here, roughly, is how I made a Raspberry Pi-based little box of poems.</p>
<p>You will need:</p>
<ul>
<li>A Raspberry Pi with bog-standard Raspbian OS installed.</li>
<li>A thermal printer like this: <a href="http://proto-pic.co.uk/thermal-printer/">http://proto-pic.co.uk/thermal-printer/</a></li>
<li>Till roll for said printer</li>
<li>A big red button. It has to be red.</li>
<li>Some breadboard jumper wires</li>
<li>At least 5 female &gt; male breadboard jumper wires to connect to the GPIO (general purpose input-output) pins on the Raspberry Pi. These are the prongs on your Pi that let you do cool stuff with things in the real world like you can with an Arduino.</li>
<li>A small breadboard</li>
<li>A 10k Ω resistor</li>
<li>A power supply for the Raspberry Pi</li>
<li>A hefty 1.5A power supply for the printer that gives between 5 and 9 volts.</li>
<li>While you&#8217;re building it, you&#8217;ll need a screen, keyboard and mouse for your Raspberry Pi &#8211; OR a computer, phone or tablet with an SSH client on it (any Mac or Linux box will work admirably). These aren&#8217;t needed once you&#8217;ve set it up.</li>
<li>An old Fairy washing tablet box or similar</li>
<li>Some short poems, haikus, limericks etc.</li>
</ul>
<p><a title="Circuit diagram by gilesbooth, on Flickr" href="http://www.flickr.com/photos/gilesbooth/8329984856/"><img src="http://farm9.staticflickr.com/8213/8329984856_d60536ba57.jpg" alt="Circuit diagram" width="500" height="374" /></a></p>
<p>This is a simple diagram of the wiring needed. I had to buy some breadboard female to male leads from Maplin in order to get access to the GPIO pins on the Raspberry Pi &#8211; these meant I had to take the lid off my lovely PiBow case. If you had a proper ribbon connector this wouldn&#8217;t be a problem. Do NOT try to use an old hard drive IDE ribbon cable to connect to the GPIO pins &#8211; they short out certain pins and will likely Fry Your Pi:</p>
<p><a title="Testing shorts by gilesbooth, on Flickr" href="http://www.flickr.com/photos/gilesbooth/8302818335/"><img src="http://farm9.staticflickr.com/8503/8302818335_9b6ef5a107.jpg" alt="Testing shorts" width="374" height="500" /></a><br />
<em>proving an IDE cable has shorts and should not go anywhere near your Pi<br />
</em></p>
<p>1) Fill your printer with till-roll and hold the printer button down while you connect it to that hefty 1.5A 5-9v power supply. A test sheet should come out looking like something like this:</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8095074386/" title="It prints! by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8323/8095074386_1f4161234d.jpg" width="374" height="500" alt="It prints!"></a></p>
<p>2) Connect your printer to the Raspberry Pi. The printer runs at 5 volts, your Pi mostly at 3.3 volts, so <strong>you need to be really careful here. Do not connect the TX pin of your printer (which may have a green wire) to the Raspberry Pi</strong>. </p>
<p>There&#8217;s a really useful diagram of the Raspberry Pi GPIO pins here: <a href="http://elinux.org/RPi_Low-level_peripherals">http://elinux.org/RPi_Low-level_peripherals</a> </p>
<p>Connect the printer&#8217;s GND pin (which may have a black wire) to the pin 6 GND on the Pi. Connect the printer&#8217;s RX pin (which may have a yellow wire) to pin 8 (GPIO 14 TXD) on the Pi. That&#8217;s all you need to do for the printer.</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8333164204/" title="_DSC1716 by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8363/8333164204_c1e114887f.jpg" width="500" height="333" alt="_DSC1716"></a></p>
<p>3) Then get the button wired up. Connect one side of the push button to pin 12 GND on the Raspberry Pi. Connect the the other side of the button to pin 14 on the Pi (GPIO 23). You also need to connect the same side of the switch that&#8217;s connected to GPIO 23 via a 10k ohm resistor to pin 1 of the Raspberry Pi (which supplies 3.3 volts of electricity).</p>
<p>4) Now you need to get some code on your Pi. Here I followed part 1 of the excellent Geek Gurl Diaries video and blog post: <a href="http://geekgurldiaries.blogspot.co.uk/2012/12/little-box-of-geek-project.html">http://geekgurldiaries.blogspot.co.uk/2012/12/little-box-of-geek-project.html</a>. Many, many thanks to Carrie Anne Philbin&#8217;s hard work on this stuff, which saved me a HUGE amount of time. Her instructions are excellent. Plug your Pi into the internet before you start.</p>
<p>5) Next set up the serial port on the Pi, install Git-Hub and the thermal printer library for Python. We&#8217;re going to use Python because it&#8217;s the default supplied programming language on the Raspberry Pi, there&#8217;s a themal printer library for it we can use, and there&#8217;s loads of help out there if you get stuck. Yes I&#8217;m afraid Python <em>is</em> named after Monty Python, but you can alleviate the shame of this somewhat by always sarcastically pronouncing it the American way: PIE-THONN.</p>
<p>This bit requires a few bits of command line geekery on the Pi. Either open up a terminal window on the Pi, or connect from another computer or phone by SSH (see end of this post for details). Follow all the steps in <a href="http://geekgurldiaries.blogspot.co.uk/2012/12/little-box-of-geek-project.html">http://geekgurldiaries.blogspot.co.uk/2012/12/little-box-of-geek-project.html</a> &#8211; though in the bit about removing the last line of /etc/inittab I would suggest that you comment the line out instead of deleting it, by putting a # (hash) sign at the start of the line.</p>
<p>6) Get on over to Part 2 of the Geek Gurl Diaries tutorial now: <a href="http://geekgurldiaries.blogspot.co.uk/2012/12/part-2.html">http://geekgurldiaries.blogspot.co.uk/2012/12/part-2.html</a>. Have a read and a good look, play around but we&#8217;re not going to follow all of this, though, because we&#8217;re printing random poems that we are going to hard-code. It might not be the Cheese Shop, but it will be your very own Python script. Ahem. So ignore all the stuff about &#8216;fortune&#8217; and instead write a file called poem.py that looks something like this:</p>
<p><code><br />
# (c) 2012 Giles Booth @blogmywiki<br />
# www.suppertime.co.uk/blogmywiki<br />
# please credit me if you modify and/or use this code<br />
# not for commercial use</p>
<p>import random<br />
import printer</p>
<p>p=printer.ThermalPrinter(serialport="/dev/ttyAMA0")</p>
<p># the poem titles, text and authors are in 3 separate lists<br />
# you force a new line with \n and \ at the end of a line<br />
# allows you to continue defining a string on a new line</p>
<p>poemtitle = ['In a station of the Metro', 'The Sick Rose', 'This is just to say', 'Surprise']</p>
<p>poemtext = ['The apparition of these faces in the crowd;\n\<br />
Petals on a wet, black bough.', 'O Rose thou art sick.\n\<br />
The invisible worm,\n\<br />
That flies in the night\n\<br />
In the howling storm:\n\n\<br />
Has found out thy bed\n\<br />
Of crimson joy:\n\<br />
And his dark secret love\n\<br />
Does thy life destroy.', 'I have eaten\n\<br />
the plums\n\<br />
that were in\n\<br />
the icebox\n\n\<br />
and which\n\<br />
you were probably\n\<br />
saving\n\<br />
for breakfast\n\n\<br />
Forgive me\n\<br />
they were delicious\n\<br />
so sweet\n\<br />
and so cold', 'I lift the toilet seat\n\<br />
as if it were the nest of a bird\n\<br />
and i see cat tracks\n\<br />
all around the edge of the bowl.']</p>
<p>poemauthor = ['Ezra Pound\n', 'William Blake\n', 'William Carlos Williams\n', 'Richard Brautigan\n']</p>
<p># this chooses a random poem number between 0 and 3<br />
# (in the poem lists the 1st poem is poem number 0)<br />
poem = random.randrange(0,4)</p>
<p>p.bold_on()<br />
p.inverse_on()<br />
p.print_text(poemtitle[poem])<br />
p.linefeed()<br />
p.inverse_off()<br />
p.bold_off()<br />
p.justify("L")<br />
p.print_text(poemtext[poem])<br />
p.linefeed()<br />
p.justify("R")<br />
p.print_text(poemauthor[poem])<br />
p.justify("L")<br />
p.linefeed()</p>
<p># THIS SHOULD PRINT A QR CODE BUT I HAVEN'T GOT IT WORKING YET<br />
#import Image, ImageDraw<br />
#i = Image.open("bmw-qr.png")<br />
#data = list(i.getdata())<br />
#w, h = i.size<br />
#p.print_bitmap(data, w, h, True)<br />
#p.linefeed()</p>
<p>#FONT B IS THE TINY FONT<br />
p.font_b_on()<br />
p.print_text("The Little Box of Poems\n(c)2012 @blogmywiki\nwww.suppertime.co.uk/blogmywiki")<br />
p.font_b_off()<br />
p.linefeed()<br />
p.linefeed()<br />
p.linefeed()<br />
</code></p>
<p>7) Follow the Geek Gurl Diaries bit on adding a button, making sure you modify the GPIO script to call your poem.py script when you press the big red shiny button. The line that reads:<br />
<code>os.system("/usr/games/fortune -s science | python ggd_printer4.py")</code><br />
should be changed to read something like:<br />
<code>os.system("python poem.py")</code><br />
When I did this I got an error saying &#8216;no module named RPi-GPIO&#8217; (I may have skipped something earlier) so I had to do a bit of installing at the command line:</p>
<p><code>sudo apt-get update<br />
sudo apt-get install python-dev<br />
sudo apt-get install python-rpi.gpio</code></p>
<p>I also had to run the GPIO script calling poem.py as root (typing <code>sudo</code> before the command) otherwise I got an error saying <code>no access to /dev/mem</code>. I&#8217;ve not made it run automatically at startup yet, but the Geek Gurl Diaries blog tells you how to do that.</p>
<p><strong>No TV? No problem!</strong></p>
<p>One of the problems with the Raspberry Pi is that you need a TV connected to it. In the school holidays the TV is in heavy demand from the kids, so as everything I need to do is on the command line anyway, I decided to plug the Pi into the house broadband router by ethernet and log into the Pi using SSH. You can do this, for example from the OS X terminal:</p>
<p><a title="Injecting a Pi filling to my Box o'Poems by gilesbooth, on Flickr" href="http://www.flickr.com/photos/gilesbooth/8322462831/"><img src="http://farm9.staticflickr.com/8497/8322462831_3b16b9e402.jpg" alt="Injecting a Pi filling to my Box o'Poems" width="500" height="333" /></a></p>
<p>&#8230;or from an iPhone or iPad using an SSH client like Prompt (currently on sale at £1.49 in the iTunes store):</p>
<p><a title="Controlling Raspberry Pi from iPhone SSH client 'Prompt' - currently on sale at £1.49 by gilesbooth, on Flickr" href="http://www.flickr.com/photos/gilesbooth/8329635278/"><img src="http://farm9.staticflickr.com/8213/8329635278_ef5de5db17.jpg" alt="Controlling Raspberry Pi from iPhone SSH client 'Prompt' - currently on sale at £1.49" width="500" height="333" /></a></p>
<p>You need to know your Pi&#8217;s IP address in order to do this, though, so you may need a keyboard, mouse &amp; screen to start with, or you can run a utility like IP Scan (OS X) to scan your network for devices. Then you should be able to log in to the Pi by typing, for example, at the OS X command line:<br />
<code>ssh pi@192.168.1.190</code><br />
(your IP address will almost certainly be different) and enter <code>raspberry</code> as the password when prompted. Then you&#8217;re logged into your Pi from the comfort of your laptop, iPad, whatever. And the kids can watch the 2,000th episode of Tracy Beaker that day.</p>
<p>One other benefit of using SSH from a laptop or iPhone to a Pi/printer combo in the kitchen is that you can send orders to the staff:</p>
<p><a href="http://www.flickr.com/photos/gilesbooth/8322180943/" title="Important use for thermal printer connected to a Raspberry Pi by gilesbooth, on Flickr"><img src="http://farm9.staticflickr.com/8354/8322180943_014ae97c02.jpg" width="374" height="500" alt="Important use for thermal printer connected to a Raspberry Pi"></a></p>
<p><b>To-do list</b></p>
<p>- Add more poems<br />
- Get image printing to work so I can include a logo or QR code. I just got a black square with the QR code PNG I tried.<br />
- Work out how to power printer and Pi off one power supply.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2012/12/pi-poems/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Kids in America: Newtown and Twitter</title>
		<link>http://www.suppertime.co.uk/blogmywiki/2012/12/newtown-and-twitter/</link>
		<comments>http://www.suppertime.co.uk/blogmywiki/2012/12/newtown-and-twitter/#comments</comments>
		<pubDate>Sun, 16 Dec 2012 09:27:47 +0000</pubDate>
		<dc:creator>blogmywiki</dc:creator>
				<category><![CDATA[grief]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[gun control]]></category>
		<category><![CDATA[Newtown]]></category>
		<category><![CDATA[NRA]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.suppertime.co.uk/blogmywiki/?p=1139</guid>
		<description><![CDATA[Watching Newtown unfold on Twitter was a strange experience. Like most news now, I first heard of it there, a colleague breaking the news in my timeline. I didn&#8217;t join in with RTs, and there was perhaps slightly less of &#8230; <a href="http://www.suppertime.co.uk/blogmywiki/2012/12/newtown-and-twitter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Watching Newtown unfold on Twitter was a strange experience. Like most news now, I first heard of it there, a colleague breaking the news in my timeline. I didn&#8217;t join in with RTs, and there was perhaps <em>slightly</em> less of the usual eager need to be the first to break the news than you sometimes get, certainly once it was clear that most of the dead were young children. Perhaps it was just too awful.</p>
<p>A respected journalist tweeted &#8216;you shouldn&#8217;t be on Twitter right now if you&#8217;re not tweeting about #Newtown&#8217; &#8211; and I instantly felt bad about tweeting about being turned away from Pizza Express. Then I felt cross that someone was dictating the agenda for the whole of Twitter. Yes, the events were unimaginably awful &#8211; perhaps too awful to comprehend, and therefore there was, for someone so far away, some solace in the usual business of Twitter: sarcasm, funny pictures of cats and a well-refreshed Kim Wilde serenading fellow train passengers. &#8216;Kids in America&#8217; &#8211; the dreadful irony didn&#8217;t even occur to me.</p>
<p>Part of me felt slightly detached from Newtown because I was not surprised. Have gun laws in the US changed since the last mass shooting? No? Well, there you go then. But I also felt a bit queasy watching my fellow Brits getting into arguments on Twitter with members of the NRA. I felt that it&#8217;s not our fight, the NRA are not likely to respond to foreigners telling them how to run their country. American citizens have to sort this out themselves.</p>
<p>So what can we do? We can share the unimaginable grief. We can wonder at some of the extraordinary acts of heroism. And we can share the experience of Dunblane and cold, hard statistical facts about deaths from handguns in countries like the United Kingdom which have far stricter gun control than the US.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.suppertime.co.uk/blogmywiki/2012/12/newtown-and-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
