<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Isti's Blog</title>
	
	<link>http://www.xistix.com/blog</link>
	<description>Tutorials, examples, 42</description>
	<lastBuildDate>Mon, 19 Apr 2010 20:16:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/IstisBlog" /><feedburner:info uri="istisblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Adding external connections</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/yB98Fxu-TIY/</link>
		<comments>http://www.xistix.com/blog/2010/04/19/adding-external-connections/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:16:36 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=504</guid>
		<description><![CDATA[Today I soldered  pin headers for the outputs, ground and power. I will connect the jumper cables from the back panel to them. After brainstorming for a while I figured out the input connections need somewhat different setup. They need one jumper wire per connector, since I would like to have a switch like input, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I soldered  pin headers for the outputs, ground and power. I will connect the jumper cables from the back panel to them. After brainstorming for a while I figured out the input connections need somewhat different setup. They need one jumper wire per connector, since I would like to have a switch like input, so I cannot manage with common ground on the connectors. I separated the first four connectors on the back panel and each got their separate jumper cables.</p>
<p>Then I soldered similar circuits to the analog inputs 5, 4, 3, and 2 like I used for the push buttons. 10K resistor pull the input down to the ground. Then the same input is connected to the +5V via a jumper and a 500 ohm resistance. The jumper is then connected to the external connector. By shorting the external connector it works similarly as a push button. If a variable resistor is connected to the external connector then it works as an analog input.</p>
<p>Here is a picture about the board:</p>
<div id="attachment_505" class="wp-caption alignnone" style="width: 410px"><a href="http://www.xistix.com/blog/wp-content/uploads/2010/04/inputjumpers.jpg"><img class="size-full wp-image-505" title="inputjumpers" src="http://www.xistix.com/blog/wp-content/uploads/2010/04/inputjumpers.jpg" alt="" width="400" height="275" /></a><p class="wp-caption-text">Analog inputs and their connections to the back panel</p></div>

<p><a href="http://feedads.g.doubleclick.net/~a/pME8JH5YnILG1XklsCH5T-gBVmY/0/da"><img src="http://feedads.g.doubleclick.net/~a/pME8JH5YnILG1XklsCH5T-gBVmY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pME8JH5YnILG1XklsCH5T-gBVmY/1/da"><img src="http://feedads.g.doubleclick.net/~a/pME8JH5YnILG1XklsCH5T-gBVmY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/yB98Fxu-TIY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2010/04/19/adding-external-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2010/04/19/adding-external-connections/</feedburner:origLink></item>
		<item>
		<title>The box</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/h__jB0CqJGQ/</link>
		<comments>http://www.xistix.com/blog/2010/04/18/the-box/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 21:36:33 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=498</guid>
		<description><![CDATA[Since the circuit is almost ready I started to think about the box. I do not want to send money on it, so I looked around my garbage heap. I found an old zip drive. Earlier I thought I will sell it on Ebay. Yes, yes it was working. Well just was RIP. I checked [...]]]></description>
			<content:encoded><![CDATA[<p>Since the circuit is almost ready I started to think about the box. I do not want to send money on it, so I looked around my garbage heap. I found an old zip drive. Earlier I thought I will sell it on Ebay. Yes, yes it was working. Well just was <img src='http://www.xistix.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  RIP. I checked on Ebay, there are plenty of them for sale and even if they sell they worth about 5-8$ so it does not worth the effort for me.</p>
<p>I disassembled the box. Well it is not the best for this project, since it is closing with clips and not screws but it was free so I can live with that. I tried my board into it and found that I have to cut a couple of centimeters from the end of the board.</p>
<p>Here are some pictures about the box and the cut board:</p>
<div id="attachment_499" class="wp-caption alignnone" style="width: 410px"><a href="http://www.xistix.com/blog/wp-content/uploads/2010/04/zipbox.jpg"><img class="size-full wp-image-499" title="zipbox" src="http://www.xistix.com/blog/wp-content/uploads/2010/04/zipbox.jpg" alt="" width="400" height="229" /></a><p class="wp-caption-text">ZIP drive box</p></div>
<div id="attachment_500" class="wp-caption alignnone" style="width: 410px"><a href="http://www.xistix.com/blog/wp-content/uploads/2010/04/boardcut.jpg"><img class="size-full wp-image-500" title="boardcut" src="http://www.xistix.com/blog/wp-content/uploads/2010/04/boardcut.jpg" alt="" width="400" height="420" /></a><p class="wp-caption-text">Now the board is shorter</p></div>
<p>As you can see I cut two holes on the side of the box. They are for the external power connector and usb connector of the arduino. I still have to cut a hole for the LCD and drill some holes for the potentiometers and buttons.</p>
<p>I also assembled connectors to the back panel of the box:</p>
<div id="attachment_501" class="wp-caption alignnone" style="width: 410px"><a href="http://www.xistix.com/blog/wp-content/uploads/2010/04/backpanel.jpg"><img class="size-full wp-image-501" title="backpanel" src="http://www.xistix.com/blog/wp-content/uploads/2010/04/backpanel.jpg" alt="" width="400" height="261" /></a><p class="wp-caption-text">Back panel</p></div>
<p>I soldered jumper cables to the connectors. Two connector is connected to a single jumper cable. The second pins of each connector are connected together and the will be connected to the ground. I also use a jumper cable for that.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/0ZqZUqzCsW2aWonaHVyGOTeXOPA/0/da"><img src="http://feedads.g.doubleclick.net/~a/0ZqZUqzCsW2aWonaHVyGOTeXOPA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0ZqZUqzCsW2aWonaHVyGOTeXOPA/1/da"><img src="http://feedads.g.doubleclick.net/~a/0ZqZUqzCsW2aWonaHVyGOTeXOPA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/h__jB0CqJGQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2010/04/18/the-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2010/04/18/the-box/</feedburner:origLink></item>
		<item>
		<title>Potentiometers added</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/w2KMcnnrYuw/</link>
		<comments>http://www.xistix.com/blog/2010/04/17/potentiometers-added/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 21:00:30 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=489</guid>
		<description><![CDATA[I have added two potentiometers to the board. Actually I had only one potentiometer but the board is ready for the other one as well. It was fairly easy. I just added two connectors each with two pins. The first connector is sitting on the +5v and GND lines. The other one is connected to [...]]]></description>
			<content:encoded><![CDATA[<p>I have added two potentiometers to the board. Actually I had only one potentiometer but the board is ready for the other one as well. It was fairly easy. I just added two connectors each with two pins. The first connector is sitting on the +5v and GND lines. The other one is connected to the analog input 0 and 1 pins. Since in both case the pins are neighboring pins on the arduino I didn&#8217;t need to make additional connections. Just solder the pins and that is it. When I was ready I crimped two cables for the connectors. I soldered the two wires of the first cable to the two side pins of the potentiometer. I connected this cable to the connector on the +5V-GND.  Then I soldered one wire from the second cable two the middle pin of the potentiometer.</p>
<p>When I will get the second potentiometer I will connect its side pins to the corresponding pins on the other potentiometer. The middle pin will be connected to the free wire on the second cable.</p>
<p>I will use the connected potentiometer for setting a treshold value. For instance it can be used for calibrating microphone input. The second potentiometer will be used to input delay values. I will use a precision potentiometer (turns 10x) for that.</p>
<p>Here is a picture of the hardware:</p>
<div id="attachment_490" class="wp-caption alignnone" style="width: 410px"><a href="http://www.xistix.com/blog/wp-content/uploads/2010/04/potmeter.jpg"><img class="size-full wp-image-490" title="potentiometer" src="http://www.xistix.com/blog/wp-content/uploads/2010/04/potmeter.jpg" alt="" width="400" height="613" /></a><p class="wp-caption-text">Potentiometer added</p></div>
<p>I also added the treshold input to the code:</p>
<pre>// include the library code:
 #include &lt;LiquidCrystal.h&gt;

 const int numRows = 2;
 const int numCols = 16;

 //Digital pins
 const int lcdBackLightPin = 12;
 const int upButtonPin = 6;
 const int downButtonPin = 5;
 const int setButtonPin = 4;
 const int resetButtonPin = 3;

 //Analog pins
 const int tresholdPin = 0;

 char* mainMenu[]={"start", "delay", "treshold", "test"};
 int mainMenuIndex = 0;
 int mainMenuNextItem = 1;
 int mainMenuItemNum = 4;
 boolean menuUpdate = false;

 int treshold = 0;

 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(13, 11, 10, 9, 8, 7);

 void setup() {
   // set up the LCD's number of rows and columns:
   lcd.begin(numRows, numCols);
   lcd.clear();
   lcd.setCursor(0, 0);
   lcd.print("&gt;");
   lcd.setCursor(2, 0);
   lcd.print(mainMenu[mainMenuIndex]);
   lcd.setCursor(2, 1);
   lcd.print(mainMenu[mainMenuNextItem]);
   digitalWrite(lcdBackLightPin, HIGH);

   pinMode(lcdBackLightPin, OUTPUT);
   pinMode(upButtonPin, INPUT);
   pinMode(downButtonPin, INPUT);
   pinMode(setButtonPin, INPUT);
   pinMode(resetButtonPin, INPUT);

 }

 void setTreshold()
 {
   int cursorOn = 1;
   delay(300);

   while(!digitalRead(setButtonPin))
   {
     treshold = analogRead(tresholdPin);
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print("Treshold:");
     lcd.setCursor(0, 1);
     if(cursorOn)
     {
       lcd.print("&gt; ");
       cursorOn = 0;
     }
     else
     {
       lcd.print("  ");
       cursorOn = 1;
     }

     lcd.print(treshold);

     delay(300);
   }
 }

 void loop() {
   if(digitalRead(upButtonPin))
   {
     mainMenuIndex++;
     if(mainMenuIndex &gt;= mainMenuItemNum)
     {
       mainMenuIndex = 0;
     }  
     mainMenuNextItem++;
     if(mainMenuNextItem &gt;= mainMenuItemNum)
     {
       mainMenuNextItem = 0;
     }
     menuUpdate = true;
   }
   else if(digitalRead(downButtonPin))
   {
     mainMenuIndex--;
     if(mainMenuIndex &lt; 0)
     {
       mainMenuIndex = mainMenuItemNum - 1;
     }  
     mainMenuNextItem--;
     if(mainMenuNextItem &lt; 0)
     {
       mainMenuNextItem = mainMenuItemNum - 1;
     }
     menuUpdate = true;
   }
   else if(digitalRead(setButtonPin))
   {
     switch(mainMenuIndex)
     {
       /*
       case 0:     
       break;

       case 1:
       break;
       */
       case 2: setTreshold();
         menuUpdate = true;      
       break;
       /*  
       case 3:
       break;

       default:
       */
     }
   }

   if(menuUpdate)
   {   
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print("&gt;");
     lcd.setCursor(2, 0);
     lcd.print(mainMenu[mainMenuIndex]);
     lcd.print(" &lt;");
     lcd.setCursor(2, 1);
     lcd.print(mainMenu[mainMenuNextItem]);
     menuUpdate = false;
     delay(300);
   }
 }</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/E5FVNE7UPXWdEUotmmL83xm1jeY/0/da"><img src="http://feedads.g.doubleclick.net/~a/E5FVNE7UPXWdEUotmmL83xm1jeY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/E5FVNE7UPXWdEUotmmL83xm1jeY/1/da"><img src="http://feedads.g.doubleclick.net/~a/E5FVNE7UPXWdEUotmmL83xm1jeY/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/w2KMcnnrYuw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2010/04/17/potentiometers-added/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2010/04/17/potentiometers-added/</feedburner:origLink></item>
		<item>
		<title>Lets continue!</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/INrudZubLeQ/</link>
		<comments>http://www.xistix.com/blog/2010/04/17/lets-continue/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 16:40:22 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=486</guid>
		<description><![CDATA[Long time ago I did not do anything to this project. Now I have a little time and I thought I should finish the controller. Since my last post a couple of guys contacted me and we talked about their projects. Interestingly everyone wanted to use the controller for different things. One fellow wants to [...]]]></description>
			<content:encoded><![CDATA[<p>Long time ago I did not do anything to this project. Now I have a little time and I thought I should finish the controller. Since my last post a couple of guys contacted me and we talked about their projects. Interestingly everyone wanted to use the controller for different things. One fellow wants to shoot flying bird photos, another one would like to take shots of jumping grasshoppers. Since these things also interest me, I decided to make the device a bit more generic. I will not integrate the circuits for specific inputs and outputs to the board. Instead I will connect the remaining arduino input/output pins to connectors and put them to the back of the device box. I will build those circuits separately. This way I can change the hardware for different purposes by simply attaching different type of peripheries.</p>
<p>After reviewing my half made board and my last post I found that I have the following pins free:</p>
<p>Digital I/O:  2, 1, 0</p>
<p>Analog input: 0, 1, 2, 3, 4, 5</p>
<p>I will use the digital pins as digital outputs.</p>
<p>The first two analog pins (0 and 1) will be used for built in potentiometers.</p>
<p>The analog 2 and 3 pins will be configured as digital inputs and they will have similar circuits like the push buttons. The only difference is that we will replace the button with a connector.</p>
<p>The analog 4 and 5 will be directly connected to connectors.</p>
<p>Now, I have plan <img src='http://www.xistix.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Lets solder!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/GNGpiegvat36r80_zqX_4cbbQUs/0/da"><img src="http://feedads.g.doubleclick.net/~a/GNGpiegvat36r80_zqX_4cbbQUs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GNGpiegvat36r80_zqX_4cbbQUs/1/da"><img src="http://feedads.g.doubleclick.net/~a/GNGpiegvat36r80_zqX_4cbbQUs/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/INrudZubLeQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2010/04/17/lets-continue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2010/04/17/lets-continue/</feedburner:origLink></item>
		<item>
		<title>Adding Menu</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/mS7ehSpKeQs/</link>
		<comments>http://www.xistix.com/blog/2009/09/22/adding-menu/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 16:07:52 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=483</guid>
		<description><![CDATA[I did not change the HW since the last post. I updated the SW by implementing a simple menu: // include the library code: #include &#60;LiquidCrystal.h&#62; const int numRows = 2; const int numCols = 16; const int lcdBackLightPin = 12; const int upButtonPin = 6; const int downButtonPin = 5; const int setButtonPin = [...]]]></description>
			<content:encoded><![CDATA[<p>I did not change the HW since the last post. I updated the SW by implementing a simple menu:</p>
<pre>// include the library code:
 #include &lt;LiquidCrystal.h&gt;

 const int numRows = 2;
 const int numCols = 16;

 const int lcdBackLightPin = 12;
 const int upButtonPin = 6;
 const int downButtonPin = 5;
 const int setButtonPin = 4;
 const int resetButtonPin = 3;

 char* mainMenu[]={"start", "delay", "test"};
 int mainMenuIndex = 0;
 int mainMenuNextItem = 1;
 int mainMenuItemNum = 3;
 boolean menuUpdate = false;

 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(13, 11, 10, 9, 8, 7);

 void setup() {
 // set up the LCD's number of rows and columns:
 lcd.begin(numRows, numCols);
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("&gt;");
 lcd.setCursor(2, 0);
 lcd.print(mainMenu[mainMenuIndex]);
 lcd.setCursor(2, 1);
 lcd.print(mainMenu[mainMenuNextItem]);
 digitalWrite(lcdBackLightPin, HIGH);

 pinMode(lcdBackLightPin, OUTPUT);
 pinMode(upButtonPin, INPUT);
 pinMode(downButtonPin, INPUT);
 pinMode(setButtonPin, INPUT);
 pinMode(resetButtonPin, INPUT);

 }

 void loop() {
 if(digitalRead(upButtonPin))
 {
 mainMenuIndex++;
 if(mainMenuIndex &gt;= mainMenuItemNum)
 {
 mainMenuIndex = 0;
 }  
 mainMenuNextItem++;
 if(mainMenuNextItem &gt;= mainMenuItemNum)
 {
 mainMenuNextItem = 0;
 }
 menuUpdate = true;
 }
 else if(digitalRead(downButtonPin))
 {
 mainMenuIndex--;
 if(mainMenuIndex &lt; 0)
 {
 mainMenuIndex = mainMenuItemNum - 1;
 }  
 mainMenuNextItem--;
 if(mainMenuNextItem &lt; 0)
 {
 mainMenuNextItem = mainMenuItemNum - 1;
 }
 menuUpdate = true;
 }

 if(menuUpdate)
 {   
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("&gt;");
 lcd.setCursor(2, 0);
 lcd.print(mainMenu[mainMenuIndex]);
 lcd.print(" &lt;");
 lcd.setCursor(2, 1);
 lcd.print(mainMenu[mainMenuNextItem]);
 menuUpdate = false;
 delay(300);
 }

 }</pre>
<p>You can download the file from here: <a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/xISTIxHSPC.pde">xISTIxHSPC</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/tDQsDesNbhFS3Soo1_ReioiIs4E/0/da"><img src="http://feedads.g.doubleclick.net/~a/tDQsDesNbhFS3Soo1_ReioiIs4E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tDQsDesNbhFS3Soo1_ReioiIs4E/1/da"><img src="http://feedads.g.doubleclick.net/~a/tDQsDesNbhFS3Soo1_ReioiIs4E/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/mS7ehSpKeQs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/22/adding-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/22/adding-menu/</feedburner:origLink></item>
		<item>
		<title>Buttons ready</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/V9xeozfZoqs/</link>
		<comments>http://www.xistix.com/blog/2009/09/21/buttons-ready/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 06:07:48 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=478</guid>
		<description><![CDATA[Yesterday I had a little time to go on with my high speed photo controller project. I added three more buttons. The circuits are exactly the same as for the first button. Here is a picture: As you can see, I put every button connector two a new column. This way it was easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I had a little time to go on with my high speed photo controller project. I added three more buttons. The <a href="http://www.xistix.com/blog/2009/08/16/start-planning-push-buttons/">circuits</a> are exactly the same as for the <a href="http://www.xistix.com/blog/2009/09/04/first-button/">first button</a>. Here is a picture:</p>
<div id="attachment_476" class="wp-caption alignnone" style="width: 310px"><a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/buttons_assembled.jpg"><img class="size-medium wp-image-476" title="buttons_assembled" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/buttons_assembled-300x225.jpg" alt="Buttons assemled" width="300" height="225" /></a><p class="wp-caption-text">Buttons assembled</p></div>
<p>As you can see, I put every button connector two a new column. This way it was easy to wire them and I needed to make cuts only between the connector pins. I also changed the code of the controller:</p>
<pre>// include the library code:
 #include &lt;LiquidCrystal.h&gt;

 const int numRows = 2;
 const int numCols = 16;

 const int lcdBackLightPin = 12;
 const int upButtonPin = 6;
 const int downButtonPin = 5;
 const int setButtonPin = 4;
 const int resetButtonPin = 3;

 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(13, 11, 10, 9, 8, 7);

 void setup() {
 // set up the LCD's number of rows and columns:
 lcd.begin(numRows, numCols);
 lcd.clear();
 lcd.setCursor(5, 1);
 lcd.print("XistiX");
 digitalWrite(lcdBackLightPin, HIGH);

 pinMode(lcdBackLightPin, OUTPUT);
 pinMode(upButtonPin, INPUT);
 pinMode(downButtonPin, INPUT);
 pinMode(setButtonPin, INPUT);
 pinMode(resetButtonPin, INPUT);
 }

 void loop() {
 if(digitalRead(upButtonPin))
 {
 lcd.setCursor(0, 0);
 lcd.print("UP Button");
 }
 else if(digitalRead(downButtonPin))
 {
 lcd.setCursor(0, 0);
 lcd.print("DOWN Button");
 }
 else if(digitalRead(setButtonPin))
 {
 lcd.setCursor(0, 0);
 lcd.print("SET Button");
 }
 else if(digitalRead(resetButtonPin)</pre>
<div id=":64">
<pre>)</pre>
<pre> {</pre>
<pre> lcd.setCursor(0, 0);</pre>
<pre> lcd.print("RESET Button");</pre>
<pre> }</pre>
<pre> else</pre>
<pre> {</pre>
<pre> lcd.setCursor(0, 0);</pre>
<pre> lcd.print("            ");</pre>
<pre> }</pre>
<pre> }</pre>
</div>
<p>It prints to the screen which button is pressed. When you check the source you will notice that buttons actually has a priority order and you can&#8217;t press two more than one button at the same time. I used an if else if structure. I will change this later. It is simply so because it was the easiest to test the buttons and update the screen.</p>
<p>You can download the code as a file from here: <a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/xISTIx_Buttons.pde">xISTIx_Buttons</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/KEg9qkBhe_74M2VzcW8twTjwy4A/0/da"><img src="http://feedads.g.doubleclick.net/~a/KEg9qkBhe_74M2VzcW8twTjwy4A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/KEg9qkBhe_74M2VzcW8twTjwy4A/1/da"><img src="http://feedads.g.doubleclick.net/~a/KEg9qkBhe_74M2VzcW8twTjwy4A/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/V9xeozfZoqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/21/buttons-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/21/buttons-ready/</feedburner:origLink></item>
		<item>
		<title>Drop on Drop</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/0MN8VB63rQQ/</link>
		<comments>http://www.xistix.com/blog/2009/09/08/drop-on-drop/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:14:57 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=469</guid>
		<description><![CDATA[Yesterday I experimented with drop collisions. I got some interesting photos:]]></description>
			<content:encoded><![CDATA[<p>Yesterday I experimented with drop collisions. I got some interesting photos:</p>

<a href='http://www.xistix.com/blog/2009/09/08/drop-on-drop/floweronyellow/' title='FlowerOnYellow'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/FlowerOnYellow-150x150.jpg" class="attachment-thumbnail" alt="Flower" title="FlowerOnYellow" /></a>
<a href='http://www.xistix.com/blog/2009/09/08/drop-on-drop/plate/' title='Plate'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/Plate-150x150.jpg" class="attachment-thumbnail" alt="Falling Plate" title="Plate" /></a>
<a href='http://www.xistix.com/blog/2009/09/08/drop-on-drop/redfloweronyellow/' title='RedFlowerOnYellow'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/RedFlowerOnYellow-150x150.jpg" class="attachment-thumbnail" alt="Another Flower" title="RedFlowerOnYellow" /></a>
<a href='http://www.xistix.com/blog/2009/09/08/drop-on-drop/splashonsplash/' title='SplashOnSplash'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/SplashOnSplash-150x150.jpg" class="attachment-thumbnail" alt="Splash on Splash" title="SplashOnSplash" /></a>
<a href='http://www.xistix.com/blog/2009/09/08/drop-on-drop/splashontop/' title='SplashOnTop'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/SplashOnTop-150x150.jpg" class="attachment-thumbnail" alt="Splash on Top" title="SplashOnTop" /></a>


<p><a href="http://feedads.g.doubleclick.net/~a/fGrXdqOZfoUYZLELTbXk_MZ26_g/0/da"><img src="http://feedads.g.doubleclick.net/~a/fGrXdqOZfoUYZLELTbXk_MZ26_g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fGrXdqOZfoUYZLELTbXk_MZ26_g/1/da"><img src="http://feedads.g.doubleclick.net/~a/fGrXdqOZfoUYZLELTbXk_MZ26_g/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/0MN8VB63rQQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/08/drop-on-drop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/08/drop-on-drop/</feedburner:origLink></item>
		<item>
		<title>Photos</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/lJD9ieE8auY/</link>
		<comments>http://www.xistix.com/blog/2009/09/06/photos/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 06:31:22 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[Photos]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=463</guid>
		<description><![CDATA[Two new photos with the old controller:]]></description>
			<content:encoded><![CDATA[<p>Two new photos with the old controller:</p>

<a href='http://www.xistix.com/blog/2009/09/06/photos/reddragon/' title='RedDragon'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/RedDragon-150x150.jpg" class="attachment-thumbnail" alt="Red Dragon" title="RedDragon" /></a>
<a href='http://www.xistix.com/blog/2009/09/06/photos/ufo/' title='Ufo'><img width="150" height="150" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/Ufo-150x150.jpg" class="attachment-thumbnail" alt="Ufo" title="Ufo" /></a>


<p><a href="http://feedads.g.doubleclick.net/~a/Vn4aOaEIuBhGCazQsuN1cl0yol4/0/da"><img src="http://feedads.g.doubleclick.net/~a/Vn4aOaEIuBhGCazQsuN1cl0yol4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Vn4aOaEIuBhGCazQsuN1cl0yol4/1/da"><img src="http://feedads.g.doubleclick.net/~a/Vn4aOaEIuBhGCazQsuN1cl0yol4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/lJD9ieE8auY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/06/photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/06/photos/</feedburner:origLink></item>
		<item>
		<title>First Button</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/3jnguT37UjA/</link>
		<comments>http://www.xistix.com/blog/2009/09/04/first-button/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 19:16:26 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=458</guid>
		<description><![CDATA[I have built the circuit of the first push button. I have not made any changes to the original plan. Here is the picture: I have put a two pin connector to a stripe and made a cut between the pins. then I connected one pin (the upper one in the picture) via a 10 [...]]]></description>
			<content:encoded><![CDATA[<p>I have built the circuit of the first push button. I have not made any changes to the original plan. Here is the picture:</p>
<div id="attachment_460" class="wp-caption alignnone" style="width: 310px"><a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/Button.JPG"><img class="size-medium wp-image-460" title="Button" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/Button-300x225.jpg" alt="Push button circuit" width="300" height="225" /></a><p class="wp-caption-text">Push button circuit</p></div>
<p>I have put a two pin connector to a stripe and made a cut between the pins. then I connected one pin (the upper one in the picture) via a 10 kohm resistor to the ground. The same pin is also connected to pin 6 of the arduino.  The other pin is connected to 5v via a 500 ohm resistor. The push button shorts the two pins.</p>
<p>I have modified the LCD test program a bit. Now the LCD background light is on when the push button is pressed. It is just for testing purposes. Later I will change this.</p>
<p>Here is the code: <a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/HelloWorldLCDButton.pde">HelloWorldLCDButton</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/1R3uF4ZxiabRhEGeFQc-bamr15s/0/da"><img src="http://feedads.g.doubleclick.net/~a/1R3uF4ZxiabRhEGeFQc-bamr15s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1R3uF4ZxiabRhEGeFQc-bamr15s/1/da"><img src="http://feedads.g.doubleclick.net/~a/1R3uF4ZxiabRhEGeFQc-bamr15s/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/3jnguT37UjA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/04/first-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/04/first-button/</feedburner:origLink></item>
		<item>
		<title>LCD Ready</title>
		<link>http://feedproxy.google.com/~r/IstisBlog/~3/x1ZDUaVNBvo/</link>
		<comments>http://www.xistix.com/blog/2009/09/03/lcd-ready/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 06:54:25 +0000</pubDate>
		<dc:creator>Isti</dc:creator>
				<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[xISTIx HSP Controller]]></category>

		<guid isPermaLink="false">http://www.xistix.com/blog/?p=452</guid>
		<description><![CDATA[Yesterday I promised to post the pictures of the ready made LCD circuit. Here they are: And here is the final design: I also promised to upload the LCD test program: // include the library code: #include &#60;LiquidCrystal.h&#62; const int numRows = 2; const int numCols = 16; const int lcdBackLightPin = 12; // initialize [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I promised to post the pictures of the ready made LCD circuit. Here they are:</p>
<div id="attachment_450" class="wp-caption alignnone" style="width: 310px"><a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_circuit_ready.jpg"><img class="size-medium wp-image-450" title="LCD_circuit_ready" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_circuit_ready-300x225.jpg" alt="LCD circuit ready" width="300" height="225" /></a><p class="wp-caption-text">LCD circuit ready</p></div>
<div id="attachment_449" class="wp-caption alignnone" style="width: 310px"><a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_hello.jpg"><img class="size-medium wp-image-449" title="LCD_hello" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_hello-300x225.jpg" alt="Hello World!" width="300" height="225" /></a><p class="wp-caption-text">Hello World!</p></div>
<p>And here is the final design:</p>
<div id="attachment_451" class="wp-caption alignnone" style="width: 310px"><a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_final.png"><img class="size-medium wp-image-451" title="LCD_final" src="http://www.xistix.com/blog/wp-content/uploads/2009/09/LCD_final-300x225.png" alt="Final LCD circuit design" width="300" height="225" /></a><p class="wp-caption-text">Final LCD circuit design</p></div>
<p>I also promised to upload the LCD test program:</p>
<pre>// include the library code:
 #include &lt;LiquidCrystal.h&gt;

 const int numRows = 2;
 const int numCols = 16;

 const int lcdBackLightPin = 12;

 // initialize the library with the numbers of the interface pins
 LiquidCrystal lcd(13, 11, 10, 9, 8, 7);

 void setup() {
 // set up the LCD's number of rows and columns:
 lcd.begin(numRows, numCols);
 lcd.clear();
 lcd.setCursor(2, 0);
 lcd.print("Hello World!");

 pinMode(lcdBackLightPin, OUTPUT);
 }

 void loop() {
 digitalWrite(lcdBackLightPin, HIGH);
 lcd.setCursor(5, 1);
 lcd.print("xISTIx");
 delay(500);
 digitalWrite(lcdBackLightPin, LOW);
 lcd.setCursor(5, 1);
 lcd.print("XistiX");
 delay(500);
 }</pre>
<p>Source file is here: <a href="http://www.xistix.com/blog/wp-content/uploads/2009/09/xISTIx_Hello_LCD.pde">xISTIx_Hello_LCD</a></p>
<p>My source file is based on this example: <a href="http://arduino.cc/en/Tutorial/LiquidCrystal">http://arduino.cc/en/Tutorial/LiquidCrystal</a></p>
<p>I just simplified the loop and changed the pin numbers according to my circuit. I also added the control for the LCD back light on pin 12.</p>
<p>Finally a comment for Linux 64 bit users. If you use the arduino package I have <a href="http://www.xistix.com/blog/2009/09/02/arduino-and-64-bit-linux/">suggested earlier</a>, you might face some compilation problem. It is because the LCD library is old in that package. I simply downloaded the arduino017 32 bit Linux software from the official arduino site and copied the LCD library from there. It works fine.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/hfPvM6BEW5nI8D64Ec2l5ZtBgUg/0/da"><img src="http://feedads.g.doubleclick.net/~a/hfPvM6BEW5nI8D64Ec2l5ZtBgUg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/hfPvM6BEW5nI8D64Ec2l5ZtBgUg/1/da"><img src="http://feedads.g.doubleclick.net/~a/hfPvM6BEW5nI8D64Ec2l5ZtBgUg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/IstisBlog/~4/x1ZDUaVNBvo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.xistix.com/blog/2009/09/03/lcd-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.xistix.com/blog/2009/09/03/lcd-ready/</feedburner:origLink></item>
	</channel>
</rss>
