<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>odyssey through technology</title>
	<atom:link href="http://jumptuck.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jumptuck.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sun, 16 Aug 2009 19:07:59 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jumptuck.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2eaa7a8670d410653fa5cffe6a5b5704?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>odyssey through technology</title>
		<link>http://jumptuck.wordpress.com</link>
	</image>
			<item>
		<title>Translating easy board design into easy code.</title>
		<link>http://jumptuck.wordpress.com/2009/08/16/easy-code-vs-easy-design/</link>
		<comments>http://jumptuck.wordpress.com/2009/08/16/easy-code-vs-easy-design/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 18:52:40 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=213</guid>
		<description><![CDATA[I&#8217;ve been working with some 7 segment displays lately.  I found an old computer on the side of the road and pulled a 3-digit display out of it.  The hundreds digit can only display a 1 and it has no decimal points.  After pulling it off of the board I find that it is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=213&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://jumptuck.files.wordpress.com/2009/08/7-segment_finished.jpg"><img class="alignleft size-thumbnail wp-image-221" title="7-segment_finished" src="http://jumptuck.files.wordpress.com/2009/08/7-segment_finished.jpg?w=150&#038;h=85" alt="7-segment_finished" width="150" height="85" /></a>I&#8217;ve been working with some 7 segment displays lately.  I found an old computer on the side of the road and pulled a 3-digit display out of it.  The hundreds digit can only display a 1 and it has no decimal points.  After pulling it off of the board I find that it is a 16-pin module; one pin is common anode, one pin is the cathode for both segments of the hundreds digit, and the other 14 pins are cathode pins for one segment each.</p>
<p>I did some breadboarding with this module and was able to get things working pretty easily.  When I decided to do some PCB design things became more complicated.  For ease of programming I had connected all of the segments of the ones digit to PortD of an ATtiny2313.  I then connected all of the segments of the tens digit as well as the single pin for hundreds to PortB.  This setup makes for easy coding as each number you want to display can be stored as an 8-bit char and written directly the the Port for the corresponding digit.  The problem is that the board design to match this is not at all easy.<span id="more-213"></span></p>
<p>For me, the coding is much easier than creating the board.  I prefer one-sided designs and try to avoid passing traces between dip-pads if possible.  This can be accomplished but not at the same time as keeping all the segments of one digit on the same Port of an AVR chip.  So the challenge presented itself: what can I do with code to compensate for the complication that the board design introduced?</p>
<p>I decided on a three step approach:</p>
<ol>
<li>Define a bit setting of each segment of the display.  Pins on one of the two ports will be shifted an additional 8 bits to work with the next two steps.</li>
<li>Use an array of each character you wish to show on each digit of the display.  Characters are stored as a 16-bit int.</li>
<li>When writing to the display, both ports are written using an int from the array in step 2.  The int is cast as a char for the first Port, then shifted 8 bits to the right and used for the second Port.</li>
</ol>
<p><strong>Schematic &amp; Board:</strong></p>
<p><a href="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_schematic.png"><img class="aligncenter size-medium wp-image-217" title="7-segment_Rev1_schematic" src="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_schematic.png?w=300&#038;h=142" alt="7-segment_Rev1_schematic" width="300" height="142" /></a></p>
<p>Note that I am using 1 resistor on the common anode.  I will be driving this circuit with two 1.5v batteries for a total of 3v.  I will ensure that in the code there will never be less than 4 segments on at one time (displays the number 11, otherwise the tens digit will show a zero when displaying a number less than 10).  With four segments illuminated there will be about 25mA to each segment.<a href="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_board.png"><img class="aligncenter size-full wp-image-218" title="7-segment_Rev1_board" src="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_board.png?w=293&#038;h=265" alt="7-segment_Rev1_board" width="293" height="265" /></a></p>
<p><strong>Code:</strong></p>
<p>Step 1 code: Define each segment on the display.  Segments that are connected to Port B will eventually be stored in the Least Significant BYTE of an Int so no need to do any additional shifting there.  Segments controlled by Port D will be stored in the Most Significant BYTE of an Int so they do need to be shifted an additional 8 bits to the left (hence the &#8216;+8&#8242; behind each PD* assignment).</p>
<pre class="brush: cpp;">//Define each segment of each digit of the display
//Segments run by PORTD will be shifted 8 bits to
//the left.  The pin that runs the hundreds digit
//is on PORTB.

#define A0 (1 &lt;&lt; (PD1+8))
#define B0 (1 &lt;&lt; (PD3+8))
#define C0 (1 &lt;&lt; PB0)
#define D0 (1 &lt;&lt; PB2)
#define E0 (1 &lt;&lt; PB1)
#define F0 (1 &lt;&lt; (PD2+8))
#define G0 (1 &lt;&lt; (PD0+8))

#define A1 (1 &lt;&lt; (PD6+8))
#define B1 (1 &lt;&lt; (PD4+8))
#define C1 (1 &lt;&lt; PB6)
#define D1 (1 &lt;&lt; PB4)
#define E1 (1 &lt;&lt; PB5)
#define F1 (1 &lt;&lt; (PD5+8))
#define G1 (1 &lt;&lt; PB7)

#define A2 (1 &lt;&lt; PB3)</pre>
<p>Step 2 code: Construct some arrays that will store all of the settings for both PortB and PortD in and Int (16 bits).  Because all 7 segments of one digit are split between two different ports, we must have separate arrays for each digit (ones and tens).  There is only one pin that controls the hundreds so an addition #define will suffice (the compiler will take care of that rather than using uC space for an array).</p>
<pre class="brush: cpp;">//Use arrays of integers to get masks for
//turning on the appropriate segments needed
//to display a given character.

unsigned int ones[] = {
  (A0 | B0 | C0 | D0 | E0 | F0),	//0
  (B0 | C0),				//1
  (A0 | B0 | D0 | E0 | G0),		//2
  (A0 | B0 | C0 | D0 | G0),		//3
  (B0 | C0 | F0 | G0),			//4
  (A0 | C0 | D0 | F0 | G0),		//5
  (A0 | C0 | D0 | E0 | F0 | G0),	//6
  (A0 | B0 | C0),			//7
  (A0 | B0 | C0 | D0 | E0 | F0 | G0),	//8
  (A0 | B0 | C0 | D0 | F0 | G0)		//9
};

unsigned int tens[] = {
  (A1 | B1 | C1 | D1 | E1 | F1),	//0
  (B1 | C1),				//1
  (A1 | B1 | D1 | E1 | G1),		//2
  (A1 | B1 | C1 | D1 | G1),		//3
  (B1 | C1 | F1 | G1),			//4
  (A1 | C1 | D1 | F1 | G1),		//5
  (A1 | C1 | D1 | E1 | F1 | G1),	//6
  (A1 | B1 | C1),			//7
  (A1 | B1 | C1 | D1 | E1 | F1 | G1),	//8
  (A1 | B1 | C1 | D1 | F1 | G1)		//9
};

#define hundreds A2</pre>
<p>Step 3 code:  A function is used to set a give number &#8216;n&#8217; to the display.  This function separated each digit (one, tens, hundreds) and then performs some bit manipulation to extract the necessary information returned by the arrays we established in step 2.</p>
<pre class="brush: cpp;">void numOut(unsigned char n) {
  unsigned char hundreds_digit = n/100;		//Get hundreds digit from 'n'
  unsigned char tens_digit = (n%100)/10;	//Get tens digit from 'n'
  unsigned char ones_digit = (n%10);		//Get ones digit from 'n'
  unsigned int temp_mask = 0xFFFF;		//Start by masking all pins OFF
  if (hundreds_digit) temp_mask &amp;= ~hundreds;	//If 'n' is greater than 99, set hundreds bit low
  temp_mask &amp;= ~(tens[tens_digit]);		//Set bits for the tens digit low
  temp_mask &amp;= ~(ones[ones_digit]);		//Set bits for the ones digit low
  PORTB = (char)temp_mask;			//Set PORTB with 8 LSB of our mask
  PORTD = (char)(temp_mask &gt;&gt; 8);		//Set PORTD with 8 MSB of our mask
}</pre>
<p>Full working code example (no button support):</p>
<pre class="brush: cpp;">#define F_CPU 1000000UL

#include &lt;avr/io.h&gt;
#include &lt;util/delay.h&gt;

//Define each segment of each digit of the display
//Segments run by PORTD will be shifted 8 bits to
//the left.  The pin that runs the hundreds digit
//is on PORTB.

#define A0 (1 &lt;&lt; (PD1+8))
#define B0 (1 &lt;&lt; (PD3+8))
#define C0 (1 &lt;&lt; PB0)
#define D0 (1 &lt;&lt; PB2)
#define E0 (1 &lt;&lt; PB1)
#define F0 (1 &lt;&lt; (PD2+8))
#define G0 (1 &lt;&lt; (PD0+8))

#define A1 (1 &lt;&lt; (PD6+8))
#define B1 (1 &lt;&lt; (PD4+8))
#define C1 (1 &lt;&lt; PB6)
#define D1 (1 &lt;&lt; PB4)
#define E1 (1 &lt;&lt; PB5)
#define F1 (1 &lt;&lt; (PD5+8))
#define G1 (1 &lt;&lt; PB7)

#define A2 (1 &lt;&lt; PB3)

//Use arrays of integers to get masks for
//turning on the appropriate segments needed
//to display a given character.

unsigned int ones[] = {
  (A0 | B0 | C0 | D0 | E0 | F0),	//0
  (B0 | C0),				//1
  (A0 | B0 | D0 | E0 | G0),		//2
  (A0 | B0 | C0 | D0 | G0),		//3
  (B0 | C0 | F0 | G0),			//4
  (A0 | C0 | D0 | F0 | G0),		//5
  (A0 | C0 | D0 | E0 | F0 | G0),	//6
  (A0 | B0 | C0),			//7
  (A0 | B0 | C0 | D0 | E0 | F0 | G0),	//8
  (A0 | B0 | C0 | D0 | F0 | G0)		//9
};

unsigned int tens[] = {
  (A1 | B1 | C1 | D1 | E1 | F1),	//0
  (B1 | C1),				//1
  (A1 | B1 | D1 | E1 | G1),		//2
  (A1 | B1 | C1 | D1 | G1),		//3
  (B1 | C1 | F1 | G1),			//4
  (A1 | C1 | D1 | F1 | G1),		//5
  (A1 | C1 | D1 | E1 | F1 | G1),	//6
  (A1 | B1 | C1),			//7
  (A1 | B1 | C1 | D1 | E1 | F1 | G1),	//8
  (A1 | B1 | C1 | D1 | F1 | G1)		//9
};

#define hundreds A2

void InitPorts(void)
{
  //Note:  Our 7-segment display is common
  //anode so driving pins LOW turns them on,
  //driving pins HIGH turns them off.

  DDRB |= 0xFF;		//Set Register B as Outputs
  PORTB |= 0xFF;	//Set Port B high (off)
  DDRD |= 0xFF;		//Set Register D as Outputs
  PORTD |= 0xFF;	//Set Port B high (off)
}

void numOut(unsigned char n) {
  unsigned char hundreds_digit = n/100;		//Get hundreds digit from &amp;#39;n&amp;#39;
  unsigned char tens_digit = (n%100)/10;	//Get tens digit from &amp;#39;n&amp;#39;
  unsigned char ones_digit = (n%10);		//Get ones digit from &amp;#39;n&amp;#39;
  unsigned int temp_mask = 0xFFFF;		//Start by masking all pins OFF
  if (hundreds_digit) temp_mask &amp;= ~hundreds;	//If &amp;#39;n&amp;#39; is greater than 99, set hundreds bit low
  temp_mask &amp;= ~(tens[tens_digit]);		//Set bits for the tens digit low
  temp_mask &amp;= ~(ones[ones_digit]);		//Set bits for the ones digit low
  PORTB = (char)temp_mask;			//Set PORTB with 8 LSB of our mask
  PORTD = (char)(temp_mask &gt;&gt; 8);		//Set PORTD with 8 MSB of our mask
}

int main(void) {
  InitPorts();

  while(1) {
    for (unsigned char i=0; i&lt;200; i++)
    {
      numOut(i);
      _delay_ms(200);
    }
  }
}</pre>
<p>This works out quite well.  It uses a bit more coding space than before but it does the trick.  I&#8217;ll certainly use this method in the future.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/213/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=213&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/08/16/easy-code-vs-easy-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/08/7-segment_finished.jpg?w=150" medium="image">
			<media:title type="html">7-segment_finished</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_schematic.png?w=300" medium="image">
			<media:title type="html">7-segment_Rev1_schematic</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/08/7-segment_rev1_board.png" medium="image">
			<media:title type="html">7-segment_Rev1_board</media:title>
		</media:content>
	</item>
		<item>
		<title>RSS Reader using AVR mega8</title>
		<link>http://jumptuck.wordpress.com/2009/02/25/dragon_rss/</link>
		<comments>http://jumptuck.wordpress.com/2009/02/25/dragon_rss/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 19:01:31 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=182</guid>
		<description><![CDATA[I spent part of an afternoon developing a hardware RSS reader (most of my time was spent on the python side of things).

It&#8217;s pretty simple and uses an AVR microcontroller connected to a computer via a serial cable.


Hardware
I am using the Dragon Rider 500 as a development board.  This provides all of the hardware [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=182&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I spent part of an afternoon developing a hardware RSS reader (most of my time was spent on the python side of things).<br />
<span style="text-align:center; display: block;"><a href="http://jumptuck.wordpress.com/2009/02/25/dragon_rss/"><img src="http://img.youtube.com/vi/QZMm5AMRi8g/2.jpg" alt="" /></a></span></p>
<p>It&#8217;s pretty simple and uses an AVR microcontroller connected to a computer via a serial cable.<br />
<a href="http://jumptuck.files.wordpress.com/2009/02/x1.png"><img class="aligncenter size-medium wp-image-198" title="x1" src="http://jumptuck.files.wordpress.com/2009/02/x1.png?w=300&#038;h=225" alt="x1" width="300" height="225" /></a><br />
<span id="more-182"></span><br />
<strong>Hardware</strong></p>
<p>I am using the <a href="http://www.ecrostech.com/AtmelAvr/DragonRider/">Dragon Rider 500</a> as a development board.  This provides all of the hardware you need (assuming you have all of the add-on kits).  That being said you certainly can do this with your own hardware setup:</p>
<ul>
<li> ATmega8 microcontroller (or any that has a USART and enough pins for all connections)</li>
<li>A way to program the microcontroller (I use the AVR Dragon)</li>
<li>MAX232 chip for the serial communications</li>
<li>DB9 connector</li>
<li>HD44780 LCD screen</li>
<li>Crystal (I used an 8MHz crystal)</li>
<li>Assorted capacitors and resistors</li>
</ul>
<p><a href="http://jumptuck.files.wordpress.com/2009/02/dragon_rss_schematic1.png"><img class="size-thumbnail wp-image-208 alignleft" title="dragon_rss_schematic1" src="http://jumptuck.files.wordpress.com/2009/02/dragon_rss_schematic1.png?w=150&#038;h=137" alt="dragon_rss_schematic1" width="150" height="137" /></a>On the Dragon Rider we will need to use some creativity to Route the connections.  Normally Port D could be connected directly to the LCD header.  This is not the case here because the USART needed for the serial connection uses PD0 and PD1.  Furthermore, Port B cannot be used because PB6 and PB7 are in use for the external crystal.</p>
<p><a href="http://jumptuck.files.wordpress.com/2009/02/lcd_jumper.jpg"><img class="alignleft size-thumbnail wp-image-188" title="lcd_jumper" src="http://jumptuck.files.wordpress.com/2009/02/lcd_jumper.jpg?w=128&#038;h=95" alt="lcd_jumper" width="128" height="95" /></a>In this pictured you can see my solution to this problem.  I pluged in a ribbon cable into the headers for the LCD, Port B, and Port D.  I then use jumper wires to make the proper routes.  Don&#8217;t forget to hook up voltage and ground to the LCD header.</p>
<p><strong>Software</strong></p>
<p>The software for this project comes in two parts, the firmware for the microcontroller and the python script for scraping the RSS feeds and sending them over the serial connection.</p>
<h4><span style="text-decoration:underline;">AVR Firmware</span></h4>
<p>I&#8217;m using Peter Fleury&#8217;s LCD library again (<a href="http://jump.to/fleury">http://jump.to/fleury</a>).  It&#8217;s powerful, concise, versatile, and easy to alter for your hardware setup.  If you look at the header file attached (lcd.h) you will see that I&#8217;m running in 4-bit mode with Port D as the data bits, and Port B as the control bits.</p>
<p>The concept of this firmware is pretty simple:</p>
<ul>
<li>Once powered up the microcontroller displays &#8220;RSS Reader&#8221; and then waits for serial data.</li>
<li>Each byte of serial data received causes a buffer of 16 chars to shift left and add the byte to the buffer, then display the buffer.</li>
<li>Three special commands are accepted by the microcontroller: 0&#215;00, 0&#215;01, and 0&#215;02.  These are clear screen, move to line 0, and move to line 1 respectively.</li>
</ul>
<h4><span style="text-decoration:underline;">Python Scrypt</span></h4>
<p>I wrote a pyton script to scrape the RSS data and send it over the serial connection.  This requires the  <a href="http://pyserial.wiki.sourceforge.net/pySerial">python module &#8220;pyserial&#8221;</a> which you will have to install on your system to get this to work.</p>
<p>The RSS feed can be configured at the top of the pyton file.  Notice that you need to enter a name for the feed as well as the feed url.  There are three examples there, I&#8217;m certain you can follow those for the proper syntax.</p>
<p><strong>Making it all work</strong></p>
<ol>
<li>Assemble the hardware</li>
<li>Program the microcontroller (m8-Serial_Comm.hex can be used if you don&#8217;t want to compile this yourself).  Fuse settings for ATmega8 using an 8 MHz crystal: lfuse= 0xEF hfuse=0xD9</li>
<li>Power up the Dragon Rider and make sure the serial cable is plugged in (LCD should read: &#8220;RSS Reader&#8221;)</li>
<li>Execute the python program (python serial_rss.py)</li>
<li>Enjoy</li>
</ol>
<p><iframe src='http://digg.com/api/diggthis.php?u=http%3A%2F%2Fdigg.com%2Fhardware%2FDIY_RSS_ticker_using_AVR_LCD_and_Python%23' height='82' width='55' frameborder='0' scrolling='no' style='float: right; margin-left: 10px; margin-bottom: 5px; padding: 4px 0 2px 4px; background: #fff;'></iframe></p>
<p><strong>Downloading the Source Files</strong><br />
I can&#8217;t host .zip files on wordpress.com.  Because of this you will need to <a href="http://www.instructables.com/id/SQF43BHFRL5ICPG/">visit instructables.com</a> to download the package for this project (sorry for the inconvenience).</p>
<p><a href="http://www.instructables.com/files/orig/FDO/9LR1/FRL5ICWA/FDO9LR1FRL5ICWA.zip">Dragon_RSS.zip</a></p>
<p><strong>Update:</strong><br />
I have since discovered that my python scraper was done the hard way.  Here is a new version of the python script using the &#8220;feedparser&#8221; module.</p>
<pre class="brush: python;">#Rev3 2/27/09

#RSS feed Urls: Enter only the url, titles will be pulled down from feed.
rss_urls = (
        'http://hackaday.com/feed/rss',
	'http://rss.slashdot.org/Slashdot/slashdot',
	'http://feeds.digg.com/digg/popular.rss',
	'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml'
	)
charDelay = 0.2 #Seconds to delay before pringing next character.

max_feed_items = 0 #Maximum number of articles to scroll from each feed (0=unlimited).

import feedparser
import serial
import time
import unicodedata

#setup RS232 communitcations protocol
ser = serial.Serial(0, 9600, stopbits=2)

def unicode2ascii(myString):
    #Convert unicode to ascii, replacing characters that don't exist in ascii with '?'
    return unicodedata.normalize('NFKD', myString).encode('ascii','replace')

def serial_scroll(myString):
    for char in range(len(myString)):
        #Write the next character in the string
        ser.write(myString[char])
        #Pause for scrolling effect
        time.sleep(charDelay)

def write_feed_title(myTitle):
        ser.write(chr(0x00)) #clear lcd
        ser.write(chr(0x01)) #tell lcd to write to line 0
        #Write title so that it is left-aligned (on 16 character display)
        s = myTitle + (' ' * (16-len(myTitle)))
        ser.write(s[:16])

def display_article_titles(feed):
    #tell lcd to write to line 1
    ser.write(chr(0x02))
    for item in range(len(feed.entries)):
        s = unicode2ascii(feed.entries[item].title)
        serial_scroll(str(s))
        #Check for how many story titles to display
        if item &gt;= (max_feed_items-1) and max_feed_items != 0:
            #Scroll spaces to clear screen
            serial_scroll(' ' * 16)
            return
        serial_scroll(' --- ')

while 1:
    for feed in range(len(rss_urls)):
        curFeed = feedparser.parse(rss_urls[feed])
        write_feed_title(unicode2ascii(curFeed.feed.title))
        display_article_titles(curFeed)
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=182&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/02/25/dragon_rss/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/QZMm5AMRi8g/2.jpg" medium="image" />

		<media:content url="http://jumptuck.files.wordpress.com/2009/02/x1.png?w=300" medium="image">
			<media:title type="html">x1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/02/dragon_rss_schematic1.png?w=150" medium="image">
			<media:title type="html">dragon_rss_schematic1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/02/lcd_jumper.jpg?w=128" medium="image">
			<media:title type="html">lcd_jumper</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu FTP Server</title>
		<link>http://jumptuck.wordpress.com/2009/02/20/ubuntu-ftp-server/</link>
		<comments>http://jumptuck.wordpress.com/2009/02/20/ubuntu-ftp-server/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 23:16:27 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=175</guid>
		<description><![CDATA[Today I noticed that WordPress has a new version out (2.7.1).  I don&#8217;t have an ftp server setup on my Ubuntu box so I&#8217;m unable to use the automatic upgrade.  It&#8217;s not really a problem to upgrade manually, I usually tunnel in over ssh and then use &#8220;wget&#8221; to download the new package.  But, why [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=175&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I noticed that WordPress has a new version out (2.7.1).  I don&#8217;t have an ftp server setup on my Ubuntu box so I&#8217;m unable to use the automatic upgrade.  It&#8217;s not really a problem to upgrade manually, I usually tunnel in over ssh and then use &#8220;wget&#8221; to download the new package.  But, why not set up ftp and try it out the easy way?<br />
<span id="more-175"></span><br />
After a bit of looking around I decided to use proftpd for the server.  It&#8217;s in the universe repository on ubuntu so installation is a snap:</p>
<pre class="brush: css;">sudo apt-get install proftpd</pre>
<p>You will get the customary blue screen asking for input, just choose &#8220;standalone&#8221; and press enter.</p>
<p>Next I want to make sure that my default directory is /var/www/wordpress.  This is necessary for the wordpress automatic upgrade to work.  We need to edit the proftpd.conf file.  Use your favorite text editor, I used nano:</p>
<pre class="brush: css;">sudo nano /etc/proftpd/proftpd.conf</pre>
<p>We need to insert the bit that redirects.  I will redirect all users that are in the group &#8220;gustav&#8221; to the directory I want:</p>
<pre class="brush: css;">DefaultRoot /var/www/wordpress gustav</pre>
<p>Now restart proftpd:</p>
<pre class="brush: css;">sudo /etc/init.d/proftpd restart</pre>
<p>Lastly, make sure if you have a router or firewall you open up port 21, then give it a try.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=175&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/02/20/ubuntu-ftp-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>
	</item>
		<item>
		<title>What will replace my Palm?</title>
		<link>http://jumptuck.wordpress.com/2009/02/18/what-will-replace-my-palm/</link>
		<comments>http://jumptuck.wordpress.com/2009/02/18/what-will-replace-my-palm/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 15:38:40 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[Consumer Electronics]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=164</guid>
		<description><![CDATA[
I have been a Palm user since 1999.  I have long depended on my Palm for my schedule, my address book, my check book, my e-reader, and as an alternative to carrying pictures in my wallet (I don&#8217;t carry a wallet).  I love the fact that I can easily sync everything for access [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=164&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="size-thumbnail wp-image-165 alignleft" title="tungsten_e2_dayview_s" src="http://jumptuck.files.wordpress.com/2009/02/tungsten_e2_dayview_s.jpg?w=83&#038;h=96" alt="Palm Tungsten e2" width="83" height="96" /></p>
<p>I have been a Palm user since 1999.  I have long depended on my Palm for my schedule, my address book, my check book, my e-reader, and as an alternative to carrying pictures in my wallet (I don&#8217;t carry a wallet).  I love the fact that I can easily sync everything for access on my desktop or in case I lose my Palm and therefore, my schedule book (what a nightmare to lose all my scheduling!).</p>
<p>I currently have the Palm Tungsten e2 and am very happy with it.  The battery life is great, the screen gorgeous, and it&#8217;s a pretty fast device.  Better yet, it is very easy to sync it with my Ubuntu 8.10 desktop (linux) using j-pilot.  But, palm is no longer making non-smartphone devices.  Looking toward the future, what am I going to replace this device with?<br />
<span id="more-164"></span></p>
<p><strong>Prerequisites:</strong><br />
There are a few things I simply must have in a replacement PDA.</p>
<ul>
<li>Scheduling</li>
<li>Address Book</li>
<li>E-reader</li>
<li>Sync with linux</li>
</ul>
<p>There are also things I don&#8217;t really care for.  I&#8217;m not looking for a phone that does it all.  Right now if I run the battery down on my Palm it&#8217;s not the end of the world.  If I run the battery down on my phone it can be a big problem.  So I&#8217;d rather keep the two separate.</p>
<p>Secondly, I don&#8217;t require internet.  It is a nice option that I&#8217;d probably use, but not if it requires a subscription plan.</p>
<p><strong>The Contenders:</strong></p>
<h4 style="padding-left:30px;">Ipod Touch</h4>
<p style="padding-left:30px;">I have a good friend with an Ipod touch.  It seems to do everything and have everything I might want in a PDA.  It is missing one <strong>extremely</strong> important function: there&#8217;s no way to sync it with a linux OS.  There are hacks and work arounds that will get music on and off of the thing for you, but currently no work-around for syncing the calendar (which is the whole point for me).   Why Apple? Why?</p>
<h4 style="padding-left:30px;">Android</h4>
<p style="padding-left:30px;">The Google Android OS for smart-phones might be an option.  Like I said, I don&#8217;t want a phone that does everything.  My hope is that some day the hardware is available to give me the features I need without a phone, or without the necessity of having a phone plan with it.  We&#8217;ll see.</p>
<p>I guess I&#8217;ll just keep searching as I wait for the perfect replacement to appear on the market.  I&#8217;ve go the dollars to spend but no product to spend them on.  Perhaps I need to develop and sell my own solution?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=164&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/02/18/what-will-replace-my-palm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/02/tungsten_e2_dayview_s.jpg?w=83" medium="image">
			<media:title type="html">tungsten_e2_dayview_s</media:title>
		</media:content>
	</item>
		<item>
		<title>WordPress Theme Design</title>
		<link>http://jumptuck.wordpress.com/2009/02/02/wordpress-theme-design/</link>
		<comments>http://jumptuck.wordpress.com/2009/02/02/wordpress-theme-design/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 18:21:40 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=153</guid>
		<description><![CDATA[Over the last year I&#8217;ve really adopted the use of wordpress not only as a blogging platfrom but as a content management system (CMS).  I have now helped set up three different organizations with wordpress as a replacement for their previously hard-coded website content.  Through this process I discovered that it is actually incredibly easy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=153&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Over the last year I&#8217;ve really adopted the use of wordpress not only as a blogging platfrom but as a content management system (CMS).  I have now helped set up three different organizations with wordpress as a replacement for their previously hard-coded website content.  Through this process I discovered that it is actually incredibly easy to take an already pristing (fully validated and tweaked for IE bugs) css website and convert it to a wordpress theme.  Here&#8217;s some of the things I learned in my adventures.<br />
<span id="more-153"></span></p>
<h2>Start with a good model</h2>
<p>The first big hurdle is to start with a good model for your theme.  I still haven&#8217;t figured out what is the best example (for reasons I&#8217;ll share in a moment) but I have found the bad ones.</p>
<div id="attachment_154" class="wp-caption alignleft" style="width: 136px"><a href="http://jumptuck.files.wordpress.com/2009/02/kubrick_snap.jpg"><img class="size-thumbnail wp-image-154" title="kubrick_snap" src="http://jumptuck.files.wordpress.com/2009/02/kubrick_snap.jpg?w=126&#038;h=96" alt="&quot;Kubrick&quot;" width="126" height="96" /></a><p class="wp-caption-text">WordPress Default Theme: &quot;Kubrick&quot;</p></div>
<p>Do not start with &#8220;kubrik&#8221; which is the default theme for all versions of wordpress.  I find that the CSS is arranged in a way that makes it hard to find the classes you are trying to work with.  In general the css layout itself separates arrancement from asthetic (the colors for the sidebar are in a separate section from the width of the sidebar, etc.).</p>
<p>So what should you use instead of Kubrick?  To tell you the truth I don&#8217;t know.  Because the recent release of WordPress 2.7 included some inproved css class functionality many themes aren&#8217;t yet updated for this.  My advice would be to get several themes that look great and then check out the style.css file.  If it looks well organized and condusive to incorporating the css layout your are trying to merge then use it.  In the end you will want to check all of the template files to make sure they do what you want them to as well as incorporate the new feature of wordpress.  You want the work you do now to be as up-to-date as possible so the in the future it will be easy to tweak your theme to keep up with development (and embrace new features).</p>
<h2>Example Content</h2>
<p>Working with a wordpress install devoid of content is like painting in the dark.  Having a test site that is full of content will allow you to view how your layout effects every aspect of the content you are using.  Luckily there is sample content available from <a href="http://wpcandy.com/">WPcandy</a> that you can download from <a href="http://wpcandy.com/articles/easier-theme-development-with-the-sample-post-collection.html">this post</a>.  Import it into your test site and you will have the give of multiple pages and posts exhibiting every aspect of wordpress: Images of all alignments, all types of comments, all types of lists, all types of headers&#8230;. everything!</p>
<p>One word of caution with this sample content.  It will not validate as XHTML strict because some of the photos have a depricated option of &#8220;align: right&#8221; in the img tags.  This can be edited out easily enough (I did) and will not be a problem if you are designing for XHTML transitional.</p>
<h2>Let the Merge Begin!</h2>
<p>You should really look at this as a merging of wordpres with your previously designed site.  I opened up my original style.css from the hard-coded site next to the style.css from my model wordpress theme.  You need to find the class names of your wordpress model that fit the css layout from your previous webpage.</p>
<p>Start copying over your layout to the wordpress css file.  The names will change but the layout will remain the same.  Don&#8217;t forget to copy over any images that your previous design used.  Put them in your wordpress themes folder (I store them in a folder called &#8216;images&#8217;&#8230; go figure) and link to them in the css just like you normally would.  Save frequently and refresh your page to see the results.</p>
<h2>Changing the Template Files</h2>
<p>Eventually you will have done all you can with merging the CSS files.  There may be a need to add classes and tags to the wordpress templates themselves.  This is pretty simple and just requires the ability to read a bit of the php function calls.  One you find what you are looking for wrap it in the tags that you need.</p>
<p>For instance if you need everying that is not the header or the footer to be in the css class &#8220;main_container&#8221; just add div tags after the php function call for the header and before the function call for the footer.  It would look something like this:</p>
<pre class="brush: php;">
&lt;?php get_header(); ?&gt;
&lt;div id=&quot;main_container&gt;

    /* all of the main page content will be here */

    &lt;?php get_sidebar(); ?&gt;&lt;/div&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>You can then style your new class &#8220;main_container&#8221; like normal:</p>
<pre class="brush: css;">
#main_container {
    margin: 0 auto;
    background: grey;
    color: blue;
}
</pre>
<p>Good luck, I hope this helps!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=153&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/02/02/wordpress-theme-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2009/02/kubrick_snap.jpg?w=126" medium="image">
			<media:title type="html">kubrick_snap</media:title>
		</media:content>
	</item>
		<item>
		<title>WordPress on non-standard port (not Port 80)</title>
		<link>http://jumptuck.wordpress.com/2009/01/09/wordpress-on-non-standard-port-not-port-80/</link>
		<comments>http://jumptuck.wordpress.com/2009/01/09/wordpress-on-non-standard-port-not-port-80/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 22:48:37 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[port forwarding]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/2009/01/09/wordpress-on-non-standard-port-not-port-80/</guid>
		<description><![CDATA[I have a copy of wordpress running on my home server as well as on wordpress.com.  At home my ISP blocks several common ports (Port 80, Port 21, etc).  Because of this I have to use port forwarding with my router in order to serve webpages.
I use www.dyndns.com to give my dynamic IP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=150&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have a copy of wordpress running on my home server as well as on wordpress.com.  At home my ISP blocks several common ports (Port 80, Port 21, etc).  Because of this I have to use port forwarding with my router in order to serve webpages.</p>
<p>I use <a href="http://www.dyndns.com/">www.dyndns.com</a> to give my dynamic IP address a more easy to remember name (ie:  yourmadeupword.homelinux.org).  This works well except that I have to add the non-standard port at the end:  http://yourmadeupword.homelinux.org:3333</p>
<p>This is all fine and good except when it comes to wordpress.  After installation I could not figure out why I wasn&#8217;t getting to my blog from outside the house.  When I try I keep getting redirected to the url <em>without</em> the port number at the end.</p>
<p>Well, after much searching, I found you need to make sure you have wordpress set up for that specific port.</p>
<p>Log in as administrator, go to settings and click general.  Change both urls listed there to include the port number you will be using.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=150&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2009/01/09/wordpress-on-non-standard-port-not-port-80/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>
	</item>
		<item>
		<title>AVR Development in Eclipse IDE (Part 2)</title>
		<link>http://jumptuck.wordpress.com/2008/12/13/avr-in-eclipse-ide-part-2/</link>
		<comments>http://jumptuck.wordpress.com/2008/12/13/avr-in-eclipse-ide-part-2/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 02:21:12 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse avr-eclipse gnu99]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=137</guid>
		<description><![CDATA[I&#8217;ve been using Eclipse for a week or two now.  I must say I do like the added features (I was using kate text editor and the command line before).
Subversion
I&#8217;m using the subversion plugin for eclipse called Subversive.  It makes everything quite a bit easier with point-and-click checkouts, commits, and updates.  I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=137&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been using Eclipse for a week or two now.  I must say I do like the added features (I was using kate text editor and the command line before).</p>
<p><strong>Subversion</strong><br />
I&#8217;m using the subversion plugin for eclipse called Subversive.  It makes everything quite a bit easier with point-and-click checkouts, commits, and updates.  I also appreciate the ability to compare code in side-by-side windows.  If working on larger projects with several developers the functionality that eclipse provides is invaluable.</p>
<p><strong>Compiler Flags</strong><br />
I found there are a few compiler flags I&#8217;m used to that aren&#8217;t run by default in eclipse.<span id="more-137"></span></p>
<p>I discovered the first when I received an error while compiling:</p>
<blockquote><p>error: ‘for’ loop initial declaration used outside C99 mode</p></blockquote>
<p>This is due to variable declarations withing &#8220;for&#8221; statements:</p>
<blockquote><p>for (unsigned char i=0; i&lt;4; i++)</p></blockquote>
<p>This isn&#8217;t allowed until the c99 standard, which the compiler doesn&#8217;t use by default, but must be told to do so.</p>
<p>The seconds problem I encountered was with the size of compiled HEX files.  Using Eclipse to compile a program I was ending up with a hex file that was 9124 bytes.  When compiled with a makefile I had been using previously I was getting a 6288 bytes in size.  Obviously this size difference is a problem.  <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=72439">With some help</a> from curtvm over at avrfreaks.net I discovered that the math library was not being used by ecplipse when compiling.</p>
<p><strong>Solutions</strong><br />
Both of these issues are rather simple to fix.  All we need to do is add the appropriate flags within the settings of eclipse.</p>
<ul>
<li>Right-click on your project name and select Properties</li>
<li>Expand C/C++ build and click on Settings</li>
<li>Under AVR Compiler click on Miscellaneous</li>
<li>In the &#8220;other flags&#8221; box add &#8220;-std=gnu99&#8243;</li>
<li>Now at the left expand AVR C Linker and click on Libraries</li>
<li>In the box under &#8220;Libraries (-l) click the Add&#8230; button and put the letter &#8220;m&#8221; in (nothing else needed).</li>
<li>Click OK to finish up</li>
</ul>
<p>That should pretty much fix things up.  It worked for me!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=137&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2008/12/13/avr-in-eclipse-ide-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>
	</item>
		<item>
		<title>AVR Development using Eclipse</title>
		<link>http://jumptuck.wordpress.com/2008/12/06/avr-development-using-eclipse/</link>
		<comments>http://jumptuck.wordpress.com/2008/12/06/avr-development-using-eclipse/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 21:40:18 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=134</guid>
		<description><![CDATA[I&#8217;ve just today set up and started using Eclipse as an IDE for AVR development.  I got here in a rather roundabout way.  My current project is a tetris-like game played on a 3595 lcd screen.  I&#8217;m having a bit of trouble with the scalability of the playing area and needed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=134&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve just today set up and started using Eclipse as an IDE for AVR development.  I got here in a rather roundabout way.  My current project is a tetris-like game played on a 3595 lcd screen.  I&#8217;m having a bit of trouble with the scalability of the playing area and needed to do some debugging.  I installed avarice and avr-gdb and did a bit of debug-wire work with those for the first time, but I wanted a way to tie everything together.  It seems that eclipse will allow me to code, build, program, debug code, and hardware debug all in one.  First thing is first though, I needed to get eclipse installed and running.</p>
<p><strong>Trial and Error</strong><br />
I use Ubuntu 8.10 Intrepid Ibex and Eclipse is in the repositories, yay!!  An hour and a half of downloads later I can&#8217;t get the AVR-eclipse plugin to work.  Great.</p>
<p>Well, come to find out that Ubuntu has Eclipse version 3.2.2 in the repository and the AVR plugin needs a minimum of 3.3 installed.  Fortunately eclipse comes as a java package, requiring no compiling.  In fact, I don&#8217;t think you even need administrative privileges to install it.</p>
<p>Go download the Eclipse IDE for C/C++ developers here:<br />
<a href="http://www.eclipse.org/downloads/">http://www.eclipse.org/downloads/</a></p>
<p>Unpack it, I just put the eclipse folder from the tar package in my home directory.  To run it just go into that directory and type:<br />
<code>./eclipse</code></p>
<p>We will need to AVR plugin for eclipse.  To install it go to Help &#8211;&gt; Software Updates. Click the available software tab, click add site and put in this url:<br />
<code>http://avr-eclipse.sourceforge.net/updatesite/</code><br />
In the window to the left expand the tree next to the url you just entered.  Check the box next to AVR Eclipse Plugin and click Install to the right.</p>
<p>The plugin will download and install and then you will be prompted to restart eclipse, do so.  Once you are back in use the AVR plugin help file to get things going.  Find this by going to Help &#8211;&gt; Help Contents &#8211;&gt; AVR Plugin &#8211;&gt; Getting Started.</p>
<p>Following that guide for about 5 minutes I was able to code, build, and program an app that flashed 6 leds in sequence on my development board (Dragon Rider 500) using a mega168 (what I already had sitting in the board.  I&#8217;m asking my self why I didn&#8217;t start using this method much sooner.</p>
<p>There is a pretty good wiki regarding this AVR plugin:<br />
<a href="http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin">http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin</a></p>
<p>I&#8217;m going to look into on-chip debugging using eclipse along with avarice and avr-gdb.  Check back for more on that.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=134&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2008/12/06/avr-development-using-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>
	</item>
		<item>
		<title>Version Control using Subversion (SVN)</title>
		<link>http://jumptuck.wordpress.com/2008/11/21/version-control-using-subversion-svn/</link>
		<comments>http://jumptuck.wordpress.com/2008/11/21/version-control-using-subversion-svn/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 17:44:21 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=129</guid>
		<description><![CDATA[The code for my projects has been getting ever more complex.  Add to that the fact that I&#8217;m now using multiple computers for development and I find I have a need for a version control system.
I have had experience checking out projects on both CVS and SVN control systems but have never made commits [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=129&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The code for my projects has been getting ever more complex.  Add to that the fact that I&#8217;m now using multiple computers for development and I find I have a need for a version control system.</p>
<p>I have had experience checking out projects on both CVS and SVN control systems but have never made commits or maintained the system myself.  Luckily there are some good guides out there and Ubuntu has everything I need in the repositories to get my chosen package system, <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a>, up and running.</p>
<p><strong>Tutorials</strong><br />
I used parts from both of these tutorials:</p>
<ul>
<li><a href="http://polishlinux.org/apps/subversion-howto/">Manage your documents with Subversion</a></li>
<li><a href="https://help.ubuntu.com/community/Subversion">Ubuntu Community Documentation &#8211; Subverion</a></li>
</ul>
<p><strong>Installation</strong></p>
<p>I did not install or setup the web interface system.  Right now I&#8217;m trying everything out using my local network so installing the subversion ubuntu package is all I really needed.</p>
<p>I followed the Community Documentation&#8217;s guidelines to create a directory at /home/svn and to add the group &#8220;subversion&#8221; making myself and www-data members of that group.</p>
<p><strong>Commands</strong><br />
Create the project:</p>
<pre class="brush: cpp;">sudo svnadmin create /home/svn/myproject</pre>
<p>Import the first version of the code you have written.  This will import all files in the DIR_TO_IMPORT:</p>
<pre class="brush: cpp;">svn --username YOUR_USERNAME import DIR_TO_IMPORT file://YOUR_LAN_ADDRESS/home/svn/myproject -m &quot;First file import&quot;</pre>
<p>Check Out the first revision of the code.  You want to make sure to check out from SVN now instead of working from what you just imported.  This will make committing your changes easy.</p>
<pre class="brush: cpp;">svn co file://YOUR_LAN_ADDRESS/home/svn/myproject</pre>
<p><strong>note:</strong> these command should be run from the working directory.<br />
Commit changes you have made to the repository:</p>
<pre class="brush: cpp;">svn commit</pre>
<p>Show the changes you have made since checking out the latest version:</p>
<pre class="brush: cpp;">svn diff</pre>
<p>Update to the most current version from the repository:</p>
<pre class="brush: cpp;">svn update</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=129&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2008/11/21/version-control-using-subversion-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>
	</item>
		<item>
		<title>Breakout Board for 3595 LCD</title>
		<link>http://jumptuck.wordpress.com/2008/11/20/breakout-board-for-3595-lcd/</link>
		<comments>http://jumptuck.wordpress.com/2008/11/20/breakout-board-for-3595-lcd/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 01:43:00 +0000</pubDate>
		<dc:creator>barney_1</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jumptuck.wordpress.com/?p=125</guid>
		<description><![CDATA[I have manufactured a breakout board for the nokia 3595 lcd screen.  As you can see this facilitates both interface with the screen itself as well as a backlight.
For the backlight I salvaged two LEDs from the phone board itself.  I carefully measured and laid out the location for the copper to interface [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=125&subd=jumptuck&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://jumptuck.files.wordpress.com/2008/11/2008-11-20-lcd-breakout-board.jpg"><img class="alignnone size-full wp-image-126" title="2008-11-20-lcd-breakout-board" src="http://jumptuck.files.wordpress.com/2008/11/2008-11-20-lcd-breakout-board.jpg?w=449&#038;h=640" alt="2008-11-20-lcd-breakout-board" width="449" height="640" /></a>I have manufactured a breakout board for the nokia 3595 lcd screen.  As you can see this facilitates both interface with the screen itself as well as a backlight.</p>
<p>For the backlight I salvaged two LEDs from the phone board itself.  I carefully measured and laid out the location for the copper to interface with the &#8220;spring&#8221; connection for the screen as well as the holes for the LEDs.  The LEDs are SMD devices that are soldered to the bottom of the board and stick through a hole to the top of the board.  I then cut the keypad area off of the plastic housing for the LCD and used that in conjunction with the metal frame from the phone to mount the unit to my home built PCB.</p>
<p>This is my first double-sided PCB.  It doesn&#8217;t have the cleanest lines but it works and that&#8217;s good enough for me.  I found it a bit more difficult to iron on the toner to both sides without smearing it (due to too much heat or from moving the paper while I worked).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jumptuck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jumptuck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jumptuck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jumptuck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jumptuck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jumptuck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jumptuck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jumptuck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jumptuck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jumptuck.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jumptuck.wordpress.com&blog=3004064&post=125&subd=jumptuck&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jumptuck.wordpress.com/2008/11/20/breakout-board-for-3595-lcd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e658501c4975c9d44510e5080eb8ec32?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">barney_1</media:title>
		</media:content>

		<media:content url="http://jumptuck.files.wordpress.com/2008/11/2008-11-20-lcd-breakout-board.jpg" medium="image">
			<media:title type="html">2008-11-20-lcd-breakout-board</media:title>
		</media:content>
	</item>
	</channel>
</rss>