<?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>dipzo: Babble</title>
	<atom:link href="http://www.dipzo.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.dipzo.com/wordpress</link>
	<description>Technology, Ideas and random thoughts by Darius Gai</description>
	<lastBuildDate>Tue, 15 Jun 2010 18:39:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First solo art project proposal over + Plug and Play sensors</title>
		<link>http://www.dipzo.com/wordpress/?p=81</link>
		<comments>http://www.dipzo.com/wordpress/?p=81#comments</comments>
		<pubDate>Tue, 15 Jun 2010 18:39:35 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=81</guid>
		<description><![CDATA[I just finished my first &#8220;solo interactive visualization art&#8221; project proposal. Other than just buzz words, the project is a social media aggregation visualization. The idea is that you can give it a key word(s) and it will search through various social media websites, gathering data that matches those words. It then displays a visualization [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my first &#8220;solo interactive visualization art&#8221; project proposal. Other than just buzz words, the project is a social media aggregation visualization. The idea is that you can give it a key word(s) and it will search through various social media websites, gathering data that matches those words. It then displays a visualization of the data in a vertical scroller along with other vital information (poster&#8217;s display pic, location, etc). The project is aptly entitled &#8220;Whatcha Talkin &#8216;Bout Willis?&#8221; in a tribute to recently deceased Gary Coleman &#8211; one of my favorite actors growing up. I will create a page for the project and describe it in more detail with pretty pictures. Hopefully sooner rather than later&#8230;</p>
<p>But now that the art proposal is over and I have some free time opening up I decided I&#8217;m going to re evaluate the work I had done earlier in developing a plug and play sensor solution. A couple months ago I came across the IEEE 1451.4 documentation which outlines a standard for plug and play sensors. I plan on doing a full analysis of the standard figuring out the pros and cons and putting together a prototype. I plan on using a lot of my earlier work as a base and comparing my original ideas to those outlined in the spec and the costs and benefits of each. This will be my main focus for the next 2 months during my free time so you will be hearing a lot more about smart sensors in the next few posts</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m back!</title>
		<link>http://www.dipzo.com/wordpress/?p=80</link>
		<comments>http://www.dipzo.com/wordpress/?p=80#comments</comments>
		<pubDate>Sun, 06 Jun 2010 19:16:22 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=80</guid>
		<description><![CDATA[Noticed its been more than a year since I last updated this blog. Its been super crazy with moving to Sweden and all the art work. The blog got put on the back burner and eventually got forgotten about. However, now that I&#8217;m back in North America (New York City!!), I thought I&#8217;d restart posting [...]]]></description>
			<content:encoded><![CDATA[<p>Noticed its been more than a year since I last updated this blog. Its been super crazy with moving to Sweden and all the art work. The blog got put on the back burner and eventually got forgotten about. However, now that I&#8217;m back in North America (New York City!!), I thought I&#8217;d restart posting here.</p>
<p>So a little update of whats been going on:<br />
- Had my first art piece on display. I wish I had never said went on display this year. Check out http://www.iwishihadneversaid.com<br />
- Came second place in the first extinguishing robot competition. We did great in sensor instrumentation and speed but lost points in the autonomous behavior category.<br />
- Arduino work has been dropping off. Mostly cause I&#8217;ve been traveling so much and its tough to take all my equipment with me. That being said the arduino is reaching its limits for me. Getting much more interested in the PIC microcontrollers, especially the ones with an on board TCP/IP stack. Working on getting a &#8220;plug and play&#8221; sensor package created for them<br />
- My interest in web design has returned. I&#8217;m currently working for Large Animal Games in NYC. We make social facebook games and the work is very different from anything else I&#8217;ve ever done</p>
<p>Well thats really whats been up. Over time you&#8217;ll hear more about the projects I have on the go, which include &#8211; a variable tinting glass, a plug and play sensor network, a video game to encourage learning math, and a few art proposals that I&#8217;m currently working on.</p>
<p>Also I&#8217;ve decided to make this blog more than just technology. Over the last few years I&#8217;ve experienced a lot through my travels and I decided I should really be using this blog as a method to chronicle them.</p>
<p>Thats it for now</p>
<p>Ciao</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=80</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSL to RGB tutorial + Updated Rotary Encoder Library</title>
		<link>http://www.dipzo.com/wordpress/?p=50</link>
		<comments>http://www.dipzo.com/wordpress/?p=50#comments</comments>
		<pubDate>Wed, 22 Apr 2009 04:45:49 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=50</guid>
		<description><![CDATA[Background:
I am in the design process of a new project that uses a lot of RGB LEDs. In the project I want to allow the user to select various colours and I was looking for a fairly intuitive way to do this.
If one has ever worked with RGB LEDs you know you have to PWM [...]]]></description>
			<content:encoded><![CDATA[<p>Background:</p>
<p>I am in the design process of a new project that uses a lot of RGB LEDs. In the project I want to allow the user to select various colours and I was looking for a fairly intuitive way to do this.</p>
<p>If one has ever worked with RGB LEDs you know you have to PWM the values of each channel (R, G or B). Therefore for Red, I would PWM (255,0,0), for Green &#8211; (0,255,0), etc.</p>
<p>Now since each LED has 3 channels, you have to control three outputs. Therefore if I wanted to allow the user to be able to control the colour of an LED, I would have to have him control three sensors. That is a lot of inputs for one output (3 inputs per output). For an application like this I would normally consider three potentiometer&#8217;s to control the LED</p>
<p>But I wanted to be able to control the LED with one sensor. Doing some research I found that the HSL colour scheme was exactly what I need. I stumbled across this <a href="http://www.seeedstudio.com/depot/rotary-encoder-with-switch-p-117.html?zenid=cf54ec5b0f08705ed79e73f33ec9dd5b">Rotary Encoder</a> on Seeedstudio and it fit my price range. The reason I chose an encoder is you can use it to act like a pot but it allows continuous rotation.</p>
<p>My solution was to use an <a href="http://www.workwithcolor.com/hsl-color-schemer-01.htm">HSL Color Schemer</a>. If I set the luminance and saturation to a suitable value, I can then use the rotary encoder to cycle through the Hue spectrum. Now while this does not give me every single RGB combination, it does give me 360 combinations across all the RGB colour channels.</p>
<p>Integration:</p>
<p>The major stumbling block I had was the Rotary Encoder. The reason it was so cheap was because it was a Mechanical Encoder. Therefore I has some serious debounce factor to consider &#8211; either through software or hardware. I found a little Rotary Encoder library written by SunBox on the <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205879808/all">Arduino Forums</a>. However, the way it worked was you had to set a max and a min and once either extreme was reached, it no longer counted forward or backward.</p>
<p>I added a restart function to the library. Setting restart to a value of 1, tells the library to start counting from the min value.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">restart<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>I&#8217;ve attached the library below:<br />
<a rel="attachment wp-att-52" href="http://www.dipzo.com/wordpress/?attachment_id=52">Rotary Encoder Library</a></p>
<p><em>Note: the library currently counts up by 20 on every edge. I used this cause I had a 20 detent encoder and that means a full rotation goes just over the whole hue range. I will add a function that allows you to choose how much to count by on each edge</em></p>
<p>Here is some sample code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">#include <span style="color: #0000ff;">&quot;RotaryEncoder.h&quot;</span>
&nbsp;
RotaryEncoder rotary<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> Rpin<span style="color: #339933;">=</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> Gpin<span style="color: #339933;">=</span><span style="color: #cc66cc;">9</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> Bpin<span style="color: #339933;">=</span><span style="color: #cc66cc;">11</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> H,S,L,Rval,Gval,Bval<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> HSL<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> H, <span style="color: #000066; font-weight: bold;">float</span> S, <span style="color: #000066; font-weight: bold;">float</span> L, float<span style="color: #339933;">&amp;</span> Rval, float<span style="color: #339933;">&amp;</span> Gval, float<span style="color: #339933;">&amp;</span> Bval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> Hue_2_RGB<span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">float</span> v1, <span style="color: #000066; font-weight: bold;">float</span> v2, <span style="color: #000066; font-weight: bold;">float</span> vH <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  Serial.<span style="color: #006633;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//set up encoder with rotary library</span>
  rotary.<span style="color: #006633;">minimum</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  rotary.<span style="color: #006633;">maximum</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">360</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  rotary.<span style="color: #006633;">position</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">320</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  rotary.<span style="color: #006633;">restart</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">12</span>, OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  H<span style="color: #339933;">=</span>rotary.<span style="color: #006633;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  S<span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
  L<span style="color: #339933;">=</span>.5<span style="color: #339933;">;</span>
  Rval<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  Gval<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  Bval<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  HSL<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#40;</span>rotary.<span style="color: #006633;">position</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">360</span>,S,L,Rval,Gval,Bval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//common anode configuration</span>
  <span style="color: #666666; font-style: italic;">//analogWrite(Rpin, 255-Rval);</span>
  <span style="color: #666666; font-style: italic;">//analogWrite(Gpin, 255-Gval);</span>
  <span style="color: #666666; font-style: italic;">//analogWrite(Bpin, 255-Bval);</span>
  <span style="color: #666666; font-style: italic;">//digitalWrite(12,HIGH);</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//common cathode configuration</span>
  analogWrite<span style="color: #009900;">&#40;</span>Rpin, Rval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  analogWrite<span style="color: #009900;">&#40;</span>Gpin, Gval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  analogWrite<span style="color: #009900;">&#40;</span>Bpin, Bval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">12</span>,LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//print statements for debug</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;position:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>H<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; R:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>Rval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; G:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>Gval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; B:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Serial.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>Bval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  delay<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> HSL<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> H, <span style="color: #000066; font-weight: bold;">float</span> S, <span style="color: #000066; font-weight: bold;">float</span> L, float<span style="color: #339933;">&amp;</span> Rval, float<span style="color: #339933;">&amp;</span> Gval, float<span style="color: #339933;">&amp;</span> Bval<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">float</span> var_1<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> var_2<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> Hu<span style="color: #339933;">=</span>H<span style="color: #339933;">+</span>.33<span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">float</span> Hd<span style="color: #339933;">=</span>H<span style="color: #339933;">-</span>.33<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> S <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span>                       <span style="color: #666666; font-style: italic;">//HSL from 0 to 1</span>
  <span style="color: #009900;">&#123;</span>
     Rval <span style="color: #339933;">=</span> L <span style="color: #339933;">*</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">;</span>                      <span style="color: #666666; font-style: italic;">//RGB results from 0 to 255</span>
     Gval <span style="color: #339933;">=</span> L <span style="color: #339933;">*</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">;</span>
     Bval <span style="color: #339933;">=</span> L <span style="color: #339933;">*</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000000; font-weight: bold;">else</span>
  <span style="color: #009900;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> L <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">0.5</span> <span style="color: #009900;">&#41;</span> 
       var_2 <span style="color: #339933;">=</span> L <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">+</span> S <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000000; font-weight: bold;">else</span>           
       var_2 <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> L <span style="color: #339933;">+</span> S <span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span> S <span style="color: #339933;">*</span> L <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
     var_1 <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> L <span style="color: #339933;">-</span> var_2<span style="color: #339933;">;</span>
&nbsp;
     Rval <span style="color: #339933;">=</span> round<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span> <span style="color: #339933;">*</span> Hue_2_RGB<span style="color: #009900;">&#40;</span> var_1, var_2, Hu <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     Serial.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Rval:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     Serial.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>Hue_2_RGB<span style="color: #009900;">&#40;</span> var_1, var_2, Hu <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     Gval <span style="color: #339933;">=</span> round<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span> <span style="color: #339933;">*</span> Hue_2_RGB<span style="color: #009900;">&#40;</span> var_1, var_2, H <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     Bval <span style="color: #339933;">=</span> round<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span> <span style="color: #339933;">*</span> Hue_2_RGB<span style="color: #009900;">&#40;</span> var_1, var_2, Hd <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">float</span> Hue_2_RGB<span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">float</span> v1, <span style="color: #000066; font-weight: bold;">float</span> v2, <span style="color: #000066; font-weight: bold;">float</span> vH <span style="color: #009900;">&#41;</span>             <span style="color: #666666; font-style: italic;">//Function Hue_2_RGB</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> vH <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> 
     vH <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> vH <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> 
     vH <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">6</span> <span style="color: #339933;">*</span> vH <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> 
     <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span> v1 <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span> v2 <span style="color: #339933;">-</span> v1 <span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">6</span> <span style="color: #339933;">*</span> vH <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">*</span> vH <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> 
     <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span> v2 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">3</span> <span style="color: #339933;">*</span> vH <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span> 
     <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span> v1 <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span> v2 <span style="color: #339933;">-</span> v1 <span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>.66<span style="color: #339933;">-</span>vH<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">6</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span> v1 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Hope this helps someone, I will be adding pictures soon. If you need any other modifications made to the library don&#8217;t hesitate to ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=50</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Seeedstudio Issues Part II (Resolved!!)</title>
		<link>http://www.dipzo.com/wordpress/?p=48</link>
		<comments>http://www.dipzo.com/wordpress/?p=48#comments</comments>
		<pubDate>Tue, 21 Apr 2009 21:03:59 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[arduino seeedstudio]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=48</guid>
		<description><![CDATA[The issues have been resolved.
It did take some back and forth with Eric (the owner of seeedstudio) over email. Eric tried to help me through various options that would let me salvage the anode LEDs, but all the ideas we put together would cost me additional money and take up more space in my eventual [...]]]></description>
			<content:encoded><![CDATA[<p>The issues have been resolved.<br />
It did take some back and forth with Eric (the owner of seeedstudio) over email. Eric tried to help me through various options that would let me salvage the anode LEDs, but all the ideas we put together would cost me additional money and take up more space in my eventual design. Eric finally conceded that cathode LEDs would be the right way to go and then we went through arrangements for them to send me the cathode LEDs over. Initally they wanted me to pay for the new LEDs, but I stayed strong to my arguement that the mistake was their fault and Eric finally did concede.</p>
<p>Altogether the back and forth of emails took about 2 days, and the LEDs came in today (18 days later) at the cost of seeedstudio. Through out the process Eric was extremely polite, and replied promptly to my emails.</p>
<p>Thanks seeedstudio!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seeedstudio Issues</title>
		<link>http://www.dipzo.com/wordpress/?p=39</link>
		<comments>http://www.dipzo.com/wordpress/?p=39#comments</comments>
		<pubDate>Wed, 01 Apr 2009 02:52:06 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=39</guid>
		<description><![CDATA[As of late I&#8217;ve been getting into bigger and bigger projects. Late last month I put in an order for a whole whack of parts from seeedstudio. The parts came in a week later and I tucked them away.
Last week my LED Driver ICs came in from Maxim, so today (now that PDEng is over [...]]]></description>
			<content:encoded><![CDATA[<p>As of late I&#8217;ve been getting into bigger and bigger projects. Late last month I put in an order for a whole whack of parts from seeedstudio. The parts came in a week later and I tucked them away.</p>
<p>Last week my LED Driver ICs came in from Maxim, so today (now that PDEng is over with) I decided was a good time to start tinkering and working on a new project.</p>
<p>The main component of my order from seeedstudio was 50 RGB LEDs that I planned to interface with the LED Drivers. The LEDs I ordered were supposed to be common CATHODE, so I went about hooking all of them up on a breadboard to test them.</p>
<p>After 30 mins of tinkering I had nothing, not even a flicker. I kept looking over my wiring thinking I had messed up something obvious, but nothing came to the eye. When I used a normal red led to test, everything worked fine.</p>
<p>About an hour into the process, I was starting to give up, when I suddenly decided to just flip all the leads on the RGB Led around. Suprisingly it worked!</p>
<p>Now completely confused, I started going through my circuit again. Apparently, the LEDs I recieved were not common cathode, but common ANODE.  To make matters worse, they didn&#8217;t even fit the datasheet shown on the website (also shown below):</p>
<div class="wp-caption aligncenter" style="width: 660px"><img title="RGB LED datasheet" src="http://www.seeedstudio.com/depot/images/product/rgbled3.jpg" alt="RGB LED datasheet" width="650" height="305" /><p class="wp-caption-text">RGB LED datasheet</p></div>
<p>Instead they followed this pattern:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;<br />
|    |    |   |<br />
|    |    |   |<br />
G  B  +  R</p>
<p>This blows&#8230; common anode LEDs are useless to me for my application. To use my LED drivers I need common cathode LEDs</p>
<p>I just whipped out an email to seeedstudio, hopefully they&#8217;ll sort me out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking a digital alarm clock</title>
		<link>http://www.dipzo.com/wordpress/?p=34</link>
		<comments>http://www.dipzo.com/wordpress/?p=34#comments</comments>
		<pubDate>Sun, 22 Feb 2009 23:46:45 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=34</guid>
		<description><![CDATA[ 
About 6 months ago, I purchased an digital alarm clock/radio from Walmart. The model i purchased was the Philips AJ3540 for about $40. I purchased it for the large display, which I did not see available for other clocks in the same price range.
The clock is not without its flaws, however. The sound of the [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="attachment_33" class="wp-caption alignright" style="width: 310px"><img class="size-full wp-image-33" title="aj3540" src="http://www.dipzo.com/wordpress/wp-content/uploads/2009/02/aj3540.jpg" alt="Philips AJ3540" width="300" height="164" /><p class="wp-caption-text">Philips AJ3540</p></div>
<p>About 6 months ago, I purchased an digital alarm clock/radio from Walmart. The model i purchased was the Philips AJ3540 for about $40. I purchased it for the large display, which I did not see available for other clocks in the same price range.</p>
<p>The clock is not without its flaws, however. The sound of the alarm buzzer is deafening and the backlight on the display is just too bright, even on the lowest settings for both on their respective control knobs. </p>
<p>This week I finally had enough and decided something needed to be done.</p>
<p>On opening up the alarm clock I saw that the clock was divided into 3 segments &#8211; the display, the controls and the &#8220;brains&#8221;. The brains section had some interesting components. The buzzer was actually a high wattage piezo buzzer, I haven&#8217;t ever seen a piezo buzzer that was this loud. Also the circuit used to convert the incoming ac to dc was interesting.</p>
<p>Anyway, down to business.</p>
<p><strong>How do I reduce the sound of a piezo buzzer?</strong></p>
<p>This was suprisingly easy. The incoming AC power is converted to 5v DC, so all I had to do was find the power rails and hook up a potentiometer to it. I then hooked up the wiper on the potentiometer to the buzzer, where it was previously connected straight to 5v. After setting the alarm to go off, I moved the wiper around till I found a volume I found suitable. </p>
<p>Basicly that is really all you need to do. However I didn&#8217;t want to just leave the potentiometer there inside the alarm clock. The first idea I had was to cut a hole into the casing of the alarm clock and use the pot as my new volume control knob. However, I do not have a dremel handy for cutting a clean hole, so this would not do. Also I only have 1 potentiometer currently in my possession (I need to put an order in for parts!), so I didn&#8217;t want to give it up, especially since I use them quite regularry for testing.</p>
<p>After some thinking I suddenly remembered that the way I was using the pot was similar to a voltage divider. Which brings us to step 2 of our procedure.</p>
<p><strong>What is the voltage I want to step down to?</strong></p>
<p>This wasn&#8217;t as easy as I thought it would be. </p>
<p>At first I hooked up my Arduino to the clock &#8211; share the ground and hook the wiper up to an Analog Pin through a 10K resistor. I then intended on displaying the data on my computer monitor serially. However, this wasn&#8217;t simple, as the circuit on the alarm clock was pulsing the buzzer faster (PWM) than the arduino could print values to the screen. At times like these, I wish I had an oscilloscope&#8230;</p>
<p>Anyway, there is always a way around difficulties! I calibrated the pot to the volume I wanted it and then removed it from the alarm clock. I then hooked it up to the arduino through the 5V power out. The reading I got out was 4.8V. This part still doesn&#8217;t make sense to me, as for a drop of .2V the volume decreased by quite a bit! Guess the buzzer doesn&#8217;t follow a linear curve (which would make sense as its based on frequency).</p>
<p>A little voltage divider math showed that my R2 should be equal to around 24 times my R1. Looking through my available resistors I used a 300 ohm resistor for R1 and a 5.1K and a 2K resistor in series for my R2. </p>
<p>Soldered the resistors on and voila!! Your sound is now exactly how you want it!</p>
<p>I went on and did the same thing for my display backlight.</p>
<p>Hope this helps someone out! I planned on adding pictures but I my SD card on my laptop reader isn&#8217;t working <img src='http://www.dipzo.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning Eagle</title>
		<link>http://www.dipzo.com/wordpress/?p=27</link>
		<comments>http://www.dipzo.com/wordpress/?p=27#comments</comments>
		<pubDate>Wed, 11 Feb 2009 22:58:02 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=27</guid>
		<description><![CDATA[I have been dabbling a lot with Eagle as of late. And today I started to make some inroads. I created my first part in Eagle and have started a library. The part I created was the AS1106 LED Driver from Austria Microsystems: http://www.austriamicrosystems.com/eng/Products/Lighting-Management/LED-Drivers/AS1106
It is a cheaper alternative of the MAX2219 LED driver from Maxim-IC. I [...]]]></description>
			<content:encoded><![CDATA[<p>I have been dabbling a lot with Eagle as of late. And today I started to make some inroads. I created my first part in Eagle and have started a library. The part I created was the AS1106 LED Driver from Austria Microsystems: <a href="http://www.austriamicrosystems.com/eng/Products/Lighting-Management/LED-Drivers/AS1106">http://www.austriamicrosystems.com/eng/Products/Lighting-Management/LED-Drivers/AS1106</a></p>
<p>It is a cheaper alternative of the MAX2219 LED driver from Maxim-IC. I recently embarked on created a game using the Arduino that incorporates tons of LEDs and depending on my final configuration (haven&#8217;t decided on this yet), it would require 2-3 of these LED Drivers.</p>
<p>I also plan on using this project to Learn Eagle and since my AS1106 chips came in yesterday I thought I&#8217;d start by creating a part for them. It wasn&#8217;t as bad as I thought it would be and the Sparkfun tutorials on Eagle are a good starting point.</p>
<p> Next I want to create a small protoboard with a single piece of each component type. Once I make sure that the footprint of each one is right, I&#8217;ll finish up the board and then I am set to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A bunch of good deals in unexpected places</title>
		<link>http://www.dipzo.com/wordpress/?p=24</link>
		<comments>http://www.dipzo.com/wordpress/?p=24#comments</comments>
		<pubDate>Sun, 25 Jan 2009 23:17:38 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=24</guid>
		<description><![CDATA[Since I&#8217;ve recently started prototyping at home, I&#8217;ve felt constrainted by the tools and components I had available. However, I don&#8217;t have the money or purchase said components for my little home workshop. Some basic components I&#8217;ve been in need of as of late were resistors, capacitors and transistors.
I&#8217;ve been scouring digikey, jameco as well [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve recently started prototyping at home, I&#8217;ve felt constrainted by the tools and components I had available. However, I don&#8217;t have the money or purchase said components for my little home workshop. Some basic components I&#8217;ve been in need of as of late were resistors, capacitors and transistors.</p>
<p>I&#8217;ve been scouring digikey, jameco as well as local electronic stores such as sayal and nutech. However, I wasn&#8217;t getting a good deal for the amount I wanted, around 10-20 through hole componets for the standard value resistors and capacitors. Sayal and Nutech did not have the variety and digikey did not have the quantity. Plus the prices weren&#8217;t as cheap.</p>
<p>The best deal I saw was for a 520 assorted resistor kit for about 32 dollars with a cabinet. However with 20 dollars for shipping from Jameco, it was becoming a little too pricey for me.</p>
<p>Then I suddenly though to check on Ebay. I was able to get a 520 resistor kit, a 100 capacitor kit and a 25 NPN transitor kit for 20 dollars including shipping. And on a trip to Canadian Tire, I saw a 61 drawer cabinet for 15 bux!</p>
<p>Thats a total price of ~40 dollars for all the components I needed. </p>
<p>Moral: Shop around! Deals are available in the most unexpected places!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update: New wordpress theme</title>
		<link>http://www.dipzo.com/wordpress/?p=22</link>
		<comments>http://www.dipzo.com/wordpress/?p=22#comments</comments>
		<pubDate>Tue, 20 Jan 2009 03:08:20 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=22</guid>
		<description><![CDATA[Every coop I get the urge to blog about work and the various projects I work on. Come school time, life becomes more hectic, chaotic and less interesting as I spend more time studying and trying to maintain various ties with friends and family;  relationships which becomes very fragile due to the stressful nature of [...]]]></description>
			<content:encoded><![CDATA[<p>Every coop I get the urge to blog about work and the various projects I work on. Come school time, life becomes more hectic, chaotic and less interesting as I spend more time studying and trying to maintain various ties with friends and family;  relationships which becomes very fragile due to the stressful nature of the Waterloo engineering program. </p>
<p>But every 8 months, when a new coop term starts and the hunger to blog comes back, I find the design of the blog to be &#8220;el passe&#8221; and start searching for a new theme. So today I reintroduce the blog under the new theme &#8211; iNove. The simplistic design really appeals to me and seems to fit well with the theme of the blog. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=22</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project updates</title>
		<link>http://www.dipzo.com/wordpress/?p=19</link>
		<comments>http://www.dipzo.com/wordpress/?p=19#comments</comments>
		<pubDate>Mon, 19 Jan 2009 03:14:06 +0000</pubDate>
		<dc:creator>Darius Gai</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.dipzo.com/wordpress/?p=19</guid>
		<description><![CDATA[Its been a long time since I&#8217;ve posted on the board. A few project updates. The electronics prototype for the lazy bartender has been completed. However, due to a lack of tools and materials on my end, none of the mechanical work has been done. Hoping to work on that sometime this semester if I [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a long time since I&#8217;ve posted on the board. A few project updates. The electronics prototype for the lazy bartender has been completed. However, due to a lack of tools and materials on my end, none of the mechanical work has been done. Hoping to work on that sometime this semester if I can get a mechanicaly inclined person involved
<p>I&#8217;ve been playing a lot with the arduino as of late &#8211; http://www.arduino.cc. I have tinkered with microcontrollers before and really enjoyed the projects I did, but the arduino really helps to take it to next level. It takes away all the pains of the microcontroller &#8211; programming being the big one; and adds a slew of cool features, like a great IDE and a programming language based on Processing. All this is done for very low cost as the bootloader is pretty small. I really think this would be a great addition to what was a pretty &#8220;boring&#8221; high school curriculum. Talks with Chad Whittington &#8211; the computer hardware and robotics teacher at Grimsby Secondary School have been positive. Hopefully we&#8217;ll manage to make some inroads here. 
<p>Another project I want to use the arduino for is a todo list for the kitchen. I&#8217;ve noticed that we aren&#8217;t efficient in our grocery shopping. We often make multiple trips to the grocery store as we forget various items. The goal of the project is to have a simple interface, where the user can add the item, and the item gets uploaded to a web server. When its time to go grocery shopping, the user just has to open up and application on their computer (web based or not) and print the list.
<p>I started on the project last week. I&#8217;m using an LCD screen with a serial interface chip. This way I only take up 2 pins on my arduino instead of 7+ to control the LCD. For user input, I initially was going to user a keyboard and try to read the PS/2 interface. However, after some research I felt it would be easier to use a potentiometer as a letter selector (similar to the volume control knob on your car stereo); and a momentary push button to enter the selected letter. After the item was typed out, another push button would be used to send the item to the web server.The programming to display the correct letter on the LCD via the potentiometer is completed. The logic the arduino will use to send the word over the serial port to a computer is completed as well. On the computer, the logic to send the word to the webserver has been completed as well.
<p>The following still has to be done:- being able to type full items into the LCD- add the ability for an &#8220;upload&#8221; button- data storage on web server &#8211; currently being stored to web file, might want to incorporate database. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dipzo.com/wordpress/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
