<?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>Pacelg</title>
	<atom:link href="http://pacelg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pacelg.com</link>
	<description></description>
	<lastBuildDate>Thu, 10 May 2012 08:41:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Art on Wires workshops and KANDU Arduino workshop</title>
		<link>http://pacelg.com/art-on-wires-workshops-and-kandu-arduino-workshop/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=art-on-wires-workshops-and-kandu-arduino-workshop</link>
		<comments>http://pacelg.com/art-on-wires-workshops-and-kandu-arduino-workshop/#comments</comments>
		<pubDate>Sun, 06 May 2012 20:31:36 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Cupcake]]></category>
		<category><![CDATA[Snuff]]></category>
		<category><![CDATA[Workshop]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=946</guid>
		<description><![CDATA[&#160; The last week have been a rather nice one, it started out with one day with full focus on my master thesis and I got a lot of work done, and with one workday done it was time to do cool stuff. So three of the days I participated in workshops arranged by Art-On-Wires [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>The last week have been a rather nice one, it started out with one day with full focus on my master thesis and I got a lot of work done, and with one workday done it was time to do cool stuff. So three of the days I participated in workshops arranged by Art-On-Wires (<a href="http://art-on-wires.org">http://art-on-wires.org</a>) and one day I helped holding a Arduino workshop for KANDU (<a href="http://kandu.no">http://kandu.no</a>).<br />
The workshops at Art On Wires was really cool, i learned a lot of stuff and met a lot of interesting people from all over the globe. Two of the days I attended a snuff workshop where we build our own radio frequencies sniffer device that could listen to all frequencies between 0.1 and 2.4 Ghz.</p>
<div id="attachment_951" class="wp-caption aligncenter" style="width: 310px"><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6211.jpg"><img class="wp-image-951 " title="CIMG6211" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6211.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">The awesome device</p></div>
<p style="text-align: left;">The first day we mainly build the device, talked a lot about it and how it could be used. The second day of the workshop I connected it up to the computer and wrote a application that can analyze the sound waves that the snuffer emits, and made a filter that can detect Bluetooth traffic. I did that through a furrier transformation and found the tones that where particulary high during Bluetooth communication. Other types of communication was not that easy to map as they did not spike any tones the same way as Bluetooth did, but they produces some quite distinctive wave forms, but I am not that good with signal processing so I just let it go and had a good time chatting with the other fellas instead.</p>
<p style="text-align: left;"> At the DIY workshop held by Andread Monopolis (<a href="http://www.monopolis.gr/MOCM/">http://www.monopolis.gr/MOCM/</a>) we first made the MOCM 555 timer kit (which I have done several times before) and then we started modifying it to use several sensors, other circuits and light to oscillate the timer and that was really a lot of fun. Andreas also have quite the focus on making things look pretty, as you can see from his projects, so we also had to build the device into a box. Mine ended out looking like this:</p>
<div id="attachment_973" class="wp-caption aligncenter" style="width: 310px"><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6233.jpg"><img class="size-medium wp-image-973" title="CIMG6233" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6233-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">My Sound Box</p></div>
<p>At Saturday Roger and I was invited to KANDU to hold an Arduino workshop for about 20 people after the guy who was intended to hold it couldn&#8217;t do it. We introduced them to Arduino, showed them how to make a LED blink, how to make the Arduino take Input and how to communicate over Serial both to and from the computer. Everybody seemed to have a good time and we got some good feedback after the workshop. I must say that it was a completely different experience then doing the exact same stuff at the university, I really enjoyed it. I don&#8217;t have any pictures from the workshop, but I do have some from Art-On-Wires.</p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6207.jpg"><img class="aligncenter size-medium wp-image-947" title="CIMG6207" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6207-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6214.jpg"><img class="aligncenter size-medium wp-image-954" title="CIMG6214" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6214-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6217.jpg"><img class="aligncenter size-medium wp-image-957" title="CIMG6217" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6217-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6218.jpg"><img class="aligncenter size-medium wp-image-958" title="CIMG6218" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6218-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6222.jpg"><img class="aligncenter size-medium wp-image-962" title="CIMG6222" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6222-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6220.jpg"><img class="aligncenter size-medium wp-image-960" title="CIMG6220" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6220-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6230.jpg"><img class="aligncenter size-medium wp-image-970" title="CIMG6230" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6230-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6232.jpg"><img class="aligncenter size-medium wp-image-972" title="CIMG6232" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6232-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6212.jpg"><img class="aligncenter size-medium wp-image-952" title="CIMG6212" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6212-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>And to top it all off, I ended this week by making some great cupcakes.<a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6240.jpg"><img class="aligncenter size-medium wp-image-975" title="CIMG6240" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6240-e1336336017246-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6244.jpg"><img class="aligncenter size-medium wp-image-979" title="CIMG6244" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6244-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6246.jpg"><img class="aligncenter size-medium wp-image-981" title="CIMG6246" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6246-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://pacelg.com/wp-content/uploads/2012/05/CIMG6247.jpg"><img class="aligncenter size-medium wp-image-982" title="CIMG6247" src="http://pacelg.com/wp-content/uploads/2012/05/CIMG6247-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/art-on-wires-workshops-and-kandu-arduino-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RFID Bar application</title>
		<link>http://pacelg.com/rfid-bar-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rfid-bar-application</link>
		<comments>http://pacelg.com/rfid-bar-application/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 15:26:20 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[App]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[alcohol]]></category>
		<category><![CDATA[Bar]]></category>
		<category><![CDATA[RFID]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=937</guid>
		<description><![CDATA[I bought a RFID module that operates on 13.56Mzh a while back and have never really goten around to test it out much, but since this is the last weeks of my master thesis I might as well spend some time finding out how it works. After googling the device I found no example code [...]]]></description>
			<content:encoded><![CDATA[<p>I bought a RFID module that operates on 13.56Mzh a while back and have never really goten around to test it out much, but since this is the last weeks of my master thesis I might as well spend some time finding out how it works.</p>
<p>After googling the device I found no example code for the device, only a lot of resellers that stated that you could get the code after purchasing it. So I contacted the guy who sold me one and I got the code. I found out that my student card operates on the same frequency and that the device is capable of writing to cards, so I had to remove that part of the code in order to dare to use it with my student card.  The complete code example is available here: <span><a href="http://www.b2cqshop.com/best/rfidQ00415203.rar" target="_blank">http://www.b2cqshop.com/best/<wbr>rfidQ00415203.rar</wbr></a></span></p>
<p>I modified the code so that it would recognize a card and print a statement depending on wich card it was, after that my loop would look like this:</p>
<pre class="wp-code-highlight prettyprint linenums:1">void loop(){
  uchar i,tmp;
  uchar status;
  uchar str[MAX_LEN];
  uchar RC_size;
  uchar blockAddr;

  status = MFRC522_Request(PICC_REQIDL, str);	//don't know if this line is needed
  status = MFRC522_Anticoll(str);
  memcpy(serNum, str, 5);
    if (status == MI_OK)
    {
    if(serNum[0] == 0x12 &amp;&amp; serNum[1] == 0xD7 &amp;&amp;  serNum[2] == 0xAA &amp;&amp; serNum[3] == 0x50 &amp;&amp; serNum[4] == 0x3F){
       Serial.println(&quot;Vodka&quot;);
       delay(1000);
    }
     if(serNum[0] == 0x93 &amp;&amp; serNum[1] == 0x1F &amp;&amp; serNum[2] == 0x40 &amp;&amp; serNum[3] == 0xA8 &amp;&amp; serNum[4] == 0x64){
       Serial.println(&quot;Bacardi&quot;);
       delay(1000);
    }
     if(serNum[0] == 0x42 &amp;&amp; serNum[1] == 0x15 &amp;&amp; serNum[2] == 0x06 &amp;&amp; serNum[3] == 0xB7 &amp;&amp; serNum[4] == 0xE6){
       Serial.println(&quot;Cognac&quot;);
       delay(1000);
    }
  }
  MFRC522_Halt();
}</pre>
<p>Now it is time to do something fun with all of this, and what is more fun then letting the electronics what you should drink depending on the type of booze you choose. So I wrote a quick and dirty processing application, I didn&#8217;t bother to abstract things into methods, I just wanted it to work and display nice results as fast as I could, and in fact the application was done in less then ten minutes, so I was in fact happy with my performance. The code for my processing application is right here:</p>
<pre class="wp-code-highlight prettyprint linenums:1">import processing.serial.*;

Serial myPort;
String val = &quot;&quot;;
PImage b;

void setup()
{
  size(600, 400);
  String portName = Serial.list()[0];
  myPort = new Serial(this, portName, 9600);
}

void draw()
{
  if ( myPort.available() &amp;gt; 0) {
    val = myPort.readStringUntil('\n');
    background(255);
    if (val != null) {
      val = trim(val);
      if ( val.equals(&quot;Bacardi&quot;)) {
        b = loadImage(&quot;Bacardi.jpg&quot;);
        textSize(32);
        image(b, 0, 0, 300, 400);
        fill(0, 102, 153, 51);
        text(&quot;Bacardi&quot;, 320, 40);
        fill(0, 102, 153);
        text(&quot;Bacardi&quot;, 320, 60);
        fill(0, 102, 153, 51);
        text(&quot;Bacardi&quot;, 320, 80);
        fill(0, 0, 0);

        textSize(24);
        text(&quot;Drink Suggestion&quot;, 320, 130);
        textSize(22);
        text(&quot;Otter Pop&quot;, 320, 160);
        textSize(16);
        text(&quot;1/2 oz Bacardi® white rum&quot;, 320, 200);
        text(&quot;1/2 oz Blue Curacao liqueur&quot;, 320, 220);
        text(&quot;1/4 oz sweet and sour mix&quot;, 320, 240);
        text(&quot;1/4 oz 7-Up® soda&quot;, 320, 260);
      }
      if ( val.equals(&quot;Cognac&quot;)) {
        b = loadImage(&quot;Cognac.jpg&quot;);
        image(b, 0, 0, 300, 400);
        textSize(32);
        image(b, 0, 0, 300, 400);
        fill(0, 102, 153, 51);
        text(&quot;Braastad XO&quot;, 320, 40);
        fill(0, 102, 153);
        text(&quot;Braastad XO&quot;, 320, 60);
        fill(0, 102, 153, 51);
        text(&quot;Braastad XO&quot;, 320, 80);       

        fill(0, 0, 0);
        textSize(24);
        text(&quot;Drink Suggestion&quot;, 320, 130);
        textSize(16);
        text(&quot;Pour 4cc in a glass, enjoy&quot;, 320, 180);
      }
      if ( val.equals(&quot;Vodka&quot;)) {
        b = loadImage(&quot;vodka.jpg&quot;);
        image(b, 0, 0, 300, 400);
        textSize(32);
        image(b, 0, 0, 300, 400);
        fill(0, 102, 153, 51);
        text(&quot;Vikingfjord&quot;, 320, 40);
        fill(0, 102, 153);
        text(&quot;Vikingfjord&quot;, 320, 60);
        fill(0, 102, 153, 51);
        text(&quot;Vikingfjord&quot;, 320, 80);
        fill(0, 0, 0);
        textSize(24);
        text(&quot;Drink Suggestion&quot;, 320, 130);
        textSize(22);
        text(&quot;Vikingfjord Vodka Mojito&quot;, 320, 160);
        textSize(16);
        text(&quot;2 oz Vikingfjord Vodka&quot;, 320, 200);
        text(&quot;¾ lime cut into wedges&quot;, 320, 220);
        text(&quot;8-10 mint leaves&quot;, 320, 240);
        text(&quot;granulated cane sugar&quot;, 320, 260);
      }
    }
  }
}</pre>
<p>Now I taped my tags underneath three bottles, and when I scanned them processing displayed a picture of the bottle and a recipe on a drink made with that type of booze. The video have some glitching and weird zoom effects, but that is just youtube trying to fix my shaky hand.<br />
<iframe src="http://www.youtube.com/embed/LvJmanxzNb0" frameborder="0" width="640" height="360"></iframe></p>
<p>And screenshots from the program:</p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/04/braastad.png"><img class="alignnone size-full wp-image-938" title="braastad" src="http://pacelg.com/wp-content/uploads/2012/04/braastad.png" alt="" width="617" height="439" /></a></p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/04/viking.png"><img class="alignnone size-full wp-image-939" title="viking" src="http://pacelg.com/wp-content/uploads/2012/04/viking.png" alt="" width="616" height="437" /></a></p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/04/xo.png"><img class="alignnone size-full wp-image-940" title="xo" src="http://pacelg.com/wp-content/uploads/2012/04/xo.png" alt="" width="613" height="432" /></a></p>
<p>The next step in this project is to get hold of a lot more tags, stick them to all the bottles. Fill up a database with a lot of recipes. Make a random recipe chooser, and of course buy a big house with a bar section and build everything into the bar.</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/rfid-bar-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATtiny programming and Custom blinkM</title>
		<link>http://pacelg.com/attiny-programming-and-custom-blinkm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=attiny-programming-and-custom-blinkm</link>
		<comments>http://pacelg.com/attiny-programming-and-custom-blinkm/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 14:02:26 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ATTiny]]></category>
		<category><![CDATA[blinkM]]></category>
		<category><![CDATA[Led]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=903</guid>
		<description><![CDATA[Today I have accomplished two things, I finally managed to program the attiny45 and the attingy2313 with an Arduino as ISP and I managed to create a simple dead bug style RGB led with the attiny45. This is the start of creating my own blinkM modules. Let me start telling you about the really fun [...]]]></description>
			<content:encoded><![CDATA[<p>Today I have accomplished two things, I finally managed to program the attiny45 and the attingy2313 with an Arduino as ISP and I managed to create a simple dead bug style RGB led with the attiny45. This is the start of creating my own blinkM modules.</p>
<p>Let me start telling you about the really fun part, the part that can be reused in several  embedded projects, about the programing of the attiny micro controllers. If you are using an Arduino board as a ISP programmer the process is super simple, I&#8217;m sure that it is super simple if you use a designated programmer as well, but I haven&#8217;t tried that yet.</p>
<p>So the first step is to upload the ArduinoISP sketch to your Arduino board, and voila your Arduino card is ready to program a lot of stuff. The second step is to download these <a href="http://code.google.com/p/arduino-tiny/downloads/list">files</a> and place them in a new folder called &#8220;hardware&#8221; that you place in your arduino sketch folder. This folder is often located in your documents folder on windows and mac. After these files are placed in the hardware folder you must restart your Arduino IDE, then you will find a range of attiny options in your board menu in the Arduino IDE.</p>
<p>Now the next step is to connect everything up correctly, the first thing I would do (so I don&#8217;t forget) is to put a 330ohm resistor between the reset pin and the 5v pin on the Arduino card, this is so the card wont reset itself when we upload code. If a 330ohm resistor don&#8217;t work try a 120ohm, I even read rumors about a 500ohm resistor working.</p>
<p>So the next step is to connect the attiny you want to program up to power and ground, on both chips the pin on the top right should be connected to 5v and the bottom left connected to ground (GND). Then we can connect the reset pin on the attiny to pin 10 on the Arduino card. The attiny reset pin is pin number one, on the up left corner. Then we can connect the MOSI pin to Arduino pin 11. That&#8217;s pin 17 on attiny2313 and pin5 on attiny45. Following we connect Arduino pin 12 to the MISO pin, that&#8217;s pin 18 on attiny2313 and pin 6 on attiny45. Then the last pin is the SCL that is connected to Arduino pin 13, that&#8217;s pin 19 on attiny2313 and pin 7 on attiny45. The pin layout for the attiny&#8217;s can be seen below</p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint linenums:1">                   +-\/-+
 RST  (D 17) PA2  1|    |20  VCC
 RX   (D  0) PD0  2|    |19  PB7 (D  16)  SCL
 TX   (D  1) PD1  3|    |18  PB6 (D  15)  MISO
      (D  2) PA1  4|    |17  PB5 (D  14)  MOSI
      (D  3) PA0  5|    |16  PB4 (D  13)*
 INT0 (D  4) PD2  6|    |15  PB3 (D  12)*
 INT1 (D  5) PD3  7|    |14  PB2 (D  11)*
      (D  6) PD4  8|    |13  PB1 (D  10)
    *(D  7) PD5  9|    |12  PB0 (D  9)
            GND 10|    |11  PD6 (D  8)
                  +----+</pre>
<p>b</p>
<pre class="wp-code-highlight prettyprint linenums:1">                           +-\/-+
  Ain0  RST  (D  5)  PB5  1|    |8   VCC
  Ain3       (D  3)  PB3  2|    |7   PB2  (D  2)  INT0  Ain1  SCL
  Ain2       (D  4)  PB4  3|    |6   PB1  (D  1)        pwm1  MISO
                     GND  4|    |5   PB0  (D  0)        pwm0  MOSI
                           +----+</pre>
<p>And all the connections in a tidy table.</p>
<table>
<tbody>
<tr>
<td>Arduino</td>
<td>Attiny45</td>
<td>atiny2313</td>
</tr>
<tr>
<td>pin 13</td>
<td>pin 7</td>
<td>pin 19</td>
</tr>
<tr>
<td>pin 12</td>
<td>pin 6</td>
<td>pin 18</td>
</tr>
<tr>
<td>pin 11</td>
<td>pin 5</td>
<td>pin 17</td>
</tr>
<tr>
<td>pin 10</td>
<td>pin 1</td>
<td>pin 1</td>
</tr>
<tr>
<td>5v</td>
<td>pin 8</td>
<td>pin 4</td>
</tr>
<tr>
<td>GND</td>
<td>pin 4</td>
<td>pin 10</td>
</tr>
</tbody>
</table>
<p>Now that everything is connected right it&#8217;s time to program something cool, and nothing is cooler the getting your first led to blink on a new platform. So load up the blink sketch from the arduino example library and change the pin number to something appropriate. For example digital pin 0 is pin 5 on attiny45 and pin 2 on attiny 2313. Then select the appropriate board from the board menu, ATtiny 45 @ 8Mzh or  ATtiny2313 @ 8Mzh. Then you upload the code as usual and the ArduinoISP loaded on your arduino board will make sure that the program is loaded on the connected micro controller. When this is done connect a led and a resistor to the appropriate pin and watch it blink like the little mayhem it is.</p>
<div id="attachment_911" class="wp-caption aligncenter" style="width: 460px"><a href="http://pacelg.com/wp-content/uploads/2012/04/IMAG2533.jpg"><img class=" wp-image-911 " title="IMAG2533" src="http://pacelg.com/wp-content/uploads/2012/04/IMAG2533-300x179.jpg" alt="" width="450" height="280" /></a><p class="wp-caption-text">The three top leds are staus leds for the ISP scetch, and the bottom yellow is controlled by the ATtiny2313 and the red is controlled by the ATtiny45</p></div>
<p><iframe src="http://www.youtube.com/embed/prHnDUZ2NXc" frameborder="0" width="640" height="360"></iframe></p>
<p>&nbsp;</p>
<p>Now that you have managed to program your own ATtiny micro controller the world of making small stuff is at your feet&#8217;s, I know what I am going to do, namely continue to create my own variant of the blinkM module. So far I have only made a dead bug style RGB controller that cycles through RGB. The LED is soldered to the ATtiny45 with three 330ohms resistors and a little piece of wire. And now I can place it anywhere, give it power and it will glow for as long as it can.</p>
<p>The next step is to implement a communication protocol over I2C so that it will become really easy to communicate with the little chip.</p>
<p style="text-align: center;">Here is some pictures and a video:<br />
<a href="http://pacelg.com/wp-content/uploads/2012/04/IMAG2535.jpg"><img class=" wp-image-913 aligncenter" title="IMAG2535" src="http://pacelg.com/wp-content/uploads/2012/04/IMAG2535-300x179.jpg" alt="" width="438" height="261" /></a></p>
<p><iframe src="http://www.youtube.com/embed/c0hpK-hfi4I" frameborder="0" width="640" height="360"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/attiny-programming-and-custom-blinkm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bluetooth heaven</title>
		<link>http://pacelg.com/bluetooth-heaven/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bluetooth-heaven</link>
		<comments>http://pacelg.com/bluetooth-heaven/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 22:40:33 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Master]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=898</guid>
		<description><![CDATA[I have for a long time dreamed about connecting my Arduino with bluetooth, and in fact I have owned two bluetooth modules since early 2011. So now it was really time to get cracking, there is only two weeks until my master thesis is originally due, so why not do something completely different, right. The [...]]]></description>
			<content:encoded><![CDATA[<p>I have for a long time dreamed about connecting my Arduino with bluetooth, and in fact I have owned two bluetooth modules since early 2011. So now it was really time to get cracking, there is only two weeks until my master thesis is originally due, so why not do something completely different, right.</p>
<p>The last time I tried to get the bluetooth modules to work I sat a couple of hours scratching my head and googled every bluetooth-Arduino search phrase possible without getting it to work, but today a little epiphany came to me while I was sitting and trying to get it to work once more.It turned out that I had neglected a tiny detail that turned out to be rather essential.</p>
<p>My super simple bluetooth module is so super simple, and designed with Arduino in mind, that it does in fact not communicate over bluetooth on the regular bluetooth baud rate(115200) but uses the standard Arduino baud rate (9600). This means that it is a little slower then regular bluetooth, but still several hundreds times faster then me when I am speaking.</p>
<p>After putting the new settings in the Arduino code and into Putty I was able to communicate and turn my first led on and off over bluetooth, it was amazing.</p>
<p>The code I used is super simple and can be used with either bluetooth or regulare serial communication, and if I don&#8217;t remember wrong it is the same as with xBee aswell.</p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint linenums:1">char val;
int ledpin = 13;

void setup()
{
  pinMode(ledpin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  if( Serial.available() )
  {
    val = Serial.read();

    if( val == '0' )
    {
     digitalWrite(ledpin, LOW);
     Serial.println(&quot;13 off&quot;);
    }

    if( val == '1' )
    {
      digitalWrite(ledpin, HIGH);
      Serial.println(&quot;13 on&quot;);
    }
  }
}</pre>
<p>So now it is time for me to create a nice thing to hang on my wall that can tell me everything from how many email Ihave to read, how warm or cold it is outside, if someone tweeted to me, if I have a notification on facebook and so on. Or it is just time to put the modules back into the box and forget them untill my master thesis is delivered.</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/bluetooth-heaven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Egg carton Lights</title>
		<link>http://pacelg.com/egg-carton-lights/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=egg-carton-lights</link>
		<comments>http://pacelg.com/egg-carton-lights/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 20:28:58 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Led]]></category>
		<category><![CDATA[RGB]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=890</guid>
		<description><![CDATA[After making the Party in a Jar I wanted to create more but it is boring to make the same things over and over again, so I descided to look for something else to make and in the spirit of recyceling, which Kine is very fond of, I found three old egg cartons. Egg carton [...]]]></description>
			<content:encoded><![CDATA[<p>After making the <a title="PartyJar" href="http://pacelg.com/partyjar/">Party in a Jar</a> I wanted to create more but it is boring to make the same things over and over again, so I descided to look for something else to make and in the spirit of recyceling, which Kine is very fond of, I found three old egg cartons. Egg carton have nice shapes and have potential to become a lot of cool stuff, it is just a mather of geting the right idea at the right time.</p>
<p>I got an idea, and it was hopefully at the right time. If you turn an egg carton upsidedown you can see five deep holes and I figured tht if I could fill those holes with light it would look rather nice. And indeed it did. I must be some kind of an average genious (did I spell that right?).</p>
<p class="alignnone size-medium wp-image-892" title="IMAG2339">So what I did was to fit one rgb blinking led in each top (or bottom) of the egg carton egg divider sphere, soldered them to some wires, added a battery and woila, it looks pretty from the sides, it is in fact a litle to bright when you watch it straight on, but not as bright as in the videos . My phone camera have an isue with led lights.</p>
<table width="549">
<tbody>
<tr>
<td><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2339.jpg"><img title="IMAG2339" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2339-179x300.jpg" alt="" width="179" height="300" /></a>
</td>
<td><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2341.jpg"><img class="alignnone size-medium wp-image-893" title="IMAG2341" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2341-179x300.jpg" alt="" width="179" height="300" /></a></p>
</td>
<td><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2343.jpg"><img class="alignnone size-medium wp-image-894" title="IMAG2343" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2343-179x300.jpg" alt="" width="179" height="300" /></a></td>
</tr>
</tbody>
</table>
<p><iframe src="http://www.youtube.com/embed/UpbCi7-BT7A" frameborder="0" width="640" height="480"></iframe></p>
<p><iframe src="http://www.youtube.com/embed/jn6WVArRPpU" frameborder="0" width="640" height="480"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/egg-carton-lights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wire Animals</title>
		<link>http://pacelg.com/wire-animals/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wire-animals</link>
		<comments>http://pacelg.com/wire-animals/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 16:20:18 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Wireanimals]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=880</guid>
		<description><![CDATA[Today Kine came to ifi and created stuff with me, while I put my finnishing touch on the big orange robot that are going to revolutionise the state machine world. Kine made a yellow dog, a black monkey and a white flower. arent they pretty?]]></description>
			<content:encoded><![CDATA[<p>Today Kine came to ifi and created stuff with me, while I put my finnishing touch on the big orange robot that are going to revolutionise the state machine world.</p>
<p>Kine made a yellow dog, a black monkey and a white flower. arent they pretty?</p>
<table>
<tbody>
<tr>
<td><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2314.jpg"><img class="alignnone size-medium wp-image-882" title="IMAG2314" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2314-300x179.jpg" alt="" width="300" height="179" /></a></td>
<td><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2315.jpg"><img class="alignnone size-medium wp-image-883" title="IMAG2315" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2315-300x179.jpg" alt="" width="300" height="179" /></a></td>
</tr>
</tbody>
</table>
<p><a href="http://pacelg.com/wp-content/uploads/2012/02/IMAG2319.jpg"><img class="alignnone size-medium wp-image-887" title="IMAG2319" src="http://pacelg.com/wp-content/uploads/2012/02/IMAG2319-300x179.jpg" alt="" width="300" height="179" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/wire-animals/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Training Master Students</title>
		<link>http://pacelg.com/training-master-students/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=training-master-students</link>
		<comments>http://pacelg.com/training-master-students/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 19:30:32 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Master]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[ThingML]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=844</guid>
		<description><![CDATA[Once upon a time. I, the mighty master student, was granted the privilege to train two other master students and mold them in my image. This was a clever plan created by the two research lords who worked compiler magic to generate new programing languages for the working man to enjoy. Having two apprentices when [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time.<br />
I, the mighty master student, was granted the privilege to train two other master students and mold them in my image. This was a clever plan created by the two research lords who worked compiler magic to generate new programing languages for the working man to enjoy.</p>
<p>Having two apprentices when you are just a master student sound like a great deal of responsibility, and I, the mighty master student, can agree on that. In fact it is almost to much responsibility, but luckily for me they are for the most part obedient, at least if it is not on a day where a horde of web comics are released, if that is the case Kyrre is lost in the depth of the all-knowing interwebz.</p>
<p>The master plan of the research lords are to provide the general public with a programing language that the simplest peasant can program as if he was the king of programmers. This new glorious programming language are called ThingML and is supposed to be able to<br />
<em>program</em><br />
<em>all the things</em><br />
One of the visions the research lords have is that everything that is programmed should be able to access the all-knowing interwebz, and since the interwebz is in fact all-knowing all things that are interlaced with the interwebz could also be all-knowing. Imagine the wast amount of things that would know everything. Your toaster could know what the weather is, your fridge could know today&#8217;s quests, your electric toothbrush could know your kill count and the TV schedule and your computer could know how often you brush your teeth, how often you open your fridge and how often opening the fridge results in  a toast.</p>
<p>This is a vision well shared with the mighty master student, and a vision that I, the mighty master student, are trying to push down on my apprentices.</p>
<p>To get my apprentices to fully grasp this great heaven like  idea I must train them like only a mighty master student can do, and I believe that the best way to train is to head out to life threatening programing quests that could fail miserably or bring home gold and fortune to your fellow programmers.</p>
<p>This day I sent my young students on a very dangerous quest, and I must admit that I was not expecting either of them to complete this task by the end of this day, but in fact they both manage to shine through and prove them self very special. The quest the mighty master student gave them on this glorious day was to make a potentiometer of doom to control the timer interrupts of great descending and ultimately control the rate of which a mystical LED is blinking. This was not a trivial quest, one might thing so, but only if one have yet to try out the magnificent language of ThingML. It is a state machine oriented language that requires you to program the potentiometer of doom in one realm and the mystical LED in a whole another realm. This I did not know in my youth and had to learn the hard way, by trial and error and then directly from the research lords. My apprentices on the other hand got this knowledge as a hint in the quest description.</p>
<p>You might also wonder how the apprentices solved this quest, and I will tell you that great tale. They used the simplest of logic, they avoided all bloathiness by dodging all dangerous obstacles through learning and exploring of all great things in the land of ThingML. They traversed files and found hidden messages that could travel through enchanted ports and trigger old mythological states to act on newly discovered input from the potentiometer of doom. They did well and earned them self a great loot of XP and wisdom.</p>
<p>In fact they did better then their almigty teacher and earned more xp then I did on that spesific quest in my youth. Not only did the both manage to finnish the quest with a lower linecount, but also by using fewer enchanted ports and hidden messages.</p>
<p>But in order to show you, the reader of this tale, that I am not a noob, but still better then my two young padawans, my code had the great ability to cancel out any timer events on the LED and restart it when needed, theirs code could not.</p>
<p>Here you can see Kyrres code</p>
<pre class="wp-code-highlight prettyprint linenums:1">import &quot;../../hardware/bricks/led.thingml&quot;
import &quot;../../hardware/io/analog_input.thingml&quot;

thing portRGB includes TimerMsgs, LedMsgs, AnalogInputMsgs {

   property temp : UInt16 = 100

   required port timer {

       receives timer_timeout
       sends timer_start, timer_cancel
       }

   required port led {

       sends led_on, led_off, led_toggle

       }

       required port input {
           receives analog_input_value
           sends read_analog_input
           }

       statechart portRGBImpl init green {

           state Led {

               on entry do
                  timer!timer_start (temp)
               end

               transition-&amp;gt;Led
               event timer?timer_timeout

           }
           region potMeter init pot {

             state pot {

                      on entry do
                      input!read_analog_input ()
                      end

                      transition-&amp;gt;pot
                      event m: input?analog_input_value
                      action do
                         if(m.value &amp;gt; 1) do
                             temp = m.value
                          end
                      end

           }
       }
    }
}</pre>
<p>And here comes the code that I, the almighty master student, wrote in my youth:</p>
<pre class="wp-code-highlight prettyprint linenums:1">import &quot;../../hardware/io/analog_input.thingml&quot;
import &quot;../../hardware/bricks/led.thingml&quot;

thing AnalogReadBlink includes AnalogInputMsgs, TimerMsgs, LedMsgs{

    property freq : UInt16 = 0

    required port TimerPot
    {
        sends timer_start
        receives timer_timeout
    }
    required port TimerLed
    {
        sends timer_start
        sends timer_cancel
        receives timer_timeout
    }

    required port Led
    {
        sends led_toggle
    }

    required port AnalogInput
    {
        sends read_analog_input
        receives analog_input_value
    }

    message update();

    provided port ReceiveUpdate
    {
        receives update
    }
    required port SendsUpdate
    {
        sends update
    }    

    statechart AnalogReadBlinkImpl init ReadPot
    {
        property delay : UInt16 = 100

        state ReadPot
        {
            on entry do
                AnalogInput!read_analog_input()
                TimerPot!timer_start(20)
            end

            internal event m : AnalogInput?analog_input_value
            action do
                if( not (delay == m.value)) do
                    if( not (m.value == 0)) do
                        if (m.value &lt; delay - 3 or m.value &gt; delay + 3) do
                        delay = m.value
                        SendsUpdate!update()
                        'Serial.println('&amp; m.value &amp;');'
                        end
                    end 

                end
            end

            transition -&gt; ReadPot
            event TimerPot?timer_timeout

        }

        region Led init Blink
        {
         state Blink
         {
             on entry  do
                Led!led_toggle()
                TimerLed!timer_start(delay)
             end

             transition -&gt;Blink
             event TimerLed?timer_timeout

             transition -&gt; Blink
             event ReceiveUpdate?update
             action TimerLed!timer_cancel()
         }
    }
}</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/training-master-students/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Led Clock Coding Tutorial</title>
		<link>http://pacelg.com/led-clock-coding-tutorial/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=led-clock-coding-tutorial</link>
		<comments>http://pacelg.com/led-clock-coding-tutorial/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 22:43:15 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Binary]]></category>
		<category><![CDATA[Led Clock]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=840</guid>
		<description><![CDATA[As you might know, or will know in three seconds, I have made a Binary Led Clock.  I posted a tutorial on how to build it with physical materials, by soldering and swearing. This time I will walk you through the code, and guess what, the code have hidden features that I have not implemented [...]]]></description>
			<content:encoded><![CDATA[<p>As you might know, or will know in three seconds, I have made a <a title="LED Clock" href="http://pacelg.com/led-clock/">Binary Led Clock</a>.  I posted a tutorial on how to build it with physical materials, by soldering and swearing. This time I will walk you through the code, and guess what, the code have hidden features that I have not implemented suport for in the current physical version of the clock.</p>
<p>Okay, lets start of with the pin declaration:</p>
<pre class="wp-code-highlight prettyprint linenums:1">int sekData = 11, minData = 8, hourData = 5;
int sekClock = 12, minClock = 9, hourClock = 6;
int sekLatch = 13, minLatch = 10, hourLatch = 7;</pre>
<p>As you can see, I use nine pins, three for each shift register. Then I also have to define them as output pins in the Arduino enviroment.</p>
<pre class="wp-code-highlight prettyprint linenums:1">  pinMode(sekData, OUTPUT);
  pinMode(sekClock, OUTPUT );
  pinMode(sekLatch, OUTPUT);

  pinMode(minData, OUTPUT);
  pinMode(minClock, OUTPUT );
  pinMode(minLatch, OUTPUT);

  pinMode(hourData, OUTPUT);
  pinMode(hourClock, OUTPUT );
  pinMode(hourLatch, OUTPUT);</pre>
<p>Then I must assign a variable to store the time in minutes and hours, notice that I don&#8217;t do anything about the seconds, this is because I don&#8217;t feel that I need the functionality to set the seconds.</p>
<pre class="wp-code-highlight prettyprint linenums:1">  int i = 13;
  int j = 43;</pre>
<p>i is for hours and j is for minutes.</p>
<p>Then the first thing I want to do in the setup method after making the pinMode statements is to flush all the shift registers to avoid having old data in them. This is done by calling three methods I have written. Also I&#8217;m attaching two interrupts, and we have code that looks like this:</p>
<pre class="wp-code-highlight prettyprint linenums:1">  //Flasher sekund ledsa
  updateSek(0);
  //Flusher min og time registeret
  updateMin(j);
  updateHour(i);
  //Setter interrup handlere
  attachInterrupt(0, setMin, RISING);
  attachInterrupt(1, setTime, RISING);</pre>
<p>As you might see the two interrupts are calling on two methods called setMin and setTime, which basically means set minute and set hour. Don&#8217;t mind my Norwegian coding style ;) It is mainly to confuse myself ;)<br />
But anyways, these two methods are defined like this:</p>
<pre class="wp-code-highlight prettyprint linenums:1">void setMin(){
  j++;
  if(j == 60)
  {
    j = 0;
  }
  digitalWrite(minLatch, LOW);
  shiftOut(minData, minClock, MSBFIRST, j);
  digitalWrite(minLatch, HIGH);
}

void setTime(){
  i++;
  if(i == 24){
    i = 0;
  }
  digitalWrite(hourLatch, LOW);
  shiftOut(hourData, hourClock, MSBFIRST, i);
  digitalWrite(hourLatch, HIGH);
}</pre>
<p>Ok, now it is time to start up the clock with the loop method, and this method is really simple, it waits one second, and updates the seconds counter, and if necessary, the minutes and hours as well. And it all looks like this:</p>
<pre class="wp-code-highlight prettyprint linenums:1">void loop(){

  //løper gjennom alle sekundene
    for(int k = 0; k &amp;lt; 61; k++){
       if(k == 60){
        k = 0;
        j++;
         if(j == 60){
          j = 0;
          i++;
          if(i == 24){
            i = 0;
          }
         }
       }
      // Serial.print(k);
      // Serial.print(&quot;-&quot;);
      // Serial.print(j);
      // Serial.print(&quot;-&quot;);
      // Serial.println(i);
       updateSek(k);
       updateMin(j);
       updateHour(i);
       delay(1000);
    }
}</pre>
<p>And then, at last the three methods that updates the shift register</p>
<pre class="wp-code-highlight prettyprint linenums:1">void updateSek(int value){
  digitalWrite(sekLatch, LOW);
  shiftOut(sekData, sekClock, MSBFIRST, value);
  digitalWrite(sekLatch, HIGH);
}

void updateMin(int value){
  digitalWrite(minLatch, LOW);
  shiftOut(minData, minClock, MSBFIRST, value);
  digitalWrite(minLatch, HIGH);
}

void updateHour(int value){
  digitalWrite(hourLatch, LOW);
  shiftOut(hourData, hourClock, MSBFIRST, value);
  digitalWrite(hourLatch, HIGH);
}</pre>
<p>And now, at last I will put all this code together for you to enjoy in case you didn&#8217;t manage to put it together in the right fashion yourself</p>
<pre class="wp-code-highlight prettyprint linenums:1">
//Setter pins på shift registerne
int sekData = 11, minData = 8, hourData = 5;
int sekClock = 12, minClock = 9, hourClock = 6;
int sekLatch = 13, minLatch = 10, hourLatch = 7;

//Setter bare litt tilfeldig starttid på klokka
  int i = 13;
  int j = 43; 

void setup(){

  //PinMode på alle shiftregisterne
 pinMode(sekData, OUTPUT);
 pinMode(sekClock, OUTPUT );
  pinMode(sekLatch, OUTPUT);

 pinMode(minData, OUTPUT);
 pinMode(minClock, OUTPUT );
  pinMode(minLatch, OUTPUT);

 pinMode(hourData, OUTPUT);
 pinMode(hourClock, OUTPUT );
  pinMode(hourLatch, OUTPUT);
  Serial.begin(9600);
  //Flasher sekund ledsa
  updateSek(0);
    //Flusher min og time registeret
  updateMin(j);
  updateHour(i);
  //Setter interrup handlere
  attachInterrupt(0, setMin, RISING);
  attachInterrupt(1, setTime, RISING);

}
//To metoder for stillig av klokka
void setMin(){
  j++;
  if(j == 60)
  {
    j = 0;
  }
  digitalWrite(minLatch, LOW);
  shiftOut(minData, minClock, MSBFIRST, j);
  digitalWrite(minLatch, HIGH);
}

void setTime(){
  i++;
  if(i == 24){
    i = 0;
  }
  digitalWrite(hourLatch, LOW);
  shiftOut(hourData, hourClock, MSBFIRST, i);
  digitalWrite(hourLatch, HIGH);
}

void loop(){

  //løper gjennom alle sekundene
    for(int k = 0; k &amp;lt; 61; k++){
       if(k == 60){
        k = 0;
        j++;
         if(j == 60){
          j = 0;
          i++;
          if(i == 24){
            i = 0;
          }
         }
       }
     //  Serial.print(k);
      // Serial.print(&quot;-&quot;);
      // Serial.print(j);
      // Serial.print(&quot;-&quot;);
      // Serial.println(i);
       updateSek(k);
        updateMin(j);
        updateHour(i);
       delay(1000);
    }
}

//The f do u think?
void updateSek(int value){
  digitalWrite(sekLatch, LOW);
  shiftOut(sekData, sekClock, MSBFIRST, value);
  digitalWrite(sekLatch, HIGH);
}

void updateMin(int value){
  digitalWrite(minLatch, LOW);
  shiftOut(minData, minClock, MSBFIRST, value);
  digitalWrite(minLatch, HIGH);
}

void updateHour(int value){
  digitalWrite(hourLatch, LOW);
  shiftOut(hourData, hourClock, MSBFIRST, value);
  digitalWrite(hourLatch, HIGH);
}</pre>
<p>Happy thrill.</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/led-clock-coding-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two-coloumn article</title>
		<link>http://pacelg.com/two-coloumn-article/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=two-coloumn-article</link>
		<comments>http://pacelg.com/two-coloumn-article/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 19:16:58 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Master]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Article]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=832</guid>
		<description><![CDATA[I don&#8217;t write a lot, but when I write scientific I use LaTeX. If you are above average in the field of common sense, you figured that I rather seldom write stuff in LaTeX, and that means that every time I&#8217;m writing stuff in LaTeX I must use google a lot. One could say that [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t write a lot, but when I write scientific I use LaTeX. If you are above average in the field of common sense, you figured that I rather seldom write stuff in LaTeX, and that means that every time I&#8217;m writing stuff in LaTeX I must use google a lot. One could say that I should write my thesis and article in Word instead, but where is the challenge in that, everything have a time limit, and I can&#8217;t risk holding that limit by using easy tools. No, I like living on the edge, therefore I use tools I don&#8217;t know well and use the time I should have been using writing my thesis on googling how to format one little piece of text.</p>
<p>These days I&#8217;m writing an article on how to improve transitions written in ThingML and showing of the great results I get, but writing an article is a little different from writing the master thesis, for starters, there is no front page, and it have to be in two columns. Needless to say I didn&#8217;t know how to do that, so I googled, I found, I wrote. Here I will put my article template for further reference.</p>
<pre class="wp-code-highlight prettyprint linenums:1">\documentclass[11pt,twocolumn]{article}

\begin{document}

\title{Something about ThingML Transitions}
\author{
    Jan Ole Skotterud\\
    Institute for Informatics\\
    University in Oslo\\
    janoleos@ifi.uio.no
}

\maketitle

\begin{abstract}
The abstract text goes here.
\end{abstract}

\section{Introduction}
Here is the text of your introduction.

\subsection{Subsection Heading Here}
Write your subsection text here.

\section{Conclusion}
Write your conclusion here.

\end{document}</pre>
<p>This will provide the foundation to write great articles that can be approved and cherished in scientific circles.</p>
<p>I also figured that my supervisor also might wan&#8217;t to have his name on the top of the first page and that required me to do some more googleing, the result that came back was the little but efficient TeX command \and, and there I could add more authors. Like this:</p>
<pre class="wp-code-highlight prettyprint linenums:1">\author{
    Jan Ole Skotterud\\
    Institute for Informatics\\
    University in Oslo\\
    janoleos@ifi.uio.no
  \and
    First Last\\
    Institute\\
    Uni\\
    Mail
}</pre>
<p>And just like that I have made my first reference blog post for LaTeX.<br />
Jippi Kay Yey Article Writer</p>
<p>Hehe, I also wanted a LaTeX related image for the header, so I googled latex, not a clever idea&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/two-coloumn-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Birthday at School</title>
		<link>http://pacelg.com/birthday-at-school/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=birthday-at-school</link>
		<comments>http://pacelg.com/birthday-at-school/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 15:03:37 +0000</pubDate>
		<dc:creator>Jan Ole</dc:creator>
				<category><![CDATA[Baking]]></category>
		<category><![CDATA[Beer]]></category>
		<category><![CDATA[Master]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Birthday]]></category>
		<category><![CDATA[Cake]]></category>
		<category><![CDATA[Dominion]]></category>
		<category><![CDATA[gifts]]></category>

		<guid isPermaLink="false">http://pacelg.com/?p=810</guid>
		<description><![CDATA[I must start of by saying thanks to all my friends, most of you congratulated me on facebook, but some of you went the extra mile to make my birthday a really special day. The day started as any other day, I went to school to work. When I got there, some of the girls [...]]]></description>
			<content:encoded><![CDATA[<p>I must start of by saying thanks to all my friends, most of you congratulated me on facebook, but some of you went the extra mile to make my birthday a really special day. The day started as any other day, I went to school to work. When I got there, some of the girls that I study with had been planning a little surprise. They had decorated the masters room on the sixth floor with balloons and glittery stuff. They all had birthday hats, Åshild had baked buns with nonstop inside, they were delicious and Lill had made me a really cool crown. It was made of origami flowers in different colors and she must have used a lot of time on that.</p>
<p>Through the day a lot of people came by to congratulate me, I even got some sweet gifts. Some of the gifts I got was cola, bamsemums, cola, Kinderegg, cola, a thsirt with linux. cola, cola, a origami bird ++.</p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/01/383253_10150714763869937_736069936_12233722_870009943_n.jpg"><img class="alignnone size-medium wp-image-820" title="383253_10150714763869937_736069936_12233722_870009943_n" src="http://pacelg.com/wp-content/uploads/2012/01/383253_10150714763869937_736069936_12233722_870009943_n-224x300.jpg" alt="" width="224" height="300" /></a></p>
<p>After a while Kine came by with food and cake, and the timing was great. It had been just enough time since lunch so most people managed to eat some more cake. You can never eat enough cake.</p>
<p>After most people had went home, I got some time alone at school to actually get some work done and after half an hour Frode called and we went to his place and took a couple of beers. Life was good.</p>
<p>Then it was time to get home and spend the last hour of the day with Kine. From her I got two expansion packs to Dominion. I got Cornucopia and Alchemy. We played a couple of rounds and then the last sms ticked in. And guess what, I had become an uncle again.</p>
<p>Ulrik came to the world 17.01.12 22:34. Weight 2440g and was 49 cm long.</p>
<p><a href="http://pacelg.com/wp-content/uploads/2012/01/407639_2863782205904_1600213429_2588120_1887486039_n.jpg"><img class="alignnone size-medium wp-image-812" title="407639_2863782205904_1600213429_2588120_1887486039_n" src="http://pacelg.com/wp-content/uploads/2012/01/407639_2863782205904_1600213429_2588120_1887486039_n-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Sooooo, little nephew. I guess we will have to come to an agreement on the newly acquired birthday issue&#8230;&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://pacelg.com/birthday-at-school/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

