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

<channel>
	<title>About:Y-aji</title>
	<atom:link href="http://y-aji.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://y-aji.com</link>
	<description>Current Projects and Ideas &#124; About:Y-aji</description>
	<lastBuildDate>Fri, 11 Jun 2010 16:26:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Customers who bought Yahtzee&#8217;s book also bought Thief</title>
		<link>http://y-aji.com/?p=266</link>
		<comments>http://y-aji.com/?p=266#comments</comments>
		<pubDate>Fri, 11 Jun 2010 16:26:16 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=266</guid>
		<description><![CDATA[Awesome.. Just awesome..]]></description>
			<content:encoded><![CDATA[<p><a href="http://y-aji.com/wp-content/uploads/2010/06/yahtzee.jpg"><img src="http://y-aji.com/wp-content/uploads/2010/06/yahtzee-300x191.jpg" alt="" title="yahtzee" width="300" height="191" class="alignright size-medium wp-image-265" /></a></p>
<p>Awesome.. Just awesome.. </p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=266</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Senator Durbin</title>
		<link>http://y-aji.com/?p=261</link>
		<comments>http://y-aji.com/?p=261#comments</comments>
		<pubDate>Wed, 09 Jun 2010 14:45:55 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=261</guid>
		<description><![CDATA[I was recently contacted by my congressman senator Durbin. After major internet providers threw everything they had at the unaware representatives, they have switched sides. The FCC is currently not going to regulate the internet. I find this both baffling and frustrating as the government wants to mediate everything else in the world. But nevertheless, [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently contacted by my congressman senator Durbin. After major internet providers threw everything they had at the unaware representatives, they have switched sides. The FCC is currently not going to regulate the internet.</p>
<p>I find this both baffling and frustrating as the government wants to mediate everything else in the world. But nevertheless, I figured I would throw out the message I received from my state representative.</p>
<p style="padding-left: 30px;"><span id="more-261"></span>June 4, 2010</p>
<p style="padding-left: 30px;">Dear Mr. Cameron:</p>
<p style="padding-left: 30px;">Thank you for contacting me about network neutrality. I appreciate  knowing your thoughts on this issue. The principle of net neutrality is designed to ensure that internet  access providers do not engage in favoritism when configuring their  networks and delivering Internet content. Such favoritism, known as &#8220;bit  discrimination,&#8221; could occur if a provider transmitted its own offerings at faster  speeds than those of its competitors or if it charged other companies a  fee for equally fast delivery.</p>
<p style="padding-left: 30px;">A recent court case, Comcast v. Federal Communications Commission  (FCC), struck down the FCC&#8217;s basis for a previous ruling regarding  Comcast&#8217;snetwork management, throwing into question the FCC&#8217;s ability to  address network neutrality. Due to this decision, many consumers and  consumer advocates are concerned that internet providers will be able to  move forward with bit discrimination.</p>
<p style="padding-left: 30px;">This issue has gained attention in the past because of comments  made by telecommunications company executives suggesting that content  providers or consumers may have to pay additional fees for fast delivery. Many  executives later clarified that they have no intention of degrading or  blocking Internet traffic but merely wish to offer their customers a premium  service.</p>
<p style="padding-left: 30px;">Nevertheless, it is reasonable to be concerned about the impact of  such steps on consumers.</p>
<p style="padding-left: 30px;">I will continue to keep your thoughts in mind in case net  neutrality legislation is debated on the Senate floor.</p>
<p style="padding-left: 30px;">Thank you again for your message. Please feel free to keep in  touch.</p>
<p style="padding-left: 30px;">Sincerely,</p>
<p style="padding-left: 30px;">Richard J. Durbin<br />
United States Senator<br />
RJD/ab</p>
<p>This email about killed me. It&#8217;s frustrating because it&#8217;s so convincing that the internet providers claim to have our best interests in mind, but let&#8217;s not cast aside some of the most important issues that the lobbyists obviously tip-toed around. I responded promptly to the best of my ability.</p>
<p style="padding-left: 30px;">Senator Durbin,</p>
<p style="padding-left: 30px;">I appreciate the timely response and definitely understand that communications companies want more flexibility in how they deliver content. I also do believe that some individuals within these companies truly believe that this will help them better serve the customer and will not hinder any aspect of their user-base in any way.</p>
<p style="padding-left: 30px;">However, as we all know, business are modeled around maximizing their profits while reducing their costs, as they should be! These companies want to offer a premium service to deliver faster internet. To do so, they will need to optimize their traffic, or otherwise buy better equipment to allow more traffic.</p>
<p style="padding-left: 30px;">With equipment enhancement being very costly, all these companies would prefer to find more significant ways to utilize the equipment they have. This alone should be seen as a good thing, however, the methods they are proposing to do this will modify user traffic.</p>
<p style="padding-left: 30px;">Customers will see very little change, it&#8217;s the providers that are going to see the most change. The very act of prioritizing the internet puts small and new web companies out of the picture. If the FCC does not regulate this prioritization, I have no doubt that there will never be another company like google again, another company like yahoo, or facebook, or youtube. These websites were developed by small companies with very private investors and little starting money and succeeded not because they knew the right people or companies, but because the sites were just better, more efficient and faster than their competitors&#8217; services.</p>
<p style="padding-left: 30px;">These websites were examples of the heart of democracy. They became successful because they were better than their competitors. By changing these regulations, individuals who create a web page, now will have to convince companies like Comcast or At&amp;t to give them more priority, they will have to follow whatever rules are established by big businesses to define what makes their site &#8220;good&#8221;. This system will turn our internet providers into internet gatekeepers.</p>
<p style="padding-left: 30px;">One could argue that perhaps these companies will monitor what users like and these small starter businesses could be given more bandwidth as they become more popular, however, it will be difficult to outperform a big business web-page in the very beginning if said website does not have high enough priority.</p>
<p style="padding-left: 30px;">I see a grim future where new companies will only succeed if they manage to acquire representation and backing from bigger companies to establish credibility, instead of just being a platform where anyone, be it you or I, can walk in, establish a storefront and create an enterprise.</p>
<p style="padding-left: 30px;">You can see real life examples of the implications of this right now on YouTube. Surf around for a few hours and you will find that some videos are slower than others. You will likely naturally get tired of waiting for the small users&#8217; videos to load and move on to something that isn&#8217;t as slow. This is directly due to how that user is prioritized, not due to the quality of his video. That user will lose hits, or points, or whatever you would like to call it, he or she will lose attention from the public due to prioritization of a gatekeeper.</p>
<p style="padding-left: 30px;">In the above example, that user is seen as a guest and is at the mercy of that company. However, I am not a guest on the internet, I am a customer.  I have the right to access all websites equally without being hindered.</p>
<p style="padding-left: 30px;">Our internet needs to be treated as a learning and communication resource, like a public library. By putting a price tag on our ability to interact with each other and our neighboring countries, we very likely will close the door on a very powerful asset that is so available to us right now in our lives.</p>
<p style="padding-left: 30px;">Sincerely,</p>
<p style="padding-left: 30px;">Keith Cameron</p>
<p>Our internet providers are very intent on emphasizing they are not going to modify the way they prioritize the internet, but I don&#8217;t understand what they plan to do. I never hear any details on this magical method of prioritizing the internet without modifying the way the internet is accessed based on some type of &#8220;favoritism&#8221;.</p>
<p>The only thing I can think is maybe they want to designate percentages that can access certain types of internet, like maybe peer to peer networks get a percentage and video delivery networks get another percentage. I&#8217;m unsure. But even then, consumer&#8217;s traffic is going to be modified which will definitely determine the type of web page that upcoming providers are going to try to create.</p>
<p>As an IT person, I have a fairly solid understanding of administering network traffic. We monitor and modify the traffic as needed here at my work to ensure that everyone has a pleasant experience, and what I have found is that you will never make everyone happy, but the feeling of having a webpage blocked or obviously hindered creates much more frustration than a slow connection all around.</p>
<p>As a provider, you cannot regulate what content you deliver without some type of discrimination. Whether it be based on profits, bandwidth, or traffic type.</p>
<p>I hope with all my heart that we all recognize the importance of not letting this go. We have to keep the internet open!</p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=261</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hooking a 597 Shift Register to Arduino</title>
		<link>http://y-aji.com/?p=242</link>
		<comments>http://y-aji.com/?p=242#comments</comments>
		<pubDate>Mon, 17 May 2010 01:11:57 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[597]]></category>
		<category><![CDATA[74hc597n]]></category>
		<category><![CDATA[PISO]]></category>
		<category><![CDATA[shift in]]></category>
		<category><![CDATA[shift register]]></category>
		<category><![CDATA[shiftin]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=242</guid>
		<description><![CDATA[So recently, I have been playing around pretty heavily with shift registers. I had managed to shift data OUT pretty easily, but taking data in has proven a bit more difficult than I had expected. There is a wonderful tutorial on http://www.arduino.cc on the 4021 PISO shift register (http://www.arduino.cc/en/Tutorial/ShiftIn) however, having already been working with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://y-aji.com/wp-content/uploads/2010/04/shiftreg-537x402.png"><img class="alignleft size-medium wp-image-227" title="shiftreg-537x402" src="http://y-aji.com/wp-content/uploads/2010/04/shiftreg-537x402-300x224.png" alt="" width="168" height="134" /></a>So recently, I have been playing around pretty heavily with shift registers. I had managed to shift data OUT pretty easily, but taking data in has proven a bit more difficult than I had expected.</p>
<p>There is a wonderful tutorial on <a href="http://www.arduino.cc ">http://www.arduino.cc</a> on the 4021 PISO shift register (<a href="http://www.arduino.cc/en/Tutorial/ShiftIn">http://www.arduino.cc/en/Tutorial/ShiftIn</a>) however, having already been working with the 595 shift register for sending data to outputs, I decided to pick up a number of 74HC597N&#8217;s and just couldn&#8217;t get them to work.<span id="more-242"></span></p>
<p>After hooking it up in the same way as the tutorial states on arduino.cc, I just couldn&#8217;t get this thing to work. I had been reading around on the internet and realized there is almost no information on these registers. After a large amount of time staring at the data-sheet, bouncing thoughts off my dad and reading every little thing we could find, we managed to find a walk through for pic controllers coded in BASIC (<a href="http://www.scritube.com/limba/engleza/technical/BASIC-for-PIC-microcontrollers152311720.php">http://www.scritube.com/limba/engleza/technical/BASIC-for-PIC-microcontrollers152311720.php</a>) navigate to section 6.7 if you want to see the hookup info.<a href="http://y-aji.com/wp-content/uploads/2010/05/74hc597.png"><img class="alignright size-medium wp-image-255" title="74hc597" src="http://y-aji.com/wp-content/uploads/2010/05/74hc597-300x255.png" alt="" width="300" height="255" /></a></p>
<p>Finally, I had figured it out. With the 4021 and the 595, there are three pins that are used. You can read more about that on one of my previous posts, but essentially, there is the CLOCK pin (signifies that a cycle has occurred), a LATCH pin (signifies when to lock the data into memory) and lastly a DATA pin which receives the serial data connection and interprets it into a value between 0 and 255 (or higher if you have a chain of the chips). The 597, however, has another pin, there is a LOAD pin.</p>
<p>In the 597, it appears that the LATCH pin moves the data to a MID-REGISTER. Then, from the mid register, you have to initialize the LOAD pin to move it from the mid register to the actual memory of the shift register.</p>
<p>Doing so was extremely simple. The following diagram is how to hook up the 597 chip to the arduino duemilanove:</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/05/597.png"><img class="alignnone size-full wp-image-244" title="597" src="http://y-aji.com/wp-content/uploads/2010/05/597.png" alt="" width="508" height="593" /></a></p>
<p>From here, we simply append the code that was listed on the tutorial for the 4021 as follows:</p>
<p>[code]</p>
<pre>//**************************************************************//
//  Name    : shiftIn 595 Example 1.0                           //
//  Author  : Keith Cameron                                     //
//  Date    : 15 May, 2010                                      //
//  Version : 1.0                                               //
//  Notes   : Code for using a 74HC597N Shift Register          //
//          : Code based on the CD4021B tutorial by             //
//          : Carlyn Maw, found at arduino.cc                   //
//****************************************************************

//define where your pins are
int latchPin = 8;
int dataPin = 9;
int clockPin = 7;
<span style="color: #ff0000;"><strong>int loadPin = 6;</strong></span>

//Define variables to hold the data for shift register.
//starting with a non-zero numbers can help troubleshoot
byte switchVar1 = 72;  //01001000

void setup() {
 //start serial
 Serial.begin(9600);

 //define pin modes
 pinMode(latchPin, OUTPUT);
 pinMode(clockPin, OUTPUT);
<span style="color: #ff0000;"><strong> pinMode(loadPin, OUTPUT);</strong></span>
 pinMode(dataPin, INPUT);

}

void loop() {

 // Pulse the latch pin:
 // Set it to 1 to collect parallel data
 digitalWrite(latchPin,1);
 // Set it to 1 to collect parallel data, wait
 delayMicroseconds(20);
 // Set it to 0 to transmit data serially
 digitalWrite(latchPin,0);

 // while the shift register is in serial mode collect
 // each shift register into a byte the register
 // attached to the chip comes in first
 switchVar1 = shiftIn(dataPin, clockPin, <span style="color: #ff0000;"><strong>loadPin</strong></span>);

 // Print out the results.
 // leading 0's at the top of the byte (7, 6, 5, etc)
 // will be dropped before the first pin that has a
 // high input reading
 Serial.println(switchVar1, BIN);

 // white space
 Serial.println("-------------------");
 // Delay so all these print satements can keep up.
 // You would remove this if you weren't updating via
 // serial.
 delay(500);
}

////// ----------------------------------------shiftIn function
///// just needs the location of the data pin and the clock pin
///// it returns a byte with each bit in the byte corresponding
///// to a pin on the shift register. leftBit 7 = Pin 7 / Bit 0= Pin 0

byte shiftIn(int myDataPin, int myClockPin, <span style="color: #ff0000;"><strong>int myLoadPin</strong></span>) {
 int i;
 int temp = 0;
 int pinState;
 byte myDataIn = 0;

<strong>
<span style="color: #ff0000;"> pinMode(myLoadPin, OUTPUT);</span></strong>

 pinMode(myClockPin, OUTPUT);
 pinMode(myDataPin, INPUT);
 // we will be holding the clock pin high 8 times (0,..,7) at the
 // end of each time through the for loop

//at the beginning of each loop when we set the clock low, it will
//be doing the necessary low to high drop to cause the shift
//register's dataPin to change state based on the value
//of the next bit in its serial information flow.
//The register transmits the information about the pins from pin 7 to pin 0
//so that is why our function counts down

<span style="color: #ff0000;"><strong> digitalWrite(myLoadPin, 0);
 delayMicroseconds(0.2);
 digitalWrite(myLoadPin, 1);</strong></span>

 for (i=7; i&gt;=0; i--)
 {
 digitalWrite(myClockPin, 0);
 delayMicroseconds(0.2);
 temp = digitalRead(myDataPin);
 if (temp) {
 pinState = 1;
 //set the bit to 0 no matter what
 myDataIn = myDataIn | (1 &lt;&lt; i);
 }
 else {
 //turn it off -- only necessary for debuging
 //print statement since myDataIn starts as 0
 pinState = 0;
 }

 //Debuging print statements
 //Serial.print(pinState);
 //Serial.print("     ");
 //Serial.println (dataIn, BIN);

 digitalWrite(myClockPin, 1);
 }

 //debuging print statements whitespace
 //Serial.println();
 //Serial.println(myDataIn, BIN);
 return myDataIn;
}
</pre>
<p>[/code]</p>
<p>That&#8217;s it! Just add perform the same action on the load pin that you performed on the latch pin. It&#8217;s totally simple, but I had a hard time finding it. Hopefully this will clear things up for someone, some day.</p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=242</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Arduino Binary Clock</title>
		<link>http://y-aji.com/?p=220</link>
		<comments>http://y-aji.com/?p=220#comments</comments>
		<pubDate>Sun, 04 Apr 2010 19:13:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=220</guid>
		<description><![CDATA[It&#8217;s done! It&#8217;s done! After what seems like a lifetime of work, I have finally completed my first major project from beginning to end with arduino and figured I would share the process. I started off with a really simple version of this, which illustrated hours and minutes, but no seconds. This was great, but [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://y-aji.com/wp-content/uploads/2010/04/Picture-10.jpg"><img class="aligncenter size-large wp-image-216" title="Arduino clock preview" src="http://y-aji.com/wp-content/uploads/2010/04/Picture-10-1024x768.jpg" alt="" width="886" height="664" /></a>It&#8217;s done! It&#8217;s done! After what seems like a lifetime of work, I have finally completed my first major project from beginning to end with arduino and figured I would share the process. I started off with a really simple version of this, which illustrated hours and minutes, but no seconds. This was great, but made it difficult to illustrate how the device worked when I would share it with students who would have to wait a solid minute before anything changed.<span id="more-220"></span></p>
<h2>Conception</h2>
<p>The initial project was simple. Make a binary clock. That was it. These things are so simple and basic, you can buy them for 15$ from just about anywhere, but that really doesn&#8217;t help me learn anything. So, I set out to make my own. I said I would take the project from beginning to end and get it running on its own. I carried it from the prototyped version to the stand-alone board in about 3 months (it probably would have been 3 weeks if I had limitless money and spare time to mess with it).</p>
<p>So, I set out with the initial design taken from <a href="http://www.danielandrade.net/2008/07/15/binary-clock-with-arduino/">daniel andrade&#8217;s webpage</a>. I started with the code being identical. Below was the PCB layout for my design.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/binary_clock.gif"><img class="aligncenter size-full wp-image-225" title="binary_clock" src="http://y-aji.com/wp-content/uploads/2010/04/binary_clock.gif" alt="" width="700" height="591" /></a></p>
<p>As you can see, the project originally was pretty simple. Everything below the 2 square switches is the layout to power the arduino board. With this design, I had 13 led&#8217;s and 2 switches (15 pins used). This was possible with the number of pins I had available with some to spare! Cool! But I wanted more. This thing needed to count seconds.</p>
<h2>Adding seconds</h2>
<p>Adding seconds would normally be quite simple, no more difficult than adding minutes or hours. The problem was that I didn&#8217;t have enough pins on the atmega328 (the arduino microcontroller) to add them. On the atmega328, there are 20 available pins for operation. That includes input AND output. If we add up the number of LED&#8217;s, we need 20 pins just for the LED&#8217;s, then we need 2 pins for the buttons to set the thing. If you didn&#8217;t have to set it, you could squeak by with all the pins, but that wouldn&#8217;t make a very effective binary clock if you couldn&#8217;t set the time. It would just be a binary timer.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/arduinopins.jpg"><img class="aligncenter size-full wp-image-231" title="arduinopins" src="http://y-aji.com/wp-content/uploads/2010/04/arduinopins.jpg" alt="" width="765" height="446" /></a></p>
<p>So, I set out to figure out how to multiply my outputs. My first thought was to create some kind of <a href="http://arduino.cc/en/Tutorial/RowColumnScanning">matrix of the led&#8217;s which was an available project on arduino.cc</a>, but keeping track of that proved difficult when not actually listed in a matrix. Also, I had alot of trouble lighting multiple LED&#8217;s, and it just seemed like it would be hard to explain to the students. After some further thinking, I started asking myself how I could just expand my pins. What if I had a second microprocessor that was listening for instructions on the first one. I could basically send this in the form of instructions like serial communication. Then, it would only take 3 pins from my main atmega to the second one. So basically, I would have 2 atmega&#8217;s talking, with a total of 40 pins &#8211; 6 pins to talk to eachother. 34 pins! That is more than enough.</p>
<p>This was great, but extremely costly. Each atmega chip is approximately 3-5$ depending on how many you buy <strong>and</strong> they take up alot of real estate on the board, plus they use a good chunk of power. &#8220;Argh! What am I going to do?&#8221;</p>
<h2>Shift register to save the day</h2>
<p>After some more reading, I found out about shift registers. These things are really cool and work really simply. Put simply, it takes 3 inputs and gives you 8 pins on the other side as output. Hooray! I can turn 3 pins into 8 pins, I have effectively found my solution. I can turn my 20 pins into 25 pins (remember i lose 3 pins to communicate to the shift register).</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/shiftreg-537x402.png"><img class="aligncenter size-full wp-image-227" title="shiftreg-537x402" src="http://y-aji.com/wp-content/uploads/2010/04/shiftreg-537x402.png" alt="" width="537" height="402" /></a></p>
<h2>What is a shift register?</h2>
<p>So how does this thing add outputs? We really need to know that before we can use this thing. Basically, there are 3 pins that go into it from the main microprocessor, a<strong> clock</strong>, a<strong> latch</strong> and an<strong> input</strong>.</p>
<p>The <strong>input</strong> (shown below as <strong>bit_in</strong>) is simply on or off.</p>
<p>The <strong>clock</strong> basically just says &#8220;next&#8221;.</p>
<p>The<strong> latch</strong> is like a camera that takes a picture. The minute you let go of the latch, it &#8220;snaps  a picture&#8221; of the position of all the pins and displays it.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/shift_register1.jpg"><img class="aligncenter size-full wp-image-226" title="shift_register1" src="http://y-aji.com/wp-content/uploads/2010/04/shift_register1.jpg" alt="" width="597" height="268" /></a></p>
<p>Basically, you start with<strong> bit-in</strong> and<strong> clock</strong> at <strong>0 (low)</strong>, and the<strong> latch</strong> is at<strong> 1 (high)</strong>. When the <strong>clock</strong> goes <strong>high </strong>(or turns on) it grabs the state of the <strong>bit-in</strong> and remembers it, then the<strong> clock </strong>immediately goes <strong>low </strong>again.</p>
<p>0&#8212;&#8212;-</p>
<p>The next time the<strong> clock</strong> goes<strong> high</strong>, it pushes the last number blindly to the next flip-flop and reads wither the bit-in is on or off again (let&#8217;s say it was on this time) the<strong> clock </strong>immediately goes back<strong> low</strong>.</p>
<p>10&#8212;&#8212;</p>
<p>This continues until you have filled all 8 available switches, they pass the info from one to the next like buckets of water like so:</p>
<p><strong>10</strong><span style="color: #ff0000;">000000</span> -&gt; <strong>010</strong><span style="color: #ff0000;">00000</span> -&gt; <strong>1010</strong><span style="color: #ff0000;">0000</span> -&gt; <strong>11010</strong><span style="color: #ff0000;">000</span> -&gt; <strong>011010</strong><span style="color: #ff0000;">00</span> -&gt; <strong> </strong><strong>0011010</strong><span style="color: #ff0000;">0</span> -&gt; <strong>00011010</strong></p>
<p>As shown above, you can see that basically the numbers get handed from one switch to the next until they hit the end. The numbers in red are the old value, it never clears even if you turn off the power, which could be seen as a fault or a feature.</p>
<p>At this point, if it looks the way it wants, the latch will be told to go <strong>low (turn off)</strong>, to signify that it has acquired the needed information and it &#8220;snaps a photo of it&#8221; and immediately puts it in memory as the <strong>pinout configuration</strong>. So, basically, with the above number, you end up with this:</p>
<ul>
<li>pin1- off</li>
<li>pin2- off</li>
<li>pin3- off</li>
<li>pin4- on</li>
<li>pin5- on</li>
<li>pin6- off</li>
<li>pin7- on</li>
<li>pin8- off</li>
</ul>
<p>The next sequence would look like this (I&#8217;m going to insert <strong>01001001</strong> into memory):</p>
<p><span style="color: #ff0000;">00011010<span style="color: #000000;"> -next-</span></span>&gt; <strong>1</strong><span style="color: #ff0000;">0011010</span> -next-&gt; <strong>01</strong><span style="color: #ff0000;">001101</span> -next-&gt;<strong> 001</strong><span style="color: #ff0000;">00110</span> -next-&gt;<strong> 1001</strong><span style="color: #ff0000;">0011</span> -next-&gt; <strong>01001</strong><span style="color: #ff0000;">001</span> -next-&gt; <strong>001001</strong><span style="color: #ff0000;">00</span> -next-&gt; <strong>1001001</strong><span style="color: #ff0000;">0</span> -next-&gt; <strong>01001001 (&#8220;snap&#8221; into memory)</strong></p>
<p>Essentially, just as it&#8217;s named, the bits get <strong>shifted</strong> from one slot into the next. This is really well illustrated at play-hookey (unfortunately, it appears the site was not renewed.. Which is a damn shame as it was a really helpful webpage with interactive switch explanations).</p>
<h2>Design with seconds</h2>
<p>After some smashing things together, I managed to get the whole project fitted into the same space (this is important because these boards are expensive!</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_complete.png"><img class="aligncenter size-full wp-image-218" title="Arduino clock complete PCB" src="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_complete.png" alt="" width="722" height="489" /></a></p>
<p>You can see that now the board has been placed horizontally to fit everything in place. arduino.cc has the entire <a href="http://www.arduino.cc/en/Tutorial/ShiftOut">shift-out project</a> that I used for testing the project before laying it out and shows how to plug it into the actual arduino board. Basically, pins 15-17 are used to interface with the shift register, and i piggybacked the power straight around to the top right pin on it. lastly i grounded it and put a 22pf capacitor on the st_cp as suggested in the shift-out project linked a few sentences back.</p>
<p>You could also note that it has rx and tx being run to the side. Those could be used to monitor the time.</p>
<h2>The code</h2>
<p>The code is moderately long to just post up, so I&#8217;m going to post the file to be looked at.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_advanced.txt">binary clock code.txt</a> open it in a code editor as a C file</p>
<p>I&#8217;m still trying to figure out a few things. Starting line 87, there is a really big hex array that shows numbers in decimal. I tried everything to make that some kind of loop statement to make it 2 or 3 lines long, but it kept interpreting my decimal data as hexidecimal (i.e. 16 became  16 + 6, so 22) The led&#8217;s would then light up happily, but it didn&#8217;t look right. If you have a solution for this PLEASE let me know and I&#8217;ll be happy to try it.</p>
<p>I also want to simplify the hours and minutes into 2 seperate functions, but just left it how I had found it for the time being.</p>
<h2>Finishing up</h2>
<p>After alot of reading and learning, I finally had the layout I wanted and set out to order the boards. I purchased them from expressPCB and got the order in under 3 days! After putting it together, it wouldn&#8217;t power on. <strong>Oh no! </strong>I found out that the voltage regulator (ka7805 as illustrated above) requires 7.5 or higher voltage to push out 5v, I was trying it with usb power input and it just wouldn&#8217;t push quite enough, it was about .05 volts underpowered with this design and that was just not quite enough to power the atmega. Also, the 10k resistor in between the voltage regulator and the microprocessor/shift register had to be removed (I left that there as suggested by my father, for troubleshooting) and replaced it with a peice of wire to jumper it.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/Picture-15.jpg"><img class="aligncenter size-large wp-image-217" title="Arduino clock end result" src="http://y-aji.com/wp-content/uploads/2010/04/Picture-15-1024x768.jpg" alt="" width="1024" height="768" /></a>The final product! This is the whole thing running. You can see the resistor towards the bottom is jumpered to be bypassed.</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/Picture-8.jpg"><img class="aligncenter size-large wp-image-214" title="Arduino clock FRONT" src="http://y-aji.com/wp-content/uploads/2010/04/Picture-8-1024x768.jpg" alt="" width="1024" height="768" /></a></p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/Picture-9.jpg"><img class="aligncenter size-large wp-image-215" title="Arduino clock BACK" src="http://y-aji.com/wp-content/uploads/2010/04/Picture-9-1024x768.jpg" alt="" width="1024" height="768" /></a></p>
<h2>Final thoughts</h2>
<p><strong>This thing EATS BATTERIES!</strong> That should be obvious with 20 led&#8217;s. You can literally watch the battery drain with a voltmeter at .005v per second (.3v per minute). Remember it needs 7.5v to run, so you basically got 10-20 minutes before it dies. Batteries are just not an option. I had already given up on this before even ordering it but still was interested in how fast it would drain, so I tried it.</p>
<div id="attachment_234" class="wp-caption aligncenter" style="width: 330px"><a href="http://y-aji.com/wp-content/uploads/2010/04/6a00d09e7bc293be2b00f48d0840270001-320pi.jpg"><img class="size-full wp-image-234" title="6a00d09e7bc293be2b00f48d0840270001-320pi" src="http://y-aji.com/wp-content/uploads/2010/04/6a00d09e7bc293be2b00f48d0840270001-320pi.jpg" alt="" width="320" height="307" /></a><p class="wp-caption-text">battery monster!</p></div>
<p>I have currently got it plugged into 9v dc adapter and it is running happily and holding accurate time to the second over 2 days. If it is constant with the prototype, it should be accurate to the second for 1-2 weeks before it falls 1s out of sync which is within a reasonable tolerance (about as accurate as your standard wristwatch).</p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/Picture-9.jpg"></a><a href="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_secondsCOMPLETE.bmp"><img class="aligncenter size-full wp-image-219" title="Arduino clock  complete mechanical" src="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_secondsCOMPLETE.bmp" alt="" /></a></p>
<p>I am currently preparing the plexiglass housing, which will basically  just be a peice of plexiglass that it is screwed onto with a little bend  in the plastic half way through that will act as a base (like a  plexiglass temporary sign holder). the 4 holes in the corners will have 1/2&#8243; motherboard mount screws that will keep it in place.</p>
<div id="attachment_222" class="wp-caption aligncenter" style="width: 370px"><a href="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock.gif"><img class="size-full wp-image-222" title="arduino clock mount" src="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock.gif" alt="" width="360" height="564" /></a><p class="wp-caption-text">Obviously, this was made before I found out about the battery murder</p></div>
<p style="text-align: center;">
<h2>Summing it up</h2>
<p>That was pretty much it. This project has been extremely informative and helpful for me and I hope that maybe I conveyed this information in a helpful manner to someone. I am super stoked at how much I learned with such a simple project and how truly complex even the most simple of things can be. Please feel free to leave a comment with any questions or comments on the design.</p>
<h2>ExpressPCB File</h2>
<p>In the spirit of open source, I have uploaded the pcb file so you guys can order your own if you like. <img src='http://y-aji.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://y-aji.com/wp-content/uploads/2010/04/arduino_clock_wseconds.zip">arduino_clock_wseconds.zip</a></p>
<p>You can order these at http://www.expresspcb.com/. Alternatively, they were kind enough to make the software for free use and you can open the file in it, make changes and print out the machine file to make one manually (warning: there are alot of tiny wires very close together, so it may prove difficult to print one out).</p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=220</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>gamers lounge &#8211; new super mario bros wii</title>
		<link>http://y-aji.com/?p=212</link>
		<comments>http://y-aji.com/?p=212#comments</comments>
		<pubDate>Fri, 06 Nov 2009 02:18:58 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[mario]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[super mario]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=212</guid>
		<description><![CDATA[One of 8 posters in a set showing different areas of the original level of super mario brothers. The 4 characters in the upper right are cutouts and have sticky tack on the back so students can move them around as they like on the board. This allows the students to interact with the advertising [...]]]></description>
			<content:encoded><![CDATA[<p>One of 8 posters in a set showing different areas of the original level of super mario brothers. The 4 characters in the upper right are cutouts and have sticky tack on the back so students can move them around as they like on the board.</p>
<p><a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/11/mario11.jpg"><img class="aligncenter size-large wp-image-213" title="mario1" src="http://y-aji.com/wp-content/uploads/2009/11/mario11-1024x662.jpg" alt="mario1" width="1024" height="662" /></a></p>
<p>This allows the students to interact with the advertising and will potentially bring alot of attention to them. We&#8217;ll see soon enough!</p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=212</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>gamers lounge &#8211; CoD</title>
		<link>http://y-aji.com/?p=210</link>
		<comments>http://y-aji.com/?p=210#comments</comments>
		<pubDate>Thu, 05 Nov 2009 21:44:59 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[call of duty]]></category>
		<category><![CDATA[gamers lounge]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[modern warfare 2]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=210</guid>
		<description><![CDATA[They love this stuff. Bringing the call of duty. I want to take just a moment to emphasize the extreme difficulty of making a unique poster without the use of guns or violence on a game based entirely on explosions and shooting.]]></description>
			<content:encoded><![CDATA[<p>They love this stuff. Bringing the call of duty. I want to take just a moment to emphasize the extreme difficulty of making a unique poster without the use of guns or violence on a game based entirely on explosions and shooting.</p>
<p><a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/11/modernwarfare2.jpg"><img src="http://y-aji.com/wp-content/uploads/2009/11/modernwarfare2-662x1024.jpg" alt="modernwarfare2" title="modernwarfare2" width="662" height="1024" class="aligncenter size-large wp-image-209" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=210</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DonkeyKong Remake</title>
		<link>http://y-aji.com/?p=208</link>
		<comments>http://y-aji.com/?p=208#comments</comments>
		<pubDate>Sat, 31 Oct 2009 20:09:06 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[donkey kong]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=208</guid>
		<description><![CDATA[Time to finally put up my donkey kong poster. I recreated it to emphasize multiplayer.. Let me know what you think!]]></description>
			<content:encoded><![CDATA[<p>Time to finally put up my donkey kong poster. I recreated it to emphasize multiplayer..</p>
<p><a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/10/DonkeyKong.jpg"><img src="http://y-aji.com/wp-content/uploads/2009/10/DonkeyKong-651x1024.jpg" alt="DonkeyKong" title="DonkeyKong" width="651" height="1024" class="aligncenter size-large wp-image-207" /></a></p>
<p>Let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=208</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>happy halloween from gamers lounge</title>
		<link>http://y-aji.com/?p=205</link>
		<comments>http://y-aji.com/?p=205#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:15:00 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[halloween]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=205</guid>
		<description><![CDATA[Gamers lounge halloween promo.. Kind of rushed and boring, but done, nonetheless.]]></description>
			<content:encoded><![CDATA[<p>Gamers lounge halloween promo.. Kind of rushed and boring, but done, nonetheless.<br />
<a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/10/freeman.jpg"><img src="http://y-aji.com/wp-content/uploads/2009/10/freeman-662x1024.jpg" alt="freeman" title="freeman" width="662" height="1024" class="aligncenter size-large wp-image-204" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=205</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jet Grind Radio &#8211; Dreamcast 10th Anniversary</title>
		<link>http://y-aji.com/?p=203</link>
		<comments>http://y-aji.com/?p=203#comments</comments>
		<pubDate>Fri, 23 Oct 2009 03:03:59 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[jet grind radio]]></category>
		<category><![CDATA[jet set radio]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=203</guid>
		<description><![CDATA[Jet Grind Radio! How I miss this kind of innovation. Poster for the Dreamcast 10th anniversary.]]></description>
			<content:encoded><![CDATA[<p>Jet Grind Radio! How I miss this kind of innovation. Poster for the Dreamcast 10th anniversary.</p>
<p><a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/10/jetset.jpg"><img src="http://y-aji.com/wp-content/uploads/2009/10/jetset-662x1024.jpg" alt="jetset" title="jetset" width="662" height="1024" class="aligncenter size-large wp-image-202" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metroid Megaman &#8211; Find your Allies</title>
		<link>http://y-aji.com/?p=201</link>
		<comments>http://y-aji.com/?p=201#comments</comments>
		<pubDate>Fri, 23 Oct 2009 02:59:04 +0000</pubDate>
		<dc:creator>y-aji</dc:creator>
				<category><![CDATA[Personal Life]]></category>
		<category><![CDATA[gamer]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Metroid]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://y-aji.com/?p=201</guid>
		<description><![CDATA[This poster was one of my favorites, and was of course turned down for being too potentially violent. I could change the poses and add it, but I dont think it would look anywhere near as good. Let me know what you think!]]></description>
			<content:encoded><![CDATA[<p>This poster was one of my favorites, and was of course turned down for being too potentially violent. I could change the poses and add it, but I dont think it would look anywhere near as good. Let me know what you think!</p>
<p><a href="http://one2fx.com/y-aji.com/wp-content/uploads/2009/10/metroid_mega.jpg"><img src="http://y-aji.com/wp-content/uploads/2009/10/metroid_mega-662x1024.jpg" alt="metroid_mega" title="metroid_mega" width="662" height="1024" class="aligncenter size-large wp-image-200" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://y-aji.com/?feed=rss2&amp;p=201</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
