<?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>e-paper &#8211; Matthew Petroff</title>
	<atom:link href="https://mpetroff.net/tag/e-paper/feed/" rel="self" type="application/rss+xml" />
	<link>https://mpetroff.net</link>
	<description>mpetroff.net</description>
	<lastBuildDate>Wed, 30 Nov 2016 02:24:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Kindle Weather Display</title>
		<link>https://mpetroff.net/2012/09/kindle-weather-display/</link>
					<comments>https://mpetroff.net/2012/09/kindle-weather-display/#comments</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Fri, 14 Sep 2012 20:10:11 +0000</pubDate>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[e-paper]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[weather]]></category>
		<guid isPermaLink="false">http://www.mpetroff.net/?p=670</guid>

					<description><![CDATA[Ever since I first learned about electronic paper, I&#8217;ve thought it would be perfect to display some sort of regularly updated, but not real-time, data such as the current date, an agenda, or the weather forecast. Unfortunately, e-paper displays have &#8230; <a href="https://mpetroff.net/2012/09/kindle-weather-display/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">E</span>ver since I first learned about electronic paper, I&#8217;ve thought it would be perfect to display some sort of regularly updated, but not real-time, data such as the current date, an agenda, or the weather forecast. Unfortunately, e-paper displays have always cost more than I was willing to spend on such a project. However, with the price of Amazon&#8217;s cheapest Kindle recently dropped to $69, I decided e-paper displays were finally cheap enough for me to pursue such a project: an e-paper based weather forecast display.</p>
<p style="text-align: center;"><a href="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display.jpg" title="Kindle Displaying Weather Forecast" data-sbox="670"><img decoding="async" class=" wp-image-674  aligncenter" title="Kindle Displaying Weather Forecast" src="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display-640x427.jpg" alt="" width="640" height="427" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display-640x427.jpg 640w, https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display-300x200.jpg 300w, https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display-1280x853.jpg 1280w, https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display.jpg 1500w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p style="text-align: left;"><span id="more-670"></span></p>
<p>The system consists of two parts, one running on the wall-mounted Kindle and one running on a server. The server fetches and processes weather data to create an image, and the Kindle downloads and displays it. While the Kindle is capable of handling both parts, I already had a server, and utilizing it saved me the time and hassle of setting up a build environment for the Kindle.</p>
<p>The server side of the system uses shell and Python scripts to convert weather forecast data into an image for the Kindle. The scripts first download and parse forecast data from NOAA via the <a href="http://graphical.weather.gov/xml/">National Digital Forecast Database XML/SOAP Service</a>. After parsing the data, the data then needs to be converted into an image. This is accomplished by preprocessing a specially crafted SVG file to insert temperatures, forecast symbols, and days of the week. This SVG is then rendered as a PNG using <a href="http://developer.gnome.org/rsvg/stable/">rsvg-convert</a> and converted to a grayscale, no transparency color space as required by the Kindle using <a href="http://pmt.sourceforge.net/pngcrush/">pngcrush</a>. Finally, it is copied to a public location on the web server.</p>
<div id="attachment_677" style="width: 610px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-677" class="size-full wp-image-677 " title="Weather Icons" src="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/icons.png" alt="" width="600" height="1000" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/icons.png 600w, https://cdn0.mpetroff.net/wp-content/uploads/2012/09/icons-180x300.png 180w, https://cdn0.mpetroff.net/wp-content/uploads/2012/09/icons-576x960.png 576w" sizes="auto, (max-width: 600px) 100vw, 600px" /><p id="caption-attachment-677" class="wp-caption-text">Weather Icons Used for Forecasts</p></div>
<p>Before running anything on the Kindle, one must first jailbreak it and obtain shell access; this is left as an exercise for the reader. The Kindle portion of the system consists of a shell script that downloads the rendered image from the server, clears the screen twice to prevent ghosting, and then displays the image on the Kindle&#8217;s screen. On both the server and the Kindle, cron is used to execute the required scripts twice a day, with the server executing its scripts five minutes earlier than the Kindle to ensure a new image is ready. In addition, the Kindle requires an initialization script to disable the framework and power daemons to prevent the screen from being overwritten and to prevent the Kindle from going into sleep mode, which would disable the WiFi as well as cron, preventing any forecast updates. This initialization script was made easily accessible on power on of the Kindle using <a href="http://www.mobileread.com/forums/showthread.php?t=168270">kite</a>.</p>
<p>To create the icons, I started off with public domain icons from the <a href="http://thenounproject.com/">Noun Project</a>. Either using pieces of these icons or from scratch, I created icons for the weather conditions there were no icons available for and for those where there were no public domain versions. I am releasing the icons under the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 Public Domain Dedication</a> and the source code for the scripts under the <a href="http://opensource.org/licenses/mit-license.php">MIT License</a>.</p>
<p>Files:<br />
<a href="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/weather-icons.zip">Weather Icons</a><br />
Source: <a href="https://cdn0.mpetroff.net/wp-content/uploads/2012/09/kindle-weather-display.tar.xz">Archive</a>, <a href="https://github.com/mpetroff/kindle-weather-display">GitHub</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2012/09/kindle-weather-display/feed/</wfw:commentRss>
			<slash:comments>122</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn0.mpetroff.net
Minified using Disk

Served from: mpetroff.net @ 2026-03-30 17:46:52 by W3 Total Cache
-->