<?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>blog.flo.cx &#187; Hardware Gadgets</title>
	<atom:link href="http://blog.flo.cx/category/hardware-gadgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flo.cx</link>
	<description>Tech, Food, Life</description>
	<lastBuildDate>Fri, 30 Dec 2011 14:37:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cory Doctorow &#8211; The coming war on general computation&#8230;</title>
		<link>http://blog.flo.cx/2011/12/cory-doctorow-the-coming-war-on-general-computation/</link>
		<comments>http://blog.flo.cx/2011/12/cory-doctorow-the-coming-war-on-general-computation/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 14:07:58 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[28c3]]></category>
		<category><![CDATA[cory]]></category>
		<category><![CDATA[doctorow]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2792</guid>
		<description><![CDATA[cory doctorow's talk at the 28c3 is great! you should watch it. it really makes you think what kind of society we live in and if one should support companies that do censor their hardware.
http://www.youtube.com/watch?v=HUEvRyemKSg

the video is licensed under CC-BY and so is the audio stream. so - for those of you who want ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>cory doctorow&#8217;s talk at the <a href="http://events.ccc.de/congress/?language=en">28c3</a> is great! you should watch it. it really makes you think what kind of society we live in and if one should support companies that do censor their hardware.</p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=HUEvRyemKSg">http://www.youtube.com/watch?v=HUEvRyemKSg</a></p>
</p>
<p>the video is licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC-BY</a> and so is the audio stream. so &#8211; for those of you who want just the audio stream for a long trip and their mp3 player, i did extract the audio from the <a href="http://mirror.fem-net.de/CCC/28C3/mp4-h264-HQ/28c3-4848-en-the_coming_war_on_general_computation_h264.mp4">high quality video</a> and put up a <a href="http://zoink.it/torrent/20012CF9D3C4A31927F4500A1B617181B5DD1D0B.torrent">torrent</a> here: <a href="http://tors.in/corydoctorow28c3">http://tors.in/corydoctorow28c3</a> &#8211; here is the <a href="magnet:?xt=urn:btih:20012cf9d3c4a31927f4500a1b617181b5dd1d0b&#038;dn=28c3-4848-en-the%5Fcoming%5Fwar%5Fon%5Fgeneral%5Fcomputation.mp3" title="magnet link">magnet link</a>. i will seed <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
and for everyone who is more into http here is the <a href="http://blog.flo.cx/mycontent/2011/12/28c3-4848-en-the_coming_war_on_general_computation.mp3">file</a> for direct download. seed with that if you like.</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2792&amp;md5=098cabe5ef372be76cd8393315596565" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/12/cory-doctorow-the-coming-war-on-general-computation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://mirror.fem-net.de/CCC/28C3/mp4-h264-HQ/28c3-4848-en-the_coming_war_on_general_computation_h264.mp4" length="425690525" type="video/mp4" />
<enclosure url="http://blog.flo.cx/mycontent/2011/12/28c3-4848-en-the_coming_war_on_general_computation.mp3" length="60029864" type="audio/mpeg" />
		</item>
		<item>
		<title>RFID Door Opener&#8230;</title>
		<link>http://blog.flo.cx/2011/10/rfid-door-opener/</link>
		<comments>http://blog.flo.cx/2011/10/rfid-door-opener/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 15:25:46 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[chain]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[door]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[rfid]]></category>
		<category><![CDATA[stepper]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2685</guid>
		<description><![CDATA[
 i finished my latest project: a RFID Door Opener.

besides the fun while hacking it, it improves the security of the door. since it's not an outside door but the door to the garage, it's construction does not allow to mount a more secure lock. so locking it from the outside when leaving is ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/10/non-blocking-breathing-led-for-arduino/' rel='bookmark' title='Non-blocking breathing led for arduino&#8230;'>Non-blocking breathing led for arduino&#8230;</a></li>
<li><a href='http://blog.flo.cx/2010/10/pin-garage-door-opener/' rel='bookmark' title='pin garage door opener&#8230;'>pin garage door opener&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=j9NV7lZxK08&#038;fmt=18">http://www.youtube.com/watch?v=j9NV7lZxK08</a></p>
</p>
<p>recently i finished my latest project: a RFID Door Opener.</p>
<p>besides the fun while hacking it, it improves the security of the door. since it&#8217;s not an outside door but the door to the garage, it&#8217;s construction does not allow to mount a more secure lock. so locking it from the outside when leaving is a bit bothersome.<br />
the new auto-lock feature, which allows the door to auto-lock itself, saves some time and works around the lazy user, who wouldn&#8217;t have locked it.<br />
additionally it is now easy to add or remove the right of access by adding or deleting the RFID&#8217;s unique number from the system. revoking someone&#8217;s right of access is far more difficult with a normal key.</p>
<p>beside an <a href="http://arduino.cc/en/Main/ArduinoBoardUno">arduino</a> i&#8217;m using an <a href="http://www.schmalzhaus.com/EasyDriver/">easydriver</a> to drive the stepper and a <a href="http://www.seeedstudio.com/depot/datasheet/RDM630-Spec..pdf">RFID reader</a> from <a href="http://www.seeedstudio.com/">seeedstudio</a>. </p>
<p>below you can see the schematics of the setup. the ends marked with Ard X go to a port of the arduino, which is the brain of the lock:<br />
<div id="attachment_2686" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.flo.cx/mycontent/2011/10/RFID_Door_Opener.png"><img class="size-large wp-image-2686" title="Schematics" src="http://blog.flo.cx/mycontent/2011/10/RFID_Door_Opener-500x311.png" alt="Schematics for the build" width="500" height="311" /></a><p class="wp-caption-text">Schematics for the build</p></div></p>
<pre class="brush: cpp; collapse: true; light: false; title: ; toolbar: true; notranslate">
/**
 * door lock application (c) 2011 Florian Klien
 * some code parts are borrowed from different authors <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  thx
 */

#include &lt;NewSoftSerial.h&gt;

#define rxPin 2
#define txPin 3

// door defs

#define DOOR_SENS  3 // analog
#define DRIVER_SWITCH 6
#define DOOR_SW 2 // analog

// motor defs
#define DIR_PIN 7
#define STEP_PIN 8
#define ledIN 5
#define ledOUT 11

NewSoftSerial rfid = NewSoftSerial( rxPin, txPin );

// The tag database consists of two parts. The first part is an array of
// tag values with each tag taking up 5 bytes. The second is a list of
// names with one name for each tag (ie: group of 5 bytes).
char* allowedTags[] = {
  &quot;AABBCCDDEE&quot;,         // Tag 1
  &quot;AABBCCDDEE&quot;,         // Tag 2
};

// List of names to associate with the matching tag IDs
char* tagName[] = {
  &quot;User1&quot;,         // Tag 1
  &quot;User2&quot;,         // Tag 2
};

// software version number:
char* software_version = &quot;1.1&quot;;

// Check the number of tags defined
int numberOfTags = sizeof(allowedTags)/sizeof(allowedTags[0]);

int incomingByte = 0;    // To store incoming serial data

boolean locked = true;
int door_open = 0; // pseudo digital
boolean prev_status = false;
boolean auto_lock = true;
//unsigned long auto_lock_time = 0;
int auto_lock_delay = 5; // in seconds
int auto_lock_switch_time = 2; // in seconds
int status_led = 0;
unsigned long status_led_time = millis();
boolean status_led_on = false;

unsigned long status_breathe_time = millis();
int breathe_delay = 10;
boolean breathe_up = true;
int breathe_i = 15;

unsigned long last_successful_rfid_read = 0;
int rfid_success_timeout = 5000; // millis

float lock_speed = 1;

/**
 * Setup
 */
unsigned long time_door = millis();
unsigned long time_switch = millis();
long debounce = 500;

void setup() {
  pinMode(ledIN, OUTPUT);
  pinMode(ledOUT, OUTPUT);
  digitalWrite(ledIN, HIGH);
  digitalWrite(ledOUT, HIGH);
  delay(300);
  digitalWrite(ledIN, LOW);
  digitalWrite(ledOUT, LOW);

  pinMode(DRIVER_SWITCH, OUTPUT);
  digitalWrite(DRIVER_SWITCH, LOW);
  pinMode(DIR_PIN, OUTPUT);
  digitalWrite(DIR_PIN, LOW);
  pinMode(STEP_PIN, OUTPUT);
  digitalWrite(STEP_PIN, LOW);
  pinMode(DOOR_SENS,INPUT);
  pinMode(DOOR_SW,INPUT);

  Serial.begin(9600);   // Serial port for connection to host
  rfid.begin(9600);      // Serial port for connection to RFID module

  Serial.println(&quot;RFID reader starting up&quot;);
  delay(1000);
  Serial.println(&quot;done&quot;);
  Serial.print(&quot;Software Version no: &quot;);
  Serial.println(software_version);
  Serial.print(&quot;door locked: &quot;);
  Serial.print(locked, DEC);
  Serial.print(&quot;\n&quot;);
  Serial.print(&quot;door closed: &quot;);
  Serial.print(!door_open, DEC);
  Serial.print(&quot;\n&quot;);
}

/**
 * Loop
 * non-blocking version of each function!
 */
void loop() {
  readRFID();
  doorSensor();
  doorSwitch();
  statusLed();
}

void doorSensor(){
  // pseudo digital
  door_open = analogRead(DOOR_SENS);
  if(millis() - time_door &gt; debounce){
    if (door_open &lt;= 500 &amp;&amp; prev_status == false){
      Serial.println(&quot;Door: opened&quot;);
      prev_status = true;
      locked = false;
    }else  if(door_open &gt; 500 &amp;&amp; prev_status == true){
      Serial.println(&quot;Door: closed&quot;);
      prev_status = false;
      if(auto_lock){
        Serial.println(&quot;locking door automatically...&quot;);
        delay(auto_lock_delay*1000);
        lock();
        locked = true;
      }
    }
    time_door = millis();
  }
}

void doorSwitch(){
  int dstimer = 0;
  int door_switch = analogRead(DOOR_SW); // pseudo digital
  if(millis() - time_switch &gt; debounce &amp;&amp; door_switch &gt;= 300){
    while (analogRead(DOOR_SW) &gt;= 300) {
      delay(100);
      dstimer++;
    }
    Serial.println(door_switch,DEC);
    Serial.println(dstimer,DEC);
    if (dstimer &lt; auto_lock_switch_time*10) { //button has been pressed less than 2 seconds = 1000/100
        if (locked == false){
          Serial.println(&quot;door locked&quot;);
          locked = true;
          lock();
        }else if(locked == true){
          Serial.println(&quot;door unlocked&quot;);
          locked = false;
          unlock();
      }
    }else {
      // auto_unlock off/on
      if(auto_lock == true){
        Serial.println(&quot;auto_lock off&quot;);
        auto_lock = false;
      }else{
        Serial.println(&quot;auto_lock on&quot;);
        auto_lock = true;
      }
      analogWrite(ledIN, 0); // resetting output

    }
    time_switch = millis();
  }
}

// breathing status led on the inside
void statusBreathe(){
  if( (status_breathe_time + breathe_delay) &lt; millis() ){
    analogWrite(ledIN, breathe_i/1.5);
    status_breathe_time = millis();
    if (breathe_up == true){
      if (breathe_i &gt; 150) {
        breathe_delay = 4;
      }
      if ((breathe_i &gt; 125) &amp;&amp; (breathe_i &lt; 151)) {
        breathe_delay = 5;
      }
      if (( breathe_i &gt; 100) &amp;&amp; (breathe_i &lt; 126)) {
        breathe_delay = 7;
      }
      if (( breathe_i &gt; 75) &amp;&amp; (breathe_i &lt; 101)) {
        breathe_delay = 10;
      }
      if (( breathe_i &gt; 50) &amp;&amp; (breathe_i &lt; 76)) {
        breathe_delay = 14;
      }
      if (( breathe_i &gt; 25) &amp;&amp; (breathe_i &lt; 51)) {
        breathe_delay = 18;
      }
      if (( breathe_i &gt; 1) &amp;&amp; (breathe_i &lt; 26)) {
        breathe_delay = 19;
      }
      breathe_i += 1;
      if( breathe_i &gt;= 255 ){
        breathe_up = false;
      }
    }else{
      if (breathe_i &gt; 150) {
        breathe_delay = 4;
      }
      if ((breathe_i &gt; 125) &amp;&amp; (breathe_i &lt; 151)) {
        breathe_delay = 5;
      }
      if (( breathe_i &gt; 100) &amp;&amp; (breathe_i &lt; 126)) {
        breathe_delay = 7;
      }
      if (( breathe_i &gt; 75) &amp;&amp; (breathe_i &lt; 101)) {
        breathe_delay = 10;
      }
      if (( breathe_i &gt; 50) &amp;&amp; (breathe_i &lt; 76)) {
        breathe_delay = 14;
      }
      if (( breathe_i &gt; 25) &amp;&amp; (breathe_i &lt; 51)) {
        breathe_delay = 18;
      }
      if (( breathe_i &gt; 1) &amp;&amp; (breathe_i &lt; 26)) {
        breathe_delay = 19;
      }
      breathe_i -= 1;
      if( breathe_i &lt;= 15 ){
        breathe_up = true;
        breathe_delay = 970/2;
      }
    }
  }
}

void statusLed(){
  if(auto_lock == false){
    status_led = 150;
  }else{
    // set this to &gt; 0 if you want the status led to blink in default mode
    status_led = 0;
    if(status_led == 0){
      statusBreathe();
    }
  }
  if(millis() - status_led_time &gt;= status_led &amp;&amp; status_led != 0){
    status_led_on = !status_led_on;
    digitalWrite(ledIN,status_led_on);
    status_led_time = millis();
  }
}

void readRFID(){
  byte i         = 0;
  byte val       = 0;
  byte checksum  = 0;
  byte bytesRead = 0;
  byte tempByte  = 0;
  byte tagBytes[6];    // &quot;Unique&quot; tags are only 5 bytes but we need an extra byte for the checksum
  char tagValue[10];

  if(rfid.available()&gt;0){
    if((val = rfid.read()) == 2) {        // Check for header
    bytesRead = 0;
    while (bytesRead &lt; 12) {            // Read 10 digit code + 2 digit checksum
      val = rfid.read();
      Serial.print(val,BYTE);
      // Append the first 10 bytes (0 to 9) to the raw tag value
      if (bytesRead &lt; 10)
      {
        tagValue[bytesRead] = val;
      }

      // Check if this is a header or stop byte before the 10 digit reading is complete
      if((val == 0x0D)||(val == 0x0A)||(val == 0x03)||(val == 0x02)) {
        break;                          // Stop reading
      }

      // Ascii/Hex conversion:
      if ((val &gt;= '0') &amp;&amp; (val &lt;= '9')) {
        val = val - '0';
      }
      else if ((val &gt;= 'A') &amp;&amp; (val &lt;= 'F')) {
        val = 10 + val - 'A';
      }

      // Every two hex-digits, add a byte to the code:
      if (bytesRead &amp; 1 == 1) {
        // Make space for this hex-digit by shifting the previous digit 4 bits to the left
        tagBytes[bytesRead &gt;&gt; 1] = (val | (tempByte &lt;&lt; 4));

        if (bytesRead &gt;&gt; 1 == 5) {                // If we're at the checksum byte,
          checksum ^= tagBytes[bytesRead &gt;&gt; 1];   // Calculate the checksum... (XOR)
        };
      } else {
        tempByte = val;                           // Store the first hex digit first
      };

      bytesRead++;                                // Ready to read next digit
    }

    // Send the result to the host connected via USB
    if (bytesRead == 12) {                        // 12 digit read is complete
      tagValue[10] = '&#92;&#48;';                        // Null-terminate the string

      Serial.print(&quot;Tag read: &quot;);
      for (i=0; i&lt;5; i++) {
        // Add a leading 0 to pad out values below 16
        if (tagBytes[i] &lt; 16) {
          Serial.print(&quot;0&quot;);
        }
        Serial.print(tagBytes[i], HEX);
      }
      Serial.println();

      Serial.print(&quot;Checksum: &quot;);
      Serial.print(tagBytes[5], HEX);
      Serial.println(tagBytes[5] == checksum ? &quot; -- passed.&quot; : &quot; -- error.&quot;);

      // Show the raw tag value
      //Serial.print(&quot;VALUE: &quot;);
      //Serial.println(tagValue);
      Serial.print(&quot;door_open: &quot;);
      Serial.println(door_open,DEC);
      // Search the tag database for this particular tag
      int tagId = findTag( tagValue );

      // Only fire the strike plate if this tag was found in the database
      if( tagId &gt; 0 )
      {
        Serial.print(&quot;Authorized tag ID &quot;);
        Serial.print(tagId);
        if(door_open &gt; 500 &amp;&amp; (last_successful_rfid_read + rfid_success_timeout) &lt; millis() ){
          Serial.print(&quot;: unlocking for &quot;);
          Serial.println(tagName[tagId - 1]);   // Get the name for this tag from the database
          unlock();
          last_successful_rfid_read = millis();
          delay(2000);
        }
      } else {
        Serial.println(&quot;Tag not authorized&quot;);
        //failSound();
        for (int i=0;i&lt;7;i++){ // FIXXME nonblocking version?
          digitalWrite(ledOUT, HIGH);
          digitalWrite(ledIN, HIGH);
          delay(100);
          digitalWrite(ledOUT, LOW);
          digitalWrite(ledIN, LOW);
          delay(80);
        }
      }
      Serial.println();     // Blank separator line in output
    }

    bytesRead = 0;
  }
  }
}

/**
 * Fire the relay to activate the strike plate for the configured
 * number of seconds.
 */
void unlock() {
  digitalWrite(ledOUT, HIGH);
  digitalWrite(ledIN, HIGH);
  delay(100);
  // if your stepper is powerful enough you can use full speed
  rotateDeg(-800, 0.6);
  digitalWrite(ledIN, LOW);
  digitalWrite(ledOUT, LOW);
  locked = false;
}

void lock(){
  digitalWrite(ledOUT, HIGH);
  digitalWrite(ledIN, HIGH);
  delay(100);
  rotateDeg(800, 1);
  digitalWrite(ledIN, LOW);
  digitalWrite(ledOUT, LOW);
  locked = true;
}

void rotate(int steps, float speed){

  // power driver
  digitalWrite(DRIVER_SWITCH,HIGH);
  delay(200);
  //rotate a specific number of microsteps (8 microsteps per step) - (negitive for reverse movement)
  //speed is any number from .01 -&gt; 1 with 1 being fastest - Slower is stronger
  int dir = (steps &gt; 0)? HIGH:LOW;
  steps = abs(steps);

  digitalWrite(DIR_PIN,dir); 

  float usDelay = (1/speed) * 250;

  for(int i=0; i &lt; steps; i++){
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(usDelay); 

    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(usDelay);
  }

  // unpower driver
  delay(200);
  digitalWrite(DRIVER_SWITCH,LOW);
} 

void rotateDeg(float deg, float speed){
  // power driver
  digitalWrite(DRIVER_SWITCH,HIGH);
  delay(200);
  //rotate a specific number of degrees (negative for reverse movement)
  //speed is any number from .01 -&gt; 1 with 1 being fastest - Slower is stronger
  int dir = (deg &gt; 0)? HIGH:LOW;
  digitalWrite(DIR_PIN,dir); 

  int steps = abs(deg)*(1/0.225);
  float usDelay = (1/speed) * 250;

  for(int i=0; i &lt; steps; i++){
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(usDelay); 

    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(usDelay);
  }
  // unpower driver
  delay(200);
  digitalWrite(DRIVER_SWITCH,LOW);
}

/**
 * Search for a specific tag in the database
 */
int findTag( char tagValue[10] ) {
  for (int thisCard = 0; thisCard &lt; numberOfTags; thisCard++) {
    // Check if the tag value matches this row in the tag database
    if(strcmp(tagValue, allowedTags[thisCard]) == 0)
    {
      // The row in the database starts at 0, so add 1 to the result so
      // that the card ID starts from 1 instead (0 represents &quot;no match&quot;)
      return(thisCard + 1);
    }
  }
  // If we don't find the tag return a tag ID of 0 to show there was no match
  return(0);
}
</pre>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/10/non-blocking-breathing-led-for-arduino/' rel='bookmark' title='Non-blocking breathing led for arduino&#8230;'>Non-blocking breathing led for arduino&#8230;</a></li>
<li><a href='http://blog.flo.cx/2010/10/pin-garage-door-opener/' rel='bookmark' title='pin garage door opener&#8230;'>pin garage door opener&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2685&amp;md5=f136944fa2cc6c01acaa83db11a509c9" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/10/rfid-door-opener/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Non-blocking breathing led for arduino&#8230;</title>
		<link>http://blog.flo.cx/2011/10/non-blocking-breathing-led-for-arduino/</link>
		<comments>http://blog.flo.cx/2011/10/non-blocking-breathing-led-for-arduino/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 21:49:13 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[breathing]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[sleeping]]></category>
		<category><![CDATA[sleeping led]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2659</guid>
		<description><![CDATA[i needed a version of the 'breathing led' for a project which would not block everything else. button presses and the actual application should run without delay. after all it would just be cosmetics ;)

the result looks like this:

 is my non-blocking code for a breathing led with arduino:




original code came from thecustomgeek.com
Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>i needed a version of the &#8216;breathing led&#8217; for a project which would not block everything else. button presses and the actual application should run without delay. after all it would just be cosmetics <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>the result looks like this:</p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=TjzFo63svmM&#038;fmt=18">http://www.youtube.com/watch?v=TjzFo63svmM</a></p>
</p>
<p>here is my non-blocking code for a breathing led with arduino:<br />
<code></p>
<pre class="brush: cpp; title: ; notranslate">
/*
&quot;Breathing non-blocking sleep LED.&quot;
Florian Klien 2011
blog.flo.cx
based on work from Jeremy Saglimbeni (thecustomgeek.com)
*/
#define LED 5 // any PWM led will do
unsigned long status_breathe_time = millis();
int breathe_delay = 10;
boolean breathe_up = true;
int breathe_i = 15;

void setup() { // bring the LED up nicely from being off
  for(i = 0 ; i &lt;= 15; i+=1)
  {
    analogWrite(11, i);
    delay(5);
  }
}

void loop()
{
  nonBlockingBreathe();
  otherImportantNonBlockingStuff();
}

void nonBlockingBreathe(){
  if( (status_breathe_time + breathe_delay) &lt; millis() ){
    analogWrite(LED, breathe_i);
    status_breathe_time = millis();
    if (breathe_up == true){
      if (breathe_i &gt; 150) {
        breathe_delay = 4;
      }
      if ((breathe_i &gt; 125) &amp;&amp; (breathe_i &lt; 151)) {
        breathe_delay = 5;
      }
      if (( breathe_i &gt; 100) &amp;&amp; (breathe_i &lt; 126)) {
        breathe_delay = 7;
      }
      if (( breathe_i &gt; 75) &amp;&amp; (breathe_i &lt; 101)) {
        breathe_delay = 10;
      }
      if (( breathe_i &gt; 50) &amp;&amp; (breathe_i &lt; 76)) {
        breathe_delay = 14;
      }
      if (( breathe_i &gt; 25) &amp;&amp; (breathe_i &lt; 51)) {
        breathe_delay = 18;
      }
      if (( breathe_i &gt; 1) &amp;&amp; (breathe_i &lt; 26)) {
        breathe_delay = 19;
      }
      breathe_i += 1;
      if( breathe_i &gt;= 255 ){
        breathe_up = false;
      }
    }else{
      if (breathe_i &gt; 150) {
        breathe_delay = 4;
      }
      if ((breathe_i &gt; 125) &amp;&amp; (breathe_i &lt; 151)) {
        breathe_delay = 5;
      }
      if (( breathe_i &gt; 100) &amp;&amp; (breathe_i &lt; 126)) {
        breathe_delay = 7;
      }
      if (( breathe_i &gt; 75) &amp;&amp; (breathe_i &lt; 101)) {
        breathe_delay = 10;
      }
      if (( breathe_i &gt; 50) &amp;&amp; (breathe_i &lt; 76)) {
        breathe_delay = 14;
      }
      if (( breathe_i &gt; 25) &amp;&amp; (breathe_i &lt; 51)) {
        breathe_delay = 18;
      }
      if (( breathe_i &gt; 1) &amp;&amp; (breathe_i &lt; 26)) {
        breathe_delay = 19;
      }
      breathe_i -= 1;
      if( breathe_i &lt;= 15 ){
        breathe_up = true;
        breathe_delay = 970;
      }
    }
  }
}
</pre>
<p></code></p>
<p>original code came from <a href="http://thecustomgeek.com/2011/06/17/breathing-sleep-led/">thecustomgeek.com</a></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
<li><a href='http://blog.flo.cx/2011/01/diy-time-lapse-timer/' rel='bookmark' title='DIY time-lapse timer&#8230;'>DIY time-lapse timer&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2659&amp;md5=36b649ee9d9fd7f1b6d0288c83c3b784" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/10/non-blocking-breathing-led-for-arduino/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>privatsphäre &#8211; unbekannt&#8230;</title>
		<link>http://blog.flo.cx/2011/04/privatsphare-unbekannt/</link>
		<comments>http://blog.flo.cx/2011/04/privatsphare-unbekannt/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 20:03:29 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2430</guid>
		<description><![CDATA[apple hat es wieder mal in meinen blog geschafft geschafft! diesmal allerdings nicht im positiven sinne.

wie es aussieht zeichnet apple mit dem iOS4 die positionsdaten des besitzers (oder des telefons) auf und speichert diese in einer datenbank am rechner ab. diese daten sind nicht gerade spärlich.
es lassen sich deutliche bewegungsprofile erstellen und sehr schön ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p><a href="http://apple.com">apple</a> hat es wieder mal in meinen blog geschafft geschafft! diesmal allerdings nicht im positiven sinne.</p>
<p>wie es aussieht zeichnet apple mit dem <a href="http://de.wikipedia.org/wiki/Apple_iOS">iOS4</a> die positionsdaten des besitzers (oder des telefons) auf und speichert diese in einer datenbank am rechner ab. diese daten sind nicht gerade spärlich.<br />
es lassen sich <a href="http://petewarden.github.com/iPhoneTracker/">deutliche bewegungsprofile erstellen</a> und sehr schön darstellen (siehe bild).</p>
<div id="attachment_2432" class="wp-caption aligncenter" style="width: 460px"><a href="http://blog.flo.cx/mycontent/2011/04/iphone_tracking.png"><img class="size-medium wp-image-2432" title="iPhone Tracking Data on a Map (mit Erlaubnis von Christian Körner)" src="http://blog.flo.cx/mycontent/2011/04/iphone_tracking-450x277.png" alt="iPhone Tracking Data on a Map (mit Erlaubnis von Christian Körner)" width="450" height="277" /></a><p class="wp-caption-text">iPhone Tracking Data on a Map (<a href='http://www.flickr.com/photos/chriskoerner/5637810351'>quelle</a>)</p></div>
<p><a href="http://www.golem.de/1104/82955.html">golem</a> und <a href="http://www.engadget.com/2011/04/20/researchers-find-ios-4-records-your-location-in-system-file-syn/">engadget</a> haben hierzu schöne videos in ihren bericht eingebunden.</p>
<p style="text-align: center;"><iframe src="http://player.vimeo.com/video/22608787?title=0&amp;byline=0&amp;portrait=0" width="400" height="300" frameborder="0"></iframe></p>
<p>wieso speichert apple diese daten? werden diese beim &#8216;anonymen&#8217; feedback mitgeschickt?</p>
<p>derzeit schaut es nicht so aus als<span id="more-2430"></span> wären diese daten irgendwem zugänglich. dennoch. wenn diese daten gespeichert werden, können sie gestohlen, misbraucht und verwertet werden; und das nicht immer vom rechtmässigen eigentümer. wer immer diese daten in die hände bekommt kann alles damit tun. ich bin hier zwigespalten zwischen datenschutz und datamining. die daten aller iphone nutzer wären ein wundervoller datensatz. das muss man apple lassen: sie wissen wie man an tolle daten kommt <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>der artikel vom <a href="http://radar.oreilly.com/2011/04/apple-location-tracking.html">o&#8217;reilly radar</a> ist lesenswert.</p>
<p>wer ein iphone sein eigen nennt kann auch die <a href="http://petewarden.github.com/iPhoneTracker/">software</a> ausprobieren und nachsehen wo es sich die letzte zeit aufgehalten hat.</p>
<p><strong>UPDATE 110422 1910:</strong> android nutzer kamen sich schon fast benachteiligt vor; aber es stellt sich heraus <a href="http://www.google.com/">google</a> macht mit <a href="http://www.android.com/">android</a> <a href="http://www.netzpolitik.org/2011/hidden-feature-in-android-peilsender/">genau das gleiche</a>!</p>
<div id="attachment_2499" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.flo.cx/mycontent/2011/04/android-location-data2.png"><img src="http://blog.flo.cx/mycontent/2011/04/android-location-data2-500x312.png" alt="Android Location Data" title="Android Location Data " width="500" height="312" class="size-large wp-image-2499" /></a><p class="wp-caption-text">Android Location Data (erstellt mit <a href='http://fredj.github.com/android-locdump/viewer/'>android-locdump viewer</a> {<a href='http://github.com/klienux/android-locdump/'>source</a>})</p></div>
<p>aus obigem bild sieht man, dass ich in <a href="http://www.graz.at">graz</a> das linke murufer (rechts im bild) vorziehe. </p>
<p>bei android geräten liegen die daten im folder &#8220;/data/data/com.google.android.location/files&#8221; und heissen &#8220;cache.cell&#8221; und &#8220;cache.wifi&#8221;. sie lassen sich mit einem kleinen <a href="https://github.com/packetlss/android-locdump">python script</a> von <a href="https://twitter.com/packetlss">@packetlss</a> extrahieren und verwerten.<br />
google schickt sich wlan daten (sprich BSSIDs von accesspoints mit entsprechender peilung) selbst zu und verwertet sie in einer datenbank die dann herangezogen wird um andere geräte genauer zu positionieren. ein <a href="http://samy.pl/androidmap/">kleines webtool</a> von <a href="http://twitter.com/samykamkar">@samykamkar</a> greift auf googles datenbank zu und hilft dabei mac adressen bestimmten koordinaten zuzuordnen. gebt dort mal die mac adresse eures eigenen wlan hotspots ein!</p>
<p><strong>UPDATE 110426 1220:</strong> ich habe die letzten tage die option &#8216;standort&#038;sicherheit -> drahtlosnetzwerke&#8217; abgestellt gehabt und tatsächlich. das android gerät loggt nichts mehr mit. am iphone soll das ja nicht der fall sein &#8211; stellt man dort das loggen ab, passiert es trotzdem&#8230;</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2430&amp;md5=476302f068d3ffe9ea35e001153fd3c3" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/04/privatsphare-unbekannt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>1 TB deaddrop speicher&#8230;</title>
		<link>http://blog.flo.cx/2011/04/1-tb-deaddrop-speicher/</link>
		<comments>http://blog.flo.cx/2011/04/1-tb-deaddrop-speicher/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 10:07:44 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[copyleft]]></category>
		<category><![CDATA[deaddrop]]></category>
		<category><![CDATA[deaddrops]]></category>
		<category><![CDATA[graz]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usbstick]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2402</guid>
		<description><![CDATA[seit meinem letzten eintrag zum ersten grazer deaddrop hat sich einiges getan.
die anzahl an deaddrops dürfte sich etwa verdoppelt haben und der gesamte speicherplatz, der jetzt zur verfügung steht, ist auf 1 TB angewachsen.
Graz hat mittlerweile insgesamt 4 deaddrops (schwimmschulkai, grazbachgasse, lichtenfelsgasse, schillerstrasse)

lustigerweise scheint Belgrad einen sehr hohen bedarf zu haben. dabei schlägt Belgrad ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/01/dead-drops/' rel='bookmark' title='Dead Drops&#8230;'>Dead Drops&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>seit meinem letzten eintrag zum <a href="http://blog.flo.cx/2011/01/dead-drops/">ersten grazer</a> <a href="http://deaddrops.com">deaddrop</a> hat sich einiges getan.<br />
die anzahl an deaddrops dürfte sich etwa verdoppelt haben und der gesamte speicherplatz, der jetzt zur verfügung steht, ist auf 1 <a href="http://de.wikipedia.org/wiki/Byte#Bedeutungen_von_Dezimal-_und_Bin.C3.A4rpr.C3.A4fixen_f.C3.BCr_gro.C3.9Fe_Anzahlen_von_Bytes">TB</a> angewachsen.<br />
Graz hat mittlerweile insgesamt 4 deaddrops (<a href="http://deaddrops.com/db/?page=view&amp;id=207">schwimmschulkai</a>, <a href="http://deaddrops.com/db/?page=view&amp;id=216">grazbachgasse</a>, <a href="http://deaddrops.com/db/?page=view&amp;id=303">lichtenfelsgasse</a>, <a href="http://deaddrops.com/db/?page=view&amp;id=367">schillerstrasse</a>)</p>
<p>lustigerweise scheint Belgrad einen sehr hohen bedarf zu haben. dabei schlägt <a href="http://www.belgraded.com/dead-drops-in-belgrade">Belgrad</a> sogar New York City.</p>
<div id="attachment_2406" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.flo.cx/mycontent/2011/04/newyork_vs_beograd_deaddrops1.png"><img class="size-full wp-image-2406" title="newyork_vs_beograd_deaddrops" src="http://blog.flo.cx/mycontent/2011/04/newyork_vs_beograd_deaddrops-500x201.png" alt="Deaddrops in New York City und Belgrad" width="500" height="200" /></a><p class="wp-caption-text">Deaddrops in New York City und Belgrad (Beograd)</p></div>
<p><strong>UPDATE 110503 1200</strong>: ich hab die deaddrops in graz nochmal gezählt.<br />
es sind jetzt 6:<br />
<a href="http://deaddrops.com/db/?page=view&amp;id=207">schwimmschulkai</a>, <a href="http://deaddrops.com/db/?page=view&amp;id=216">grazbachgasse</a>, <del datetime="2011-06-10T12:22:40+00:00"><a href="http://deaddrops.com/db/?page=view&amp;id=303">lichtenfelsgasse</a></del>, <a href="http://deaddrops.com/db/?page=view&amp;id=367">schillerstrasse</a>, <a href="http://deaddrops.com/db/?page=view&#038;id=444">alte poststrasse</a>, <a href="http://deaddrops.com/db/?page=view&#038;id=494">inffeldgasse</a></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/01/dead-drops/' rel='bookmark' title='Dead Drops&#8230;'>Dead Drops&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2402&amp;md5=e3f579e4afd3eb40c21bd34205cbbe4e" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/04/1-tb-deaddrop-speicher/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dead Drops&#8230;</title>
		<link>http://blog.flo.cx/2011/01/dead-drops/</link>
		<comments>http://blog.flo.cx/2011/01/dead-drops/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 17:07:03 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[OnlineLife Net Webapps]]></category>
		<category><![CDATA[copyleft]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[deaddrop]]></category>
		<category><![CDATA[deaddrops]]></category>
		<category><![CDATA[file sharing]]></category>
		<category><![CDATA[graz]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usbstick]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2224</guid>
		<description><![CDATA[dead drops sind eine tolle idee. sie führen einem vor augen dass man durch keine behörde dieser welt die lokale verteilte offline interaktion zwischen menschen kontrollieren kann.



 was ist die idee hinter dead drops? dead drops, zu deutsch toter briefkasten, sind verstecke bei denen man etwas für jemanden hinterlegen kann ohne sich treffen zu ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/04/1-tb-deaddrop-speicher/' rel='bookmark' title='1 TB deaddrop speicher&#8230;'>1 TB deaddrop speicher&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://deaddrops.com">dead drops</a> sind eine tolle idee. sie führen einem vor augen dass man durch keine behörde dieser welt die lokale verteilte offline interaktion zwischen menschen kontrollieren kann.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="600" height="370" src="http://www.youtube.com/embed/hwohadcUv4A?hd=1&#038;fmt=22" frameborder="0" allowFullScreen></iframe></p>
<p><div id="attachment_2229" class="wp-caption alignright" style="width: 210px"><a href="http://blog.flo.cx/mycontent/2011/01/IMG_3841_2400.jpg"><img src="http://blog.flo.cx/mycontent/2011/01/IMG_3841_2400-200x300.jpg" alt="" title="Dead Drop FREE_DATA" width="200" height="300" class="size-medium wp-image-2229" /></a><p class="wp-caption-text">der erste Grazer Dead Drop</p></div> was ist die idee hinter dead drops? dead drops, zu deutsch <a href="http://de.wikipedia.org/wiki/Toter_Briefkasten">toter briefkasten</a>, sind verstecke bei denen man etwas für jemanden hinterlegen kann ohne sich treffen zu müssen. diese wurden gerne von spionen genutzt.</p>
<p>auf die heutige zeit umgelegt sind das offline datenträger (usb-sticks) die an &#8216;geheimen&#8217; öffentlichen orten hinterlegt &#8211; sprich: eingemauert oder angeklebt werden und so jedem zugänglich sind. jeder darf auf dem datenträger etwas ablegen und jeder darf daten herunterladen.</p>
<p>seit heute hat <a href="http://graz.at/">graz</a> auch einen <a href="http://deaddrops.com/db/?page=view&#038;id=207">dead drop</a>. hoffentlich kommen noch einige dazu. gesamt sind jetzt weltweit etwa 397 GB speicherplatz frei zugänglich.</p>
<p> ich bin wirklich gespannt ob und wenn in welche richtung diese bewegung die ganze copyright und file sharing diskussion führt.</p>
<p><strong>update</strong>:<br />
es hat keine 3 tage gedauert und schon gibt es einen <a href="http://deaddrops.com/db/?page=view&#038;id=216">zweiten dead drop in graz</a>. weiter so. <img src='http://blog.flo.cx/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>update 11 04 06</strong>:<br />
es kamen noch 2 dead drops hinzu: <a href="http://deaddrops.com/db/?page=view&#038;id=303">lichtenfelsgasse</a>, <a href="http://deaddrops.com/db/?page=view&#038;id=367">schillerstrasse</a> </p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2011/04/1-tb-deaddrop-speicher/' rel='bookmark' title='1 TB deaddrop speicher&#8230;'>1 TB deaddrop speicher&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2224&amp;md5=1c462dccb4fb59b98b268844be71e3b8" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/01/dead-drops/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DIY time-lapse timer&#8230;</title>
		<link>http://blog.flo.cx/2011/01/diy-time-lapse-timer/</link>
		<comments>http://blog.flo.cx/2011/01/diy-time-lapse-timer/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 16:31:48 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[arduino diecimila]]></category>
		<category><![CDATA[arduino pro mini]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[time lapse]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2181</guid>
		<description><![CDATA[i did a time-lapse video a few month ago. back then i used the video function from my eos 7D. extracted 2 frames per second, did some image manipulations and put it all back together at 24 frames per second.

video takes a lot of space. since time-lapse videos are much more interesting if you ...
Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>i did a <a href="http://blog.flo.cx/s/9z">time-lapse video</a> a few month ago. back then i used the video function from my eos 7D. extracted 2 frames per second, did some image manipulations and put it all back together at 24 frames per second.</p>
<p>video takes a lot of space. since time-lapse videos are much more interesting if you cover a big time interval you either have to have a huge memory card or you manage to turn down the amount of data that comes in. i decided to do the latter. since canon cams don&#8217;t come with a time-lapse function built in, one has to find an external time that does the job. there are several <a href="http://www.amazon.com/s?ie=UTF8&#038;tag=wwwcanoniccom-20&#038;index=blended&#038;link_code=qs&#038;field-keywords=eos%20remote%20timer">cheap external cable timers</a> available. they just have one problem. they just do time intervals from 1 to about 9999 seconds. i needed less. 300 ms (0,3 sec) should be my smallest interval. so i built my own.<br />
<span id="more-2181"></span><br />
<div id="attachment_2197" class="wp-caption alignright" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_2400_02.jpg"><img src="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_350_02-300x199.jpg" alt="" title="diy_time-lapse_timer_350_02" width="300" height="199" class="size-medium wp-image-2197" /></a><p class="wp-caption-text">the second try - opened box</p></div>since i didn&#8217;t want to put any solder on my camera i bought a cheap cable remote switch, which i took apart to get the cable.<br />
the first iteration was set up in an old stopwatch. it used an <a href="http://arduino.cc/en/Main/ArduinoBoardProMini">arduino pro mini</a>. one can push the buttons to increase or decrease the interval. since i was not able to use the internal display for timer feedback that was not the optimal solution. i do want to know what interval i&#8217;m using exactly.</p>
<p>the second iteration is built on an <a href="http://www.arduino.cc/en/Main/ArduinoBoardDiecimila">arduino diecimila</a>. on top i use a prototyping board which holds a 16&#215;2 display. as input there is a potentiometer that chooses the timing interval. the display shows exactly what interval is chosen.<br />
<div id="attachment_2195" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_2400_03.jpg"><img src="http://blog.flo.cx/mycontent/2011/01/diy_time-lapse_timer_350_03-300x199.jpg" alt="" title="diy_time-lapse_timer_350_03" width="300" height="199" class="size-medium wp-image-2195" /></a><p class="wp-caption-text">final 2nd iteration</p></div></p>
<p>to reduce the risk of toasting my camera i separated the arduino circuit with an opto-isolator to the cable.</p>
<p>the next step is to reduce the size of the box by finding a smaller form factor and using the arduino pro mini.</p>
<p>here is the arduino code:</p>
<pre class="brush: cpp; collapse: true; light: false; title: ; toolbar: true; notranslate">
/*
  Time-lapse timer

Copyright 2011 Florian Klien. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, this list of
      conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above copyright notice, this list
      of conditions and the following disclaimer in the documentation and/or other materials
      provided with the distribution.

THIS SOFTWARE IS PROVIDED BY Florian Klien ``AS IS AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Florian Klien OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include &lt;LiquidCrystal.h&gt;

#define LCDRS 11
#define LCDENABLE 10
#define LCDD4 7
#define LCDD5 6
#define LCDD6 5
#define LCDD7 4
#define POTPIN 2 // potentiometer pin
#define LEDPIN 12 // pin for an optional led
#define SWITCHPIN 8
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(LCDRS, LCDENABLE, LCDD4, LCDD5, LCDD6, LCDD7);

double val = 0;
int ts = 0;
unsigned long int steps[] = {333,500,750,
               1000,1500,2000,
               2500,3000,4000,
               5000,6000,7000,
               8000,9000,10000,
               12000,15000,20000,
               25000,30000,35000,
               40000,45000,50000,
               55000,60000,90000,
               120000,240000,300000,
               360000,420000,480000,
               540000,600000,900000,
               1200000
             }; // in ms

unsigned long lasttime = 0;

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(&quot;timer set to:&quot;);
  Serial.begin(9600);
  //lasttime = millis();
  pinMode(LEDPIN, OUTPUT);
  pinMode(SWITCHPIN, OUTPUT);
  digitalWrite(LEDPIN,HIGH);
  delay(500);
  digitalWrite(LEDPIN,LOW);
}

void loop() {
  val = analogRead(POTPIN);
  ts = map(val, 0, 1023, 0, 37);
  lcd.setCursor(0, 1);
  double time = (float)steps[ts]/1000;
  lcd.print(time);
  lcd.print(&quot; sec &quot;);
  lcd.print((float)(millis()-lasttime)/1000);
  lcd.print(&quot;    &quot;);
  if((millis()-lasttime) &gt; steps[ts]){
    digitalWrite(LEDPIN, HIGH);
    digitalWrite(SWITCHPIN,HIGH);
    delay(100);
    digitalWrite(LEDPIN, LOW);
    digitalWrite(SWITCHPIN,LOW);
    lasttime = millis();
  }
}</pre>
<p><strong>update:</strong><br />
here is a little testvideo:<br />
<object style="height: 320px; width: 520px"><param name="movie" value="http://www.youtube.com/v/ZPb77NvY-tk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/ZPb77NvY-tk?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="520" height="320"></object></p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/08/miniature-time-lapse-with-fake-tilt-shift-howto/' rel='bookmark' title='miniature time-lapse with fake tilt shift (howto)…'>miniature time-lapse with fake tilt shift (howto)…</a></li>
<li><a href='http://blog.flo.cx/2011/10/rfid-door-opener/' rel='bookmark' title='RFID Door Opener&#8230;'>RFID Door Opener&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2181&amp;md5=62ec2759ebe50f1c9969549d3bcfe093" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2011/01/diy-time-lapse-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vorsicht vor dem plus…</title>
		<link>http://blog.flo.cx/2010/10/vorsicht-vor-dem-plus/</link>
		<comments>http://blog.flo.cx/2010/10/vorsicht-vor-dem-plus/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 15:43:26 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[Hardware Gadgets]]></category>
		<category><![CDATA[Life & Thoughts]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[+]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[plus]]></category>
		<category><![CDATA[receiver]]></category>
		<category><![CDATA[satellit]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[urheberrecht]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2119</guid>
		<description><![CDATA[es ist wirklich verblüffend hinter welchen harmlosen logos, die eigentlich mehr versprechen, rechteinhaber versuchen dem kunden seine rechte zu nehmen.

HD+ ist so ein beispiel. um nichts besser aber der kunde darf dann keine werbung mehr überspringen, keinen timeshift machen und natürlich keine aufnahmen mehr auf eine andere festplatte verlagern. kosten tut es auch noch ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_2124" class="wp-caption alignright" style="width: 190px"><a href="http://blog.flo.cx/mycontent/2010/10/HD+-Logo.png"><img src="http://blog.flo.cx/mycontent/2010/10/HD+-Logo.png" alt="" title="HD+-Logo" width="180" height="107" class="size-full wp-image-2124" /></a><p class="wp-caption-text">HD+-Logo</p></div>es ist wirklich verblüffend hinter welchen harmlosen logos, die eigentlich mehr versprechen, rechteinhaber versuchen dem kunden seine rechte zu nehmen.</p>
<p><a href="http://de.wikipedia.org/wiki/HD%2B">HD+</a> ist so ein beispiel. um nichts besser aber der kunde darf dann keine werbung mehr überspringen, keinen timeshift machen und natürlich keine aufnahmen mehr auf eine andere festplatte verlagern. kosten tut es auch noch was: zusätzliche gebühren und natürlich neue receiver sind fällig.<br />
<span id="more-2119"></span></p>
<p style="text-align: center;"><iframe title="YouTube video player" class="youtube-player" type="text/html" width="549" height="339" src="http://www.youtube.com/embed/mvXQqnggZWs?rel=0" frameborder="0"></iframe></p>
<p>da fällt mir nur immer diese grafik ein:<br />
<a href="http://blog.flo.cx/mycontent/2010/10/legal-dvd-vs-pirated-copy.jpeg"><img src="http://blog.flo.cx/mycontent/2010/10/legal-dvd-vs-pirated-copy-290x300.jpg" alt="" title="legal-dvd-vs-pirated-copy" width="290" height="300" class="aligncenter size-medium wp-image-2129" /></a></p>
<p>zu allem überfluss muss sich jetzt der konsument wirklich vor jeder zusatzbezeichnung mit dem PLUS (+) fürchten. denn das könnte ja seine rechte und gewohnheiten deutlich einschränken.<br />
nur bei <a href="http://en.wikipedia.org/wiki/ITunes_Plus">itunes</a> war ja das plus die bezeichnung für die DRM-freie version der musik&#8230;</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2119&amp;md5=3cf2328378590cc2483157bc3acb9cbe" title="Flattr" target="_blank"><img src="http://blog.flo.cx/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.flo.cx/2010/10/vorsicht-vor-dem-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

