<?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>DanielAndrade.net &#187; Howto</title>
	<atom:link href="http://www.danielandrade.net/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danielandrade.net</link>
	<description>Daniel Andrade Tech Stuff</description>
	<lastBuildDate>Sat, 19 Nov 2011 10:39:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>DIY: Home UBUNTU NAS Server</title>
		<link>http://www.danielandrade.net/2011/08/29/diy-home-ubuntu-nas-server/</link>
		<comments>http://www.danielandrade.net/2011/08/29/diy-home-ubuntu-nas-server/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:25:00 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/?p=528</guid>
		<description><![CDATA[Back in 2003, I used to connect my computer on the my old 32&#8242; TV, those huge and heavy TVs, to watch stuff from the internet, at that time, eMule [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://i.imgur.com/1M8EL.jpg" alt="" /></p>
<p>Back in 2003, I used to connect my computer on the my old 32&#8242; TV, those huge and heavy TVs, to watch stuff from the internet, at that time, eMule was ruling the p2p community (can&#8217;t talk about USENET right? :} ). Then  in 2008 I decided to build a better <a href="http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/">HTPC</a> (Home Theater PC), a full dedicated computer connected to my TV, with good MotherBoard/VGA/SoundBoard, well, a good computer, with gaming capacities. It was good while it lasted, but you know, it was huge black box below my TV, bit noisy, but it did the job.</p>
<p>Early this year, I got a 2TB Lacie Network Space 2, which is a simple NAS Server, and a WD Plus Live. The WD PLUS LIVE is nothing more than a small computer with an operating system to playback videos and music. He has no storage, so it should you have to plug a thumb-drive, external hard drive on it or connect to the network, which will give access to shared files over the network, in my case, files are stored at the Network Space 2 connected to the router. When I bought the WD, I was impressed with the image quality, and how he can play heavy files without any choke. I watched the Band of Brothers show recently co-directed by Tom Hanks and Steven Spielberg in FULL HD 1920×1080 , where files were like 7GB for episode of 50-60 minutes. I played all over the network, and it worked perfectly. </p>
<p>Anyway, my Lacie NAS stopped working, some problem with the file system, but the HD was still working great.  There is a way to re-format the Lacie&#8217;s file system, but it&#8217;s a pain in the as*. So that&#8217;s when I decided to build a real NAS Server, running UBUNTU and using that Network Space&#8217;s hard drive and another 1TB driving that was laying around. I based my NAS on the <a href="http://paulstamatiou.com/diy-200-dollar-pc">DIY 200U$ PC from Paul Stamatiou</a>, I don&#8217;t even know if he still has his own NAS, but I&#8217;m really enjoin mine.</p>
<h2>Hardware</h2>
<p><img src="http://i.imgur.com/JScwe.jpg" alt="" /></p>
<p>For the hardware, I ended up with a fanless MiniITX motherboard <a href="http://www.intel.com/content/www/us/en/motherboards/desktop-motherboards/desktop-board-di510mo.html">Intel D510MO</a>, which has a Atom processor, Gigabit ethernet (all my home network is Gigabit, so it does make a difference). I am also using a 2GB 800Mhz Kingston RAM memory, and both two SATA connectors. The MOBO has up to seven 2.0 USB and one mini PCI Express, in case I want to add more SATA drives in the future.</p>
<p>As I told before, I am using a 2TB HD from my old NAS, and also a 1TB HD that I had, so ≈ 3TB, good enough for now&#8230; for now!</p>
<p>Power supply, well, just got a regular one, but another good solution would be a tiny power supply, for example the <a href="http://www.mini-box.com/s.nl/it.A/id.417/.f">picoPSU</a>.</p>
<h2>Building the case</h2>
<p><img src="http://i.imgur.com/Gj4KH.jpg" alt="" /></p>
<p><img src="http://i.imgur.com/KucS8.jpg" alt="" /></p>
<p><img src="http://i.imgur.com/qby9u.jpg" alt="" /></p>
<p>As the MOBO is fanless, I don&#8217;t think it would be a good idea to let it locked in a box somewhere in my apartment, so I decided to build a acrylic case and leave the sides open for air circulation.<br />
You just need to get a drill, make some holes and you are done.</p>
<h2>Software</h2>
<p><strong>O/S</strong></p>
<p><img src="http://i.imgur.com/KzN9W.png" alt="" align="left"/> There is nothing better then Linux for any kind of server, and my distro of choice is UBUNTU, quick to install, easy to configure get it running smooth.</p>
<p>For installing it, you could use a USB stick with ubuntu on it, and set to install from the stick, and you are good to go.</p>
<p>When UBUNTU was installed, internet started working right away and there was no extra driver needed, just what I like about this distro.</p>
<p>You may want to update the packs from your server. I like using the Terminal, you can do it simply by typing: </p>
<p>[cc lang="bash"]sudo apt-get update[/cc]<br />
[cc lang="bash"]sudo apt-get upgrade[/cc]</p>
<p></p>
<p><strong>Torrenting</strong></p>
<p><img src="http://i.imgur.com/ebngF.png" alt="" width="75px" align="left"/>For downloading stuff from the internet, such as my Linux distribution, I like using torrent, the best p2p protocol ever!<br />
I like leaving torrent open 24/7, and my choice for this task is <strong>Transmission-daemon</strong>, it runs on the background, I can access it using any Browser, iPhone using a app called <strong>iControlBits</strong> or even using a super cool and multiplatform GUI called <strong>Transmission-Gui</strong>. </p>
<p><a href="http://www.webupd8.org/2009/12/setting-up-transmission-remote-gui-in.html">You can check HERE for a detailed tutorial on how to set the daemon + Gui</a>.</p>
<p><strong>Backups</strong></p>
<p><del datetime="2011-08-30T03:38:30+00:00">For backups, I am using <a href="http://www.superflexible.com/">Super Flexible File Synchronizer</a>, and backing up my files via SFTP.<br />
</del></p>
<p>For backup I use SSH and RSYNC via terminal. It&#8217;s simple, light weight and funcional, you don&#8217;t need to use ShareWare software for this, and the way I&#8217;m doing it, you can even backup to your server through the internet.</p>
<p>I am not using any RAID to clone my disks because one is 1TB and the other is 2TB, the second reason is that  I don&#8217;t really need to backup all data on that disks. My main concern is Documents and Pictures, especially pictures! So these are the files I save on both drives. What i&#8217;ve done is, I always sync my files to one folder on the NAS via SFTP, then with RSYNC and Cron, everyday at 3AM, it checks if files are the same, otherwise they sync both HDs. Maybe not the best ou easiest way, but it works.</p>
<p>Next month I will move to Italy for one semester, and I know I will take many Gigs of pics. University&#8217;s internet connection will probably be fast, so I will backup everything from there to my NAS Server. So if something goes wrong with my files there, I will still be able to access them from home. </p>
<p>So, for backing up my photos via SSH to the NAS, I always want to make an exact copy of the files on my Macbook, so the code below does the job.<br />
You can remove the <strong>-e &#8216;ssh -p 224&#8242;</strong> part if your SSH uses the default port 22. And my server IP is <strong>192.168.1.104</strong>, you should change to your IP.</p>
<p>[cc lang="bash"]rsync -av &#8211;update &#8211;delete -e &#8216;ssh -p 224&#8242; /home/path/to/folders user@192.168.1.104:/home/path/on/SERVER/[/cc]</p>
<p><strong>Webmin</strong></p>
<p>Webmin is a great application to help you manage your server. I use it to create FTP users, manage crons and much more.</p>
<p>&#8220;Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.&#8221; Text from <a href="http://www.webmin.com/">Webmin&#8217;s website</a>. There you can find all information on how to install/configure it.</p>
<p>You should take a look!</p>
<p><strong>Apache/Mysql/PHP/PHPMyAdmin</strong></p>
<p>I like building websites, I usually run websites on my own computer before launching it to the world. But I am enjoying more creating websites and accessing them from my NAS Servers. </p>
<p>To install all this, just time on terminal:</p>
<p>[cc lang="bash"] sudo apt-get install apache2 mysql-server-5.1 php5 php5-mysql php5-cli[/cc]</p>
<p>Your default home folder will be <strong>/var/www</strong></p>
<p><strong>FTP</strong></p>
<p>Right now I am using <strong>proftpd</strong> to run all my ftp file transfers (but today I usually just transfer files over <strong>SSH</strong>). You can use <strong><a href="http://www.webmin.com/">WEBMIN</a></strong> to handle the FTP, or you can follow many tutorials found on the internet. For example <a href="http://ubuntuforums.org/showthread.php?t=79588">THIS</a>.</p>
<p><strong>SSH</strong></p>
<p>To install SSH on your server, just use this:</p>
<p>[cc lang="bash"]sudo apt-get install openssh-server[/cc]</p>
<p>A good thing to do is to change your default SSH port, it can help on the security of your server. For that, edit the config file:<br />
[cc lang="c"]gksu gedit /etc/ssh/sshd_config[/cc] where it says <strong>PORT 22</strong>, change to something like <strong>PORT 224</strong>.</p>
<p><strong>Subsonic &#8211; Free Music Streamer</strong></p>
<p><img src="http://i.imgur.com/AESgwl.jpg" alt="" /></p>
<p>OMG, I wish I knew this software before, it AMAZING! Check the description from their website, I&#8217;m highlighting what I think amazing:</p>
<p>&#8220;<em>Subsonic is a free, web-based media streamer, <strong>providing ubiquitous access to your music</strong>. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.</p>
<p><strong><a href="http://www.subsonic.org/">Subsonic</a></strong> is designed to <strong>handle very large music collections (hundreds of gigabytes)</strong>. Although optimized for MP3 streaming, it works for any audio or video format that can stream over HTTP, for instance AAC and OGG. By using transcoder plug-ins,<strong> Subsonic supports on-the-fly conversion and streaming of virtually any audio format,</strong> including WMA, FLAC, APE, Musepack, WavPack and Shorten.</p>
<p><strong>If you have constrained bandwidth, you may set an upper limit for the bitrate of the music streams. Subsonic will then automatically resample the music to a suitable bitrate.</strong></p>
<p>In addition to being a streaming media server, Subsonic works very well as a local jukebox. The intuitive web interface, as well as search and index facilities, are optimized for efficient browsing through large media libraries. Subsonic also comes with an integrated Podcast receiver, with many of the same features as you find in iTunes.</em>&#8221;</p>
<p>Here is what I am doing, when I am home, I simply use the browser to access all my songs. As it re-sample the music files on-the-fly, I created a user that I use when I&#8217;m not home, re-sampling files to 128kbps. And when I accessing via my iPhone&#8217;s 3G network, it goes down to 64kbps (slow 3G!!!).</p>
<p>On my phone, I am using a App called <a href="http://itunes.apple.com/us/app/isub-music-streamer/id362920532?mt=8">iSub</a>, you can configure different bit-rates if you are using Wireless or 3G, and it also caches all songs played. So I don&#8217;t need to sync songs with my iphone no more, I just listen to songs on Subsonic and then shuffle them when I on the road. I am impressed, you should check it out!</p>
<p>To have it up and running, there are plenty of information on the website!</p>
<p><strong>Now you have some pictures of the server up and running:</strong></p>
<p><img src="http://i.imgur.com/y7irN.jpg" alt="" /></p>
<p><img src="http://i.imgur.com/dUcqL.jpg" alt="" /></p>
<p>If you enjoy this post, or has something to say,<br />
just leave a commend below.</p>
<p>Thanks for reading <img src='http://www.danielandrade.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2011/08/29/diy-home-ubuntu-nas-server/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Dotklok + LM35 Temperature Sensor</title>
		<link>http://www.danielandrade.net/2011/04/10/dotklok-lm35-temperature-sensor/</link>
		<comments>http://www.danielandrade.net/2011/04/10/dotklok-lm35-temperature-sensor/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 04:24:18 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/?p=486</guid>
		<description><![CDATA[I got my Dotklok up and running some days ago, I am really enjoying it on my room. But I want to do more with it. Too bad right now [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.danielandrade.net/wp-content/uploads/2011/04/DSC_1160.jpg" alt="" /></p>
<p>I got my <a href="http://www.technoetc.net/dotklok/">Dotklok</a> up and running some days ago, I am really enjoying it on my room.<br />
But I want to do more with it. Too bad right now I don&#8217;t have much time to play with electronics and build cool things.</p>
<p>Anyway, today I decided to spend some time learning the Dotklok&#8217;s code and add a temperature sensor to it. The result was really cool, and now I am sharing the bit of code I added to the clock.</p>
<p>To make it work in your clock, you must add a new effect called<strong> temperature();</strong> in the <strong><em>switch</em></strong> area, then in<br />
time animations, add the code below. And for the hardware, I used a LM35 Temperature Sensor connected in <strong>5V, GND,</strong> and <strong>AD3</strong>, but can use any AD available, just change the code afterwards.</p>
<p>Here is the code, but you can check the <a href="http://pastebin.com/raw.php?i=ergXRMtB">RAW</a> file too.<br />
[cc lang="c"]</p>
<p>// temperature()<br />
// Temperature Sensor + Clock &#8211; by Daniel Spillere Andrade &#8211; www.DanielAndrade.net<br />
// Should Change the Temperature Only when minutes change, to prevent floating on temperature<br />
// Based on http://www.danielandrade.net/2008/07/05/temperature-sensor-arduino/ &#8211; Daniel Spillere Andrade &#8211; daniel [a] danielandrade.net</p>
<p>void temperature(){</p>
<p>  ht1632_clear();</p>
<p>  plot(0,0,1); plot(0,15,1); plot(23,15,1); plot(23,0,1);</p>
<p>  //Draw Dots and Temperature</p>
<p>  plot(7,3,1);<br />
  plot(7,5,1);<br />
  plot(16,3,1);<br />
  plot(16,5,1);</p>
<p>  plot(13,9,1);<br />
  plot(13,10,1);<br />
  plot(14,9,1);<br />
  plot(14,10,1);</p>
<p>  // Drawing the &#8216;C&#8217;, it&#8217;s ugly I know <img src='http://www.danielandrade.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
  for(int i=16;i&lt;19;i++){<br />
    for(int j=9;j&lt;14;j++){<br />
          if(j==9 || j==13) { plot (i,j,1);}<br />
          else { plot(16,j,1); }<br />
    }<br />
  }</p>
<p>  int temppin = 3; // Define LM35 PIN<br />
  int tempval; // Temperature Read Variable</p>
<p>  tempval = ( 5.0 * analogRead(temppin) * 100.0) / 1024.0; //Makes the first read</p>
<p>  /* TIME LOOP */<br />
  do{</p>
<p>    time_now = RTC.now();</p>
<p>    if( ( time_now.minute() != time_prev.minute() ) ){<br />
    if( !power_up &#038;&#038; midnight_random() )  return;</p>
<p>        tempval = 0;<br />
        for(int i=0;i< =9;i++){<br />
          tempval = tempval + (( 5.0 * analogRead(temppin) * 100.0) / 1024.0); // Reads the Variable and converts to Celsius<br />
          delay(100);                                                           // tempf = (tempval * 9)/ 5 + 32; to converts to fahrenheit<br />
        }<br />
       tempval = tempval/10;</p>
<p>    }<br />
      // Here starts the code. <img src='http://www.danielandrade.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
      // Draw Temperature, only when minute changes!</p>
<p>      putchar_3x5(5,9,(tempval%100)/10);<br />
      putchar_3x5(9,9,tempval%10);</p>
<p>      //Draw Time<br />
      putchar_3x5(0,2,(time_now.hour()%100)/10);<br />
      putchar_3x5(3,2,time_now.hour()%10);<br />
      putchar_3x5(9,2,time_now.minute()/10);<br />
      putchar_3x5(12,2,time_now.minute()%10);<br />
      putchar_3x5(18,2,time_now.second()/10);<br />
      putchar_3x5(21,2,time_now.second()%10);</p>
<p>      time_prev = time_now;</p>
<p>    /* CHECK BUTTONS, return if necessary */<br />
    if( change_animation() )  return;</p>
<p>    while( PAUSE &#038;&#038; b5.isPressed( )); // pause mode for photos</p>
<p>  } while(1);</p>
<p>}</p>
<p>[/cc]</p>
<p>Some more pics and video.</p>
<p><img src="http://www.danielandrade.net/wp-content/uploads/2011/04/DSC_1161.jpg" alt="" /><br />
<img src="http://www.danielandrade.net/wp-content/uploads/2011/04/DSC_1166.jpg" alt="" /></p>
<p></p>
<p><iframe title="YouTube video player" width="600" height="368" src="http://www.youtube.com/embed/onRPV3Oqt8Y?hd=1" frameborder="0" allowfullscreen></iframe></p>
<p>What do you think?<br />
If you modify the code, don&#8217;t forget to share! </p>
<p>Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2011/04/10/dotklok-lm35-temperature-sensor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My HTPC 2.0</title>
		<link>http://www.danielandrade.net/2011/04/02/htpc-2-0/</link>
		<comments>http://www.danielandrade.net/2011/04/02/htpc-2-0/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 04:02:14 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[htpc]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/?p=457</guid>
		<description><![CDATA[Long ago, I wrote How I Made my HTPC at my place. Time passes and things change. End of year has arrived, Christmas and everything, so I decided to upgrade [...]]]></description>
			<content:encoded><![CDATA[<p>	<img src="http://danielandrade.net/wp-content/uploads/mediacenter2/001.jpg" alt="" /></p>
<p>	Long ago, I wrote <a href="http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/"> How I Made my HTPC </a> at my place. Time passes and things change. End of year has arrived, Christmas and everything, so I decided to upgrade my system to a more efficient and cheaper one. The new choices were using a <a href="http://en.wikipedia.org/wiki/Network-attached_storage"> <strong> NAS </strong> </a> (Network Attached Storage) allowing all files can be accessed from any machine connected to the network, in this case I am using <a href="http://www.lacie.com/us/products/product.htm?pid=11492"> Lacie Network Space 2 </a> 2TB storage. A Gigabit router <strong> TP-LINK </strong>, so far I&#8217;m very happy with this router, although. A media player <a href="http://www.amazon.com/Western-Digital-Media-Player-WDBABX0000NBK-NESN/dp/B003MVZ60I"> WD-PLUS Live </a> that has an embedded Linux and play videos in various formats, even <strong> FullHD </strong>, and access online content like YouTube and some radios.</p>
<p>	 <strong>Media Center</strong>:</p>
<p>	<img src="http://danielandrade.net/wp-content/uploads/mediacenter2/002.jpg" alt="" /></p>
<p>	I will begin showing every part it:</p>
<p>	<strong> Lacie Network Space 2 &#8211; 2TB </strong></p>
<p>	<img src="http://danielandrade.net/wp-content/uploads/mediacenter2/lacie-networkspace.jpg" alt="" /></p>
<p>	A <strong> NAS </strong> very powerful, relatively inexpensive and with a storage space for my current needs for backup and media like movies and TV shows.</p>
<p>	The <strong> NAS </strong> has a good web interface, and you can even download torrents while your computer is OFF. It uses only 6W in standby mode and 12W in active mode.</p>
<p>	You can manage your files via the Finder (I believe the Nautilus or Windows Explorer as well). Or the way I prefer, via <strong> FTP </strong>. Testing the speed via FTP I got around 30MB/s, really good for a ARM processor.</p>
<p>	There is the possibility of hacking the device and get full SSH access, but as I do everything I need from my <strong> Macbook&#8217;s </strong> terminal or via the WDLIVE&#8217;s <strong> SSH </strong>, there is to change the hardware or the NAS.</p>
<p>	Besides being able to access files over the network, there is also the possibility of obtaining your files by <strong> USB cable  </strong>, but you will not have access to all files. When you configure your <strong> Lacie </strong>, you determine how much space is used as a network storage, and <strong> USB storage </strong>, which does not make much sense to me, but that can be some limitation on hardware / software.</p>
<p>	Another peculiarity of this<strong> NAS </strong> is an extra USB port, where you can plug a thumb-drive or other storage device and access it from any computer in the house or even the Internet, since the <strong> Network Space 2 </strong> comes with the option to be accessed from anywhere on the Internet, through services like <a href="http://www.dyndns.com/"> <strong> DYNDNS </strong> </a>.</p>
<p>	If you&#8217;re thinking of buying an external hard drive that don&#8217;t need to be small and portable, I find interesting in making some research about the NAS option, which is very good and practical.</p>
<p>	Backups, backups, backups &#8230; I don&#8217;t live without them! You shouldn&#8217;t either!<br />
	Can not stand the idea of losing all my precious photos, so one of my priorities with a Storage System is the safety of my backups, which are made weekly using the <strong> Super Flexible  Syncronize </strong> software, equivalent to <strong> SyncBack </strong> on a Windows PC. What I like about this program is the ability to update only what has changed.</p>
<p>	<strong> WD PLUS LIVE </strong></p>
<p>	<img src="http://danielandrade.net/wp-content/uploads/mediacenter2/005.jpg" alt="" /></p>
<p>	The <strong> WD PLUS LIVE </strong> is nothing more than a small computer with an operating system to playback videos and music. He has no storage, so it should you have to plug a thumb-drive, external hard drive on it or connect to the network, which will give access to shared files over the network, in my case, files are stored at the <strong> Network Space 2 </strong> connected to the router. When I bought the WD, I was impressed with the image quality, and how he can play heavy files without any choke. I watched the <strong> Band of Brothers </strong> show recently co-directed by <strong>Tom Hanks </strong> and <strong> Steven Spielberg </strong> in <strong> FULL HD 1920&#215;1080 , where files were like</strong><strong> 7GB </strong> for episode of 50-60 minutes. I played all over the network, and it worked perfectly.</p>
<p>	<img src="http://danielandrade.net/wp-content/uploads/mediacenter2/003.jpg" alt="" /></p>
<p>	<strong> The Hack: </strong><br />
	The <strong> WD PLUS LIVE </strong> is very powerful, but it can be much more. A boy named <strong> B-RAD </strong>, has compiled a new firmware for the product by increasing its possibilities infinitely. You can access the media player <strong> via SSH </strong> and may use it to download files, torrents, unpack large files,<strong> FTP server  </strong>, to access IRC (and stay connected 24 / 7 ) and anything that a computer can do via <strong>SSH  </strong>, so the imagination is the limit!<br />
	This new <strong> FIRMWARE </strong> you find <a href="http://b-rad.cc/"> HERE </a>.</p>
<p>	Thanks for reading.<br />
	Daniel</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2011/04/02/htpc-2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino-Based Digital Clock</title>
		<link>http://www.danielandrade.net/2011/02/16/arduino-based-digital-clock/</link>
		<comments>http://www.danielandrade.net/2011/02/16/arduino-based-digital-clock/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 10:56:00 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/?p=432</guid>
		<description><![CDATA[Wow, this is amazing! DOTKLOK is an open-source, hackable, Arduino-based digital clock that displays a series of unique time-telling animations. DOTKLOK: Game Time from The Latest Artists on Vimeo. DOTKLOK [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, this is amazing! DOTKLOK is an open-source, hackable, Arduino-based digital clock that displays a series of unique time-telling animations. </p>
<p><iframe src="http://player.vimeo.com/video/19947676" width="400" height="300" frameborder="0"></iframe>
<p><a href="http://vimeo.com/19947676">DOTKLOK: Game Time</a> from <a href="http://vimeo.com/latestartists">The Latest Artists</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>DOTKLOK is an open-source, hackable, Arduino-based digital clock that displays a series of unique time-telling animations. The passing of time is depicted with numbers and abstract/geometric patterns such as Morse code and minimal analog clock faces, and includes animations inspired by classic video games such as Pong, Tetris, Pacman, and Space Invaders.</p>
<p>You can buy the kit for U$150.00 and it assembled for U$200.00<br />
for me&#8230; I think I will build one, hell yeah I&#8217;m going to build one, just love it!!!</p>
<p>You can check more information from <a href="http://www.aomalley.org/dotklok/">dotklok&#8217;s</a> website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2011/02/16/arduino-based-digital-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino PWM &amp; Oscilloscope</title>
		<link>http://www.danielandrade.net/2010/10/04/arduino-pwm-oscilloscope/</link>
		<comments>http://www.danielandrade.net/2010/10/04/arduino-pwm-oscilloscope/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 23:51:03 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/?p=365</guid>
		<description><![CDATA[Having fun with Arduino PWM &#038; Oscilloscope and trying to understand some more Here are some links if you want to know more at Wikipedia and Arduino Website]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/14656845?portrait=0" width="500" height="281" frameborder="0"></iframe></p>
<p>Having fun with Arduino PWM &#038; Oscilloscope and trying to understand some more </p>
<p>Here are some links if you want to know more at <a href="http://en.wikipedia.org/wiki/Pulse-width_modulation">Wikipedia</a> and <a href="http://www.arduino.cc/en/Tutorial/PWM">Arduino</a> Website</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2010/10/04/arduino-pwm-oscilloscope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with LEDs and Resistors</title>
		<link>http://www.danielandrade.net/2010/03/13/working-with-leds-and-resistors/</link>
		<comments>http://www.danielandrade.net/2010/03/13/working-with-leds-and-resistors/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 14:56:57 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/2010/03/13/working-with-leds-and-resistors/</guid>
		<description><![CDATA[The objective of this text is to help you to understand how Resistors work and use it in it&#8217;s most simple use, as a current limiter. If you want to [...]]]></description>
			<content:encoded><![CDATA[<p>The objective of this text is to help you to understand how Resistors work and use it in it&#8217;s most simple use, as a current limiter. If you want to know more about resistors and leds, check <a href="http://en.wikipedia.org/wiki/Light-emitting_diode">Here</a> and <a href="http://en.wikipedia.org/wiki/Resistor">Here</a>.</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/RBG-LED.jpg" alt="" /></p>
<p><strong>RESISTORS:</strong></p>
<p>The resistor is a passive component that is opposed to the electrical current dissipating heat, the higher the resistor value, the lower the current. This effect is called electrical resistance, while the component resistor is popularly known as resistance.</p>
<p><strong>Resistance:</strong> is the property of a material to oppose the flow of electric current and dissipate power. Unit: Ω (Ohm).</p>
<p><strong>Resistor</strong>: A component specifically designed to have resistance.</p>
<p><strong>Utilities of resistors:</strong></p>
<ul>
<li>Limiting the current that flows in a circuit</li>
<li>Control the loading speed of a capacitor.</li>
<li>To make current and voltage dividers.</li>
<li>Transforming energy into heat (Joule effect).</li>
</ul>
<p>When applying a voltage in a resistor, it creates a current that passes through it. The relation between the voltage and the current defines the electrical resistance:</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/frmulas.jpg" alt="" /></p>
<p>It&#8217;s a physical law and, therefore, will always work for any type of electronic circuit.</p>
<p>If the Voltage is directly proportional to I (R = constant), we have the famous OHM&#8217;s law.</p>
<p>Most of the resistors used in electronic obey this law, ohmic resistors. Among them are the cluster of carbon resistors, metal film and carbon film.</p>
<p>Practicing &#8211; Leds and resistors</p>
<p>To light up a  LED we need to limit the current that flows through it, for that we use resistors. If the current that flows through it is higher than recommended, there is a high risk of burning the component. </p>
<p>The video below show&#8217;s a led being burned:</p>
<p><strong><em>Video Soon</em></strong></p>
<p>The recommended current and voltage between the terminals of the LED depends on the chosen type (color, diameter, shape, etc.). For more details, take a look on the datasheet.</p>
<p>The higher the current, higher will be the light intensity and lower the LED&#8217;s life.</p>
<p>Building the circuit:</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/Circuit-resistor_LED.jpg" alt="" /></p>
<p><strong>To light a LED we need:</strong></p>
<ul>
<li>1 Led</li>
<li>1 Resistor (ohmic)</li>
<li>Power Supply (here we will use 5V and 12V)</li>
</ul>
<p>So which resistor to use?</p>
<p>Now we are  going to see which resistor to use, using the Kirchoff`s Circuit Laws.<br />
They are physical laws, will always be valid for any circuit.</p>
<p>We will use a red LED, when that should work with around 1.7V.<br />
The recommended current for an LED is between 10 mA and 20 mA.<br />
Here we will make the math to use only 10mA.</p>
<p>Using a 5V power supply, we have by Kirchhoff&#8217;s Voltage Law</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/2-1.jpg" alt="" /><br />
<img src="http://img.photobucket.com/albums/v107/tigerbr/3-2.jpg" alt="" /></p>
<p>With this, we show that you only can insert the resistor after of before the LED.</p>
<p>By Ohm`s Law:</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/4-1.jpg" alt="" /></p>
<p>Now calculating the resistor for 10mA:</p>
<p>By OHM&#8217;s law:</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/6.jpg" alt="" /></p>
<p>Due to the associated error with each resistor and the available values on the market<br />
we will take approximate values.</p>
<p>In this case we do not make approximations of the resistor value<br />
because it&#8217;s commercially available.</p>
<p>For a voltage of 12V,  R = 1 030 Ω, then we will use 1KΩ.</p>
<p>This article was written by Lucas G. Carli ( lucasgcarli [a] gmail dot com ) &#8211; Undergraduate in Electric Engineering</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2010/03/13/working-with-leds-and-resistors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ultrasonic Range Finder with Arduino</title>
		<link>http://www.danielandrade.net/2009/07/26/ultrasonic-range-finder-with-arduino/</link>
		<comments>http://www.danielandrade.net/2009/07/26/ultrasonic-range-finder-with-arduino/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 16:52:12 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/2009/07/26/ultrasonic-range-finder-with-arduino/</guid>
		<description><![CDATA[I recently got a Maxbotix LV-EZ4 Ultrasonic Range Finder to try understand how to use it with my little Arduino. Having a ultrasonic range finder can be very useful in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a <strong><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8504">Maxbotix LV-EZ4 Ultrasonic Range Finder</a></strong> to try understand how to use it with my little <a href="http://arduino.cc/">Arduino</a>. Having a ultrasonic range finder can be very useful in many different projects, as it can detect objects, I can use it to make alarm systems (cars usually use this kind of sensor), <a href="http://www.instructables.com/id/BOB-V20/">Obstacle-Avoiding Robot</a> and many other things that you may have in mind. It works better outdoors then the IR sensor, but the only thing I could notice is that it doen&#8217;t detects very well some thick carpets. Besides that, it&#8217;s a great sensor. From the datasheet we can read that it sonar range information from 6-inches out to 254-inches (15.24 cm &#8211; 6.452m).</p>
<p><img src="http://img.photobucket.com/albums/v107/tigerbr/max.jpg" alt="" align="center" /></p>
<p><strong>Maxbotix Features:</strong></p>
<ul>
<li>42kHz Ultrasonic sensor</li>
<li> Operates from 2.5-5.5V</li>
<li>Low 2mA supply current</li>
<li> 20Hz reading rate</li>
<li>RS232 Serial Output &#8211; 9600bps</li>
<li> Analog Output &#8211; 10mV/inch</li>
<li>  PWM Output &#8211; 147uS/inch</li>
<li>  Small, light weight module</li>
</ul>
<p><strong>Docs:</strong></p>
<ul>
<li><a href="http://www.maxbotix.com/uploads/MaxBotixNewProducts.pdf">Beam Width Explanation</a></li>
<li><a href="http://www.maxbotix.com/uploads/LV-MaxSonar-EZ4-Datasheet.pdf">LV-EZ4 Datasheet</a></li>
<li><a href="http://www.maxbotix.com/MaxSonar-EZ1__FAQ.html">Maxbotix FAQ</a></li>
</ul>
<p><strong>How the Sonar works:</strong><br />
It basically sends a high frequency wave in one direction, the wave hits a object that reflects the wave. When the wave gets back to the sensor, it calculates the distance depending on the time it takes to go and back. More information can be checked at <a href="http://en.wikipedia.org/wiki/Ultrasound">Wikipedia</a>.<br />
<img src="http://img.photobucket.com/albums/v107/tigerbr/Picture1-1.png" alt="" /></p>
<p><strong>Working with Arduino:</strong></p>
<p>I think the easiest way to work with the sensor is using the <strong>Analog Output Mode</strong>, where you just need to give the sensor some juice connecting with the <strong>5V</strong> and <strong>Ground</strong>, and the Analog Output on any Analog-Digital Converter pin on the Arduino. Where it gives <strong>(Vcc/512) / inch </strong>where I am using 5V, so it&#8217;s <strong>10mV/inch</strong>. But the AD from the Arduino have 1024 steps from 0-5V. So to have the information from the sensor in inches we need to make <strong>ADvalue/2</strong> and if you want to have the information in <strong>cm</strong>, just multiply the previous value for <strong>2.4</strong> (1 inch = 2.4 cm).</p>
<p><strong>Pics:</strong><br />
<img src="http://img.photobucket.com/albums/v107/tigerbr/max1.jpg" alt="" /><br />
<img src="http://img.photobucket.com/albums/v107/tigerbr/max2.jpg" alt="" /></p>
<p><strong>Video:</strong><br />
<object width="550" height="413"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5783408&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5783408&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ff9933&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="413"></embed></object></p>
<p>So here is the code:<br />
You can download the file <a href="http://danielandrade.net/files/maxbotix-ultrasonic-range-finder.pde">HERE</a>.<br />
[cc lang="c"]<br />
/* </p>
<p>  @ Code for interfacing arduino with a Maxbotix LV-EZ4 Ultrasonic Range Finder<br />
  @ Code by Daniel Spillere Andrade<br />
  @ www.danielandrade.net    -=-   daniel@danielandrade.net</p>
<p>*/</p>
<p>int blinkLed=13;         // Where the led will blink<br />
int sensorPin=0;         // Analog Pin In<br />
int sum=0;		 // Variable to calculate SUM<br />
int avgrange=50;         // Quantity of values to average<br />
int sensorValue;         // Value for te average<br />
int i,media,d;           // Variables<br />
float cm,inch;           // Converted to cm</p>
<p>void setup()<br />
{<br />
  Serial.begin(9600);   // To check what is being read on the Serial Port<br />
}</p>
<p>void loop() {</p>
<p>    d=analogRead(sensorPin);            // Read the analog value<br />
    digitalWrite(blinkLed,HIGH);        // Turn on LED<br />
    delay(d);                           // Delay changes with the analogread<br />
    digitalWrite(13,LOW);               // Turn off LED<br />
    delay(d);	                        // Another delay</p>
<p>    cm = (d / 2) * 2.4;                 // Convert the value to centimeters<br />
    inch = d/2;                         // Value in inches</p>
<p>    Serial.println(cm);                 //Print average of all measured values</p>
<p>    // This is the code if you want to make an average of the read values</p>
<p>     /* </p>
<p>       for(i = 0; i < avgrange ; i++) {<br />
	   sum+=analogRead(sensorPin);<br />
	   delay(10);<br />
	}</p>
<p>        media = sum/avgrange;<br />
	Serial.println(media);  //Print average of all measured values</p>
<p>      sum=0;<br />
      media=0;</p>
<p>    */</p>
<p>}</p>
<p>[/cc]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2009/07/26/ultrasonic-range-finder-with-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIY: Binary Clock with Arduino</title>
		<link>http://www.danielandrade.net/2008/07/15/binary-clock-with-arduino/</link>
		<comments>http://www.danielandrade.net/2008/07/15/binary-clock-with-arduino/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 07:01:05 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/2008/07/15/binary-clock-with-arduino/</guid>
		<description><![CDATA[Yesterday I was going to start watching a movie, when me and my friend pedro decided to give up on the movie and build a binary clock. After sometime thinking [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3253/2673622074_d5d44ea966_t.jpg" alt="" align="left" />Yesterday I was going to start watching a movie, when me and my friend <a href="http://ovelha.org/pedro/">pedro</a> decided to give up on the movie and build a binary clock. After sometime thinking on how to program it, we made it. It works beautifully, so I decided to show here how I&#8217;ve done. It may not be the easiest way to make it work, but that&#8217;s what we&#8217;ve done.</p>
<p><strong>Parts:</strong><br />
- Arduino<br />
- 13x Leds (You choose the color)<br />
- 13x 220Ohms Resistors<br />
- 3x 2.2KOhms Resistos<br />
- 2x Push-Buttons<br />
- 1x Normal Button<br />
- Bread Board<br />
- Wire</p>
<p>Well, this is a quite simple circuit, but can be tricky for some people, so I will try to explain how it work and how to assemble.</p>
<p><strong>How it works</strong></p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/07/leds1.png' alt='leds1.png' /></p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/07/binary-example.png' alt='binary-example.png' /></p>
<p>I think with this images you can understand how it will work. The leds which are on, you just need to sum the numbers, and it will give current time.</p>
<p><strong>Assembling</strong><br />
To assemble the circuit, you will need to connect first the resistors and leds. To do it, just hook up leds + resistor from the pin 1 to 13. Remember that the bigger leg of the led is positive, and need to be connected to arduino output pin, and the other leg should be on the ground.</p>
<p>So that the code will work for the circuit, you should use the leds like this, LED 1 to PIN 1, LED 2 to PIN 2, and so on&#8230;</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/07/imagem-binario.png' alt='imagem-binario.png' /></p>
<p>For connecting the buttons, I&#8217;ve used one digital input and two analog inputs. To set change the hour/minute, you will need to use two push-buttons. And they need to be connected to the analog input pin 0 and 5. And to turn leds ON/OFF I&#8217;ve used a normal button that is connected to digital input pin 0. To make it work, you need use one leg of the buttons on a 2.2K Ohm resistor connected to the 5V output together with the analog/digital input, and the other leg going to the ground, something like this:</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/07/button1.png' alt='button1.png' /></p>
<p>If you don&#8217;t understand what I am trying to explain, you can go to the <a href="http://www.arduino.cc/en/Tutorial/Button">arduino website here</a>. </p>
<p><strong>Images + Video</strong></p>
<p><a href="http://www.flickr.com/photos/pasteler0/2672798839/" title="Binary Clock II by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3143/2672798839_87cc88de17.jpg" width="500" height="314" alt="Binary Clock II" /></a></p>
<p><a href="http://www.flickr.com/photos/pasteler0/2672795611/" title="Binary Clock I by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3281/2672795611_ebcc7224fc.jpg" width="500" height="375" alt="Binary Clock I" /></a></p>
<p><object width="500" height="377"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1349421&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1349421&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="377"></embed></object></p>
<p><strong>Code</strong><br />
The clock code is based on the <a href="http://www.faludi.com/projects/open-source-arduino-clock/">open-source-arduino-clock</a> by Rob Faludi. I&#8217;ve made many changes, but the time counting the basically the same. So if you want to make another kind of clock, I suggest you to take a look on that website.</p>
<p>If the code below isn&#8217;t working, you can download it as .txt <a href="http://www.danielandrade.net/wp-content/uploads/2008/07/arduno-binary-clock.txt">HERE</a>.</p>
<p>[cc lang="c"]<br />
/*<br />
An open-source binary clock for Arduino.<br />
Based on the code from by Rob Faludi (http://www.faludi.com)<br />
Code under (cc) by Daniel Spillere Andrade, www.danielandrade.net</p>
<p>http://creativecommons.org/license/cc-gpl</p>
<p>*/</p>
<p>int second=0, minute=0, hour=0; //start the time on 00:00:00<br />
int munit,hunit,valm=0,valh=0,ledstats,i;</p>
<p>void setup() { //set outputs and inputs<br />
pinMode(1, OUTPUT);pinMode(2, OUTPUT);pinMode(3, OUTPUT);pinMode(4, OUTPUT);pinMode(5, OUTPUT);<br />
pinMode(6, OUTPUT);pinMode(7, OUTPUT);pinMode(8, OUTPUT);pinMode(9, OUTPUT);pinMode(10, OUTPUT);<br />
pinMode(11, OUTPUT);pinMode(12, OUTPUT);pinMode(13, OUTPUT);</p>
<p>pinMode(0, INPUT);<br />
}</p>
<p>void loop() {</p>
<p>static unsigned long lastTick = 0; // set up a local variable to hold the last time we moved forward one second<br />
// (static variables are initialized once and keep their values between function calls)<br />
// move forward one second every 1000 milliseconds</p>
<p>if (millis() &#8211; lastTick >= 1000) {<br />
	lastTick = millis();<br />
	second++;</p>
<p>}</p>
<p>// move forward one minute every 60 seconds<br />
	if (second >= 60) {<br />
	minute++;<br />
	second = 0; // reset seconds to zero<br />
}</p>
<p>// move forward one hour every 60 minutes<br />
if (minute >=60) {<br />
	hour++;<br />
	minute = 0; // reset minutes to zero<br />
}</p>
<p>if (hour >=24) {<br />
	hour=0;<br />
	minute = 0; // reset minutes to zero<br />
}</p>
<p>	munit = minute%10; //sets the variable munit and hunit for the unit digits<br />
	hunit = hour%10;</p>
<p>	ledstats = digitalRead(0);  // read input value, for setting leds off, but keeping count<br />
	if (ledstats == LOW) {</p>
<p>	for(i=1;i< =13;i++){<br />
	digitalWrite(i, LOW);}</p>
<p>	} else  {</p>
<p>	//minutes units<br />
	if(munit == 1 || munit == 3 || munit == 5 || munit == 7 || munit == 9) {  digitalWrite(1, HIGH);} else {  digitalWrite(1,LOW);}<br />
	if(munit == 2 || munit == 3 || munit == 6 || munit == 7) {digitalWrite(2, HIGH);} else {digitalWrite(2,LOW);}<br />
	if(munit == 4 || munit == 5 || munit == 6 || munit == 7) {digitalWrite(3, HIGH);} else {digitalWrite(3,LOW);}<br />
	if(munit == 8 || munit == 9) {digitalWrite(4, HIGH);} else {digitalWrite(4,LOW);}</p>
<p>	//minutes<br />
	if((minute >= 10 &#038;&#038; minute < 20) || (minute >= 30 &#038;&#038; minute < 40) || (minute >= 50 &#038;&#038; minute < 60))  {digitalWrite(5, HIGH);} else {digitalWrite(5,LOW);}<br />
	if(minute >= 20 &#038;&#038; minute < 40)  {digitalWrite(6, HIGH);} else {digitalWrite(6,LOW);}<br />
	if(minute >= 40 &#038;&#038; minute < 60) {digitalWrite(7, HIGH);} else {digitalWrite(7,LOW);}</p>
<p>	//hour units<br />
	if(hunit == 1 || hunit == 3 || hunit == 5 || hunit == 7 || hunit == 9) {digitalWrite(8, HIGH);} else {digitalWrite(8,LOW);}<br />
	if(hunit == 2 || hunit == 3 || hunit == 6 || hunit == 7) {digitalWrite(9, HIGH);} else {digitalWrite(9,LOW);}<br />
	if(hunit == 4 || hunit == 5 || hunit == 6 || hunit == 7) {digitalWrite(10, HIGH);} else {digitalWrite(10,LOW);}<br />
	if(hunit == 8 || hunit == 9) {digitalWrite(11, HIGH);} else {digitalWrite(11,LOW);}</p>
<p>	//hour<br />
	if(hour >= 10 &#038;&#038; hour < 20)  {digitalWrite(12, HIGH);} else {digitalWrite(12,LOW);}<br />
	if(hour >= 20 &#038;&#038; hour < 24)  {digitalWrite(13, HIGH);} else {digitalWrite(13,LOW);}</p>
<p>	}</p>
<p>	valm = analogRead(0);    // add one minute when pressed<br />
	 if(valm&lt;800) {<br />
	 minute++;<br />
	 second=0;<br />
	 delay(250);<br />
	}</p>
<p>	valh = analogRead(5);    // add one hour when pressed<br />
	 if(valh&lt;800) {<br />
	 hour++;<br />
	 second=0;<br />
	 delay(250);<br />
	}</p>
<p>}</p>
<p>[/cc]</p>
<p><a href="http://www.flickr.com/photos/pasteler0/2673622074/" title="Binary Clock III by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3253/2673622074_d5d44ea966.jpg" width="375" height="500" alt="Binary Clock III" /></p>
<p>Hope you liked, any question just ask! And if you make your own, send me pics =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2008/07/15/binary-clock-with-arduino/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
		<item>
		<title>Temperature Sensor + Arduino</title>
		<link>http://www.danielandrade.net/2008/07/05/temperature-sensor-arduino/</link>
		<comments>http://www.danielandrade.net/2008/07/05/temperature-sensor-arduino/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 20:49:56 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/2008/07/05/temperature-senson-arduino/</guid>
		<description><![CDATA[Hello people, it&#8217;s been a while since I have posted projects on this website. This semester was really busy, I didn&#8217;t have time to much else, but soon I will [...]]]></description>
			<content:encoded><![CDATA[<p>Hello people, it&#8217;s been a while since I have posted projects on this website. This semester was really busy, I didn&#8217;t have time to much else, but soon I will have my winter holiday (Here in south our summer holiday is from December to February). </p>
<p>Today I am going to show you how to build a simple temperature sensor using one <strong>LM35 Precision Temperature Sensor</strong> and <a href="http://www.arduino.cc">Arduino</a>, so you can hookup on your future projects. The circuit will send serial information about the temperature so you can use on your computer, change the code as you will. I&#8217;m planning to build a temperature sensor with max/min + clock + LCD, and when I get it done, I will post here.</p>
<p><strong>Parts:</strong></p>
<ul>
<li> Arduino (You can use other microcontroller, but then you will need to change the code).</li>
<li>LM35 Precision Centigrade Temperature Sensor, you can get from any electronic store. Here is the <a href="http://www.national.com/ds/LM/LM35.pdf">DATA SHEET</a>.</li>
<li>BreadBoard</li>
</ul>
<p><strong>Assembling:</strong><br />
This is a quick and simple step. Just connect the 5V output from arduino to the 1st pin of the sensor, ground the 3rd pin and the 2nd one, you connect to the 0 Analog Input.</p>
<p><strong>Down goes some pictures that may help you, click to enlarge:</strong></p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/07/temp-sensor.png' align="center" /></p>
<p><img src="http://www.danielandrade.net/wp-content/uploads/2008/07/arduino-temperature-sensor-lm35.png" alt="" /></p>
<p><a href="http://www.flickr.com/photos/pasteler0/2640370158/" title="Temperature Sensor by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3024/2640370158_fa44b7b51f.jpg" width="500" height="282" alt="Temperature Sensor" /></a></p>
<p><a href="http://www.flickr.com/photos/pasteler0/2640375924/" title="sens by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3267/2640375924_09db130d57.jpg" width="500" height="299" alt="sens" /></a></p>
<p><a href="http://www.flickr.com/photos/pasteler0/2639548657/" title="processin by Daniel Spillere Andrade, on Flickr"><img src="http://farm4.static.flickr.com/3270/2639548657_c92de1f887.jpg" width="500" height="361" alt="processin" /></a></p>
<p>Here is the <strong>Arduino </strong>Code, just upload it and check the <strong>Serial Communication</strong> Option.</p>
<p>You can also download the <strong>.pde</strong> <a href="http://www.danielandrade.net/files/temperature_sensor_lm35.pde">HERE</a>.</p>
<p>[cc lang="c"]<br />
/*<br />
An open-source LM35DZ Temperature Sensor for Arduino. This project will be enhanced on a regular basis<br />
(cc) by Daniel Spillere Andrade , http://www.danielandrade.net</p>
<p>http://creativecommons.org/license/cc-gpl</p>
<p>*/</p>
<p>int pin = 0; // analog pin<br />
int tempc = 0,tempf=0; // temperature variables<br />
int samples[8]; // variables to make a better precision<br />
int maxi = -100,mini = 100; // to start max/min temperature<br />
int i;</p>
<p>void setup()<br />
{<br />
  Serial.begin(9600); // start serial communication<br />
}</p>
<p>void loop()<br />
{</p>
<p>for(i = 0;i< =7;i++){ // gets 8 samples of temperature</p>
<p>  samples[i] = ( 5.0 * analogRead(pin) * 100.0) / 1024.0;<br />
  tempc = tempc + samples[i];<br />
  delay(1000);</p>
<p>}</p>
<p>tempc = tempc/8.0; // better precision<br />
tempf = (tempc * 9)/ 5 + 32; // converts to fahrenheit</p>
<p>if(tempc > maxi) {maxi = tempc;} // set max temperature<br />
if(tempc < mini) {mini = tempc;} // set min temperature</p>
<p>Serial.print(tempc,DEC);<br />
Serial.print(" Celsius, ");</p>
<p>Serial.print(tempf,DEC);<br />
Serial.print(" fahrenheit -> &#8220;);</p>
<p>Serial.print(maxi,DEC);<br />
Serial.print(&#8221; Max, &#8220;);<br />
Serial.print(mini,DEC);<br />
Serial.println(&#8221; Min&#8221;);</p>
<p>tempc = 0;</p>
<p>delay(1000); // delay before loop<br />
}<br />
[/cc]</p>
<p>Anything just ask! <img src='http://www.danielandrade.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2008/07/05/temperature-sensor-arduino/feed/</wfw:commentRss>
		<slash:comments>106</slash:comments>
		</item>
		<item>
		<title>How I built My HTPC</title>
		<link>http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/</link>
		<comments>http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 21:15:48 +0000</pubDate>
		<dc:creator>DanielAndrade</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[htpc]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/</guid>
		<description><![CDATA[I&#8217;ve built my HTPC like one year ago, don&#8217;t know why I have never written about it on this website. Well, for today, I will be presenting the place I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve built my HTPC like one year ago, don&#8217;t know why I have never written about it on this website. Well, for today, I will be presenting the place I spend many hours of my life, my Home <a href="http://www.stubhub.com/theater-tickets/">Theater</a> PC, my Media/File/Gaming/BackUp Server. The idea came many years ago, but without $, it was not possible. Fist my main computer was near the tv, so I used to connect to my old tv using a S-Video Cable and a P2 to a RCA Cable, and as a Tube Tv, the quality wasn&#8217;t that good, and I couldn&#8217;t almost read any text on the screen, just big texts like subtitles.</p>
<p><a href="http://www.flickr.com/photos/pasteler0/2301054690/" title="My HTPC by Daniel Spillere Andrade, on Flickr"><img src="http://farm3.static.flickr.com/2359/2301054690_0a45503085.jpg" width="500" height="281" alt="My HTPC" /></a></p>
<p>When I decided to build a definitive HTPC, I looked for a hardware that would fit my needs, nothing too expensive, but something that would play High Definition files without problems, and also could play some games, like Pro Evolution Soccer (best game to play with friends) or Tomb Raider. By the time, I had a tube tv with component video (good, but could be so much better), and 5.1 sound connected to my Home Theater Sound System.</p>
<h2>parts</h2>
<p><strong>MotherBoard:</strong> <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813131025">ASUS P5W DH Deluxe</a>, excellent MB for a HTPC, with many great features no it, like S/PDIF Port, a digital output for connecting to my 5.1 sound system, two on board 10/100/1000 network cards (two is good if you want to use it as a router or a firewall) plus wireless. USB, Firewire and eSATA makes file transfer to external hard drives easy and fast. It also have a remote control, so you can set the volume, turn it off and on (I don&#8217;t really use it very much)</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/02/p5w.jpg' alt='' /></p>
<p><strong>Processor:</strong> I got a <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16819115016">Core 2 Duo E6420, 4mb cache</a>, very good for playing HD files and games.</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/proc.jpg' alt='proc.jpg' /></p>
<p><strong>Case:</strong> The computer case could be anyone, but a receiver looking case would be much cooler. Here in Brazil wasn&#8217;t so easy to find one, and getting it from USA would be very expensive. Luckily I found the <a href="http://www.3rsys.com/english/products/view.asp?navi=case&#038;idx_num=81">M Station HT-3000</a> from 3R SYSTEM, a great case for my project. It comes with a small Blue LCD Display that can be used to show the time, current track song playing on iTunes or Winamp, the time of the film you&#8217;re watching or other things you can configure. It also comes with a remote control, very good one by the way, where you can use it to surf on your files, songs and videos, pause, exit programs, exit windows, or do almost anything the mouse/keyboard could do. Well, I believe this pictures show a little more about this case:<br />
<img src='http://www.danielandrade.net/wp-content/uploads/2008/02/3.jpg' alt='3.jpg' /></p>
<p><strong>Memory:</strong> I got 1GB DDR2-667 Corsair RAM memory, It&#8217;s enough for the kind of HTPC I want, maybe someday I put more, but till now I don&#8217;t need more. Remember to get one compatible with your mother board.</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/mem.jpg' alt='mem.jpg' /></p>
<p><strong>Storage:</strong> For the start, I got a 320GB 7200rpm SATA-II, not so much storage, when you talk of High Definition Movies. So I got an External 500GB drive that attend my needs for now, and if I need, I can take it anywhere. Someday I&#8217;ll get more and faster drives, as I&#8217;m a media lover.</p>
<p><strong>Video Card:</strong> I got an e-GeForce 7600 GT 256mb PCI-E board from EVGA, with component, vga and dvi output (before I was using component to connect to my TV). I&#8217;m using a DVI to HDMI cable to connect to my LG 32&#8242; LCD Time Machine II screen, so I got now quality digital video on my tv.</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/vga.jpg' alt='vga.jpg' /></p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/dvi-html.jpg' alt='dvi-html.jpg' /></p>
<p><strong>Power Supply:</strong> For the computer, a 500 watts is good enough.</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/ps.jpg' alt='ps.jpg' /></p>
<p><strong>Mouse &#038; Keyboard:</strong> Now I needed a wireless mouse and keyboard, and I choose Microsoft&#8217;s wireless mouse and keyboard 2000. They are very good, but the only problem that they don&#8217;t have a good range, so when I want to use it from far, I need to put the small receiver near, and it&#8217;s so nice, as I need to keep moving it all the time.</p>
<p><img src='http://www.danielandrade.net/wp-content/uploads/2008/03/mk.jpg' alt='mk.jpg' /></p>
<h2>Software</h2>
<p>Well, as I want it to be not just a media player, but a gaming computer, I installed Win XP (never Vista ^^), so we can play videos and games without needing to use Wine, less time and effort.</p>
<p><strong>Programs I use very much:</strong></p>
<ol>
<li><strong>Media Players:</strong> Here we have many options, first there are the HTPC software, like the open source project <a href="http://www.team-mediaportal.com/">Media Portal</a>, where you can browse your films, musics, read rss, watch forecast and much more, with big letters and everything, it&#8217;s a good choice. For a long time I&#8217;ve used <a href="http://www.videolan.org/vlc/">VLC</a>, great PLAY EVERYTHING software, it&#8217;s good if you don&#8217;t want to install many different codecs, as it plays everything. Some days ago I discovered <a href="http://www.gomlab.com">GOM PLAYER</a>, it works like <a href="http://www.videolan.org/vlc/">VLC</a>, you don&#8217;t need to install more codecs, because it already plays everything. And I&#8217;m liking it very much, more then VLC, as it have a better interface and works better with subtitles. If you don&#8217;t know it, I suggest you to <a href="http://www.gomlab.com/">check it out</a>.</li>
<li><strong>FTPD:</strong> A FTP server is one of the easiest way to transfer files across computers, as you have more control of the files being transfered. I&#8217;m not a big fan of transferring files using Windows Explorer, many times it doesn&#8217;t work, or if anything goes wrong while transferring, you lose it all, and have to start all over again. For FTPD I like <a href="http://www.g6ftpserver.com/">GeneFTP</a>, and for Client, I use <a href="http://www.flashfxp.com/">FlashFXP</a> on Windows and gFTP on Linux (soon I&#8217;ll be needing a mac version also).</li>
<li><strong>VNC:</strong> When I need to install programs or do anything on it, I use <a href="http://www.uvnc.com/">UltraVNC</a>, so I can access visually the computer from anywhere. Software I like is VNC.</li>
<li><strong>Torrent:</strong> I love BitTorrent, and I use it almost everyday (downloading linux only, of course), and my client of choice is <a href="http://utorrent.com">uTorrent</a>, lightweight fast and very complete program, and one thing I like it the WebGUI, so I can check the process of downloading files and manage them from anywhere.</li>
<li><strong>BackUP:</strong> For having my data safe, I use <a href="http://www.2brightsparks.com/i">Syncback</a>, the best backup program I know, and it&#8217;s free. With it I able to backup my stuff using FTP, from everywhere. I also like to backup my photos to 3 different places at the same time (some can be though windows network, samba or ftp).</li>
<li><strong>Backup Your DVDs:</strong> For backing up my dvds, I&#8217;m using <a href="http://www.dvdshrink.org/">DVD Shrink</a>, very good software to save your precious dvds to your hard disk. Also good to save that movie you rented and didn&#8217;t have time to watch it.</li>
</ol>
<h2>links</h2>
<p>Here goes some good things to read and links before you start building your own HTPC. (I&#8217;ll add more links with time)</p>
<ol>
<li><a href="http://www.htpcforums.com">HTPC Forum</a></li>
<li><a href="http://paulstamatiou.com/2008/01/25/diy-200-dollar-pc">DIY &#8211; 200 Dollar PC</a></li>
<li><a href="http://lifehacker.com/software/geek-to-live/geek-to-live-automatically-back-up-your-hard-drive-147855.php">Geek to Live: Automatically back up your hard drive</a></li>
</ol>
<p>I&#8217;m still looking for some good photo viewer, I would like to find something like the amazing <a href="http://www.piclens.com/">PicLens</a>, do you know any?<br />
How would you build your own HTPC?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielandrade.net/2008/02/29/how-i-built-my-htpc/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

