<?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; english</title>
	<atom:link href="http://blog.flo.cx/category/english/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>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>how to catch 336 twitter bots in 12 hours&#8230;</title>
		<link>http://blog.flo.cx/2011/07/how-to-catch-336-twitter-bots-in-12-hours/</link>
		<comments>http://blog.flo.cx/2011/07/how-to-catch-336-twitter-bots-in-12-hours/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 08:27:21 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[OnlineLife Net Webapps]]></category>
		<category><![CDATA[bots]]></category>
		<category><![CDATA[qr.cx]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[urlshortener]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2637</guid>
		<description><![CDATA[yesterday our API (the API of qr.cx) returned rubbish for about 12 hours. i apologize for that, this will not happen again. we are working on a reimplementation which should be far more reliable.

 however the thing had an upside. we were able to expose twitter bots who published this rubbish without checking. in ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>yesterday our API (the API of <a href="http://qr.cx/api.php">qr.cx</a>) returned rubbish for about 12 hours. i apologize for that, this will not happen again. we are working on a reimplementation which should be far more reliable.</p>
<p><a href="http://blog.flo.cx/mycontent/2011/07/twitterbots.png"><img src="http://blog.flo.cx/mycontent/2011/07/twitterbots-e1310198805155-150x150.png" alt="" title="twitterbots" width="150" height="150" class="alignright size-thumbnail wp-image-2639" /></a> however the thing had an upside. we were able to expose twitter <a href="http://en.wikipedia.org/wiki/Internet_bot">bots</a> who published this rubbish without checking. in total we found 336 twitter bots who did so. they included<br />
<code><br /><b>Notice</b>: Undefined variable: [...] in <b>/[...]/qr.cx/htdocs/api/index.php</b>[...]"</code></p>
<p>in their tweets. a human being would not do that. firstly the API is made for automated use, so why would one use that on a regular basis; secondly the error is apparent to a human user. one would not publish a tweet with the full nonsense. the bots did.</p>
<p>so now we can search twitter for this perfidious string and see which account is a bot. this is good, this could help <a href="http://twitter.com">twitter™</a> to identify malicious users/bots and protect their normal human users.<br />
<a href="http://twitter.com/#!/flowolf/status/89291966625488896"><img src="http://blog.flo.cx/mycontent/2011/07/bots_exposed-500x206.png" alt="" title="bots_exposed" width="500" height="206" class="aligncenter size-large wp-image-2643" /></a><br />
but it also helps us, the urlshortener, to safeguard the system. we can identify spam links. we can search the twitter bot&#8217;s stream for links it has shortened before. those links are most likely links to spam or fraudulent pages. disabling those would be no harm.</p>
<p>i&#8217;m looking forward to implementing these security features. it will definitely require a little more thinking to setup a nice safe system.</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2637&amp;md5=7b7af7409d6746fc5dec48e5a53f03aa" 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/07/how-to-catch-336-twitter-bots-in-12-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Airpower 11&#8230;</title>
		<link>http://blog.flo.cx/2011/07/airpower-11/</link>
		<comments>http://blog.flo.cx/2011/07/airpower-11/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 14:33:07 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Motoriges]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[air power]]></category>
		<category><![CDATA[airplane]]></category>
		<category><![CDATA[airpower]]></category>
		<category><![CDATA[airpower 11]]></category>
		<category><![CDATA[flight show]]></category>
		<category><![CDATA[red bull]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2609</guid>
		<description><![CDATA[this saturday we went to see the "Airpower 11". apparently the biggest air show in europe, and it really was huge.

it started on friday, with about 140.000 people. on saturday there were about 160.000. let's just say: it was really crowded!

i did take some photos:

the full selection can be found in my picasa album.

No related posts.]]></description>
			<content:encoded><![CDATA[<p>this saturday we went to see the &#8220;<a href="http://www.airpower11.at">Airpower 11</a>&#8220;. apparently the biggest air show in europe, and it really was huge.</p>
<p>it started on friday, with about 140.000 people. on saturday there were about 160.000. let&#8217;s just say: it was really crowded!</p>
<p>i did take some photos:<br />
<a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_001.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_001-150x150.jpg" alt="Royal Saudi Hawks" title="Royal Saudi Hawks" width="150" height="150" class="alignnone size-thumbnail wp-image-2610" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_013.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_013-150x150.jpg" alt="Lockheed P-38L Lightning" title="Lockheed P-38L Lightning" width="150" height="150" class="alignnone size-thumbnail wp-image-2611" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_020.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_020-150x150.jpg" alt="Chance Vought F4U-4 Corsair" title="Chance Vought F4U-4 Corsair" width="150" height="150" class="alignnone size-thumbnail wp-image-2612" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_025.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_025-150x150.jpg" alt="North American B-25J Mitchell" title="North American B-25J Mitchell" width="150" height="150" class="alignnone size-thumbnail wp-image-2613" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_035.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_035-150x150.jpg" alt="Lockheed C-130 Hercules" title="Lockheed C-130 Hercules" width="150" height="150" class="alignnone size-thumbnail wp-image-2620" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_045.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_045-150x150.jpg" alt="Eurofighter Typhoon" title="Eurofighter Typhoon" width="150" height="150" class="alignnone size-thumbnail wp-image-2614" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_047.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_047-150x150.jpg" alt="Patrouille Suisse" title="Patrouille Suisse" width="150" height="150" class="alignnone size-thumbnail wp-image-2615" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_056.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_056-150x150.jpg" alt="MiG -29A" title="MiG -29A" width="150" height="150" class="alignnone size-thumbnail wp-image-2616" /></a><a href="http://blog.flo.cx/mycontent/2011/07/air_power_11_062.jpg"><img src="http://blog.flo.cx/mycontent/2011/07/air_power_11_062-150x150.jpg" alt="Frecce Tricolori" title="Frecce Tricolori" width="150" height="150" class="alignnone size-thumbnail wp-image-2617" /></a><br />
the full selection can be found in my <a href="https://picasaweb.google.com/103260345240274334586/AirPower11">picasa album</a>.</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2609&amp;md5=dc50714c1002984e7f9ca3678ef2bb44" 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/07/airpower-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Big Bang Theory Relationship Diagram&#8230;</title>
		<link>http://blog.flo.cx/2011/06/big-bang-theory-relationship-diagram/</link>
		<comments>http://blog.flo.cx/2011/06/big-bang-theory-relationship-diagram/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 08:29:34 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[big bang theoy]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[the big bang theory]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2588</guid>
		<description><![CDATA[not 10 days ago meisterluk posted a graph of relationship data he collected watching The Big Bang Theory .

i was not quite happy with his visualization. so i redid it, here it is:



i hope it is self explanatory. in case it is not, here is how it works: the series starts in the center ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>not 10 days ago <a href="http://lukas-prokop.at">meisterluk</a> posted <a href="http://lukas-prokop.at/blog/2011/06/the-big-bang-theory-relationship-diagram/">a graph</a> of relationship data he collected watching <a href="http://en.wikipedia.org/wiki/The_Big_Bang_Theory">The Big Bang Theory </a>.</p>
<p>i was not quite happy with his visualization. so i redid it, here it is:</p>
<div id="attachment_2591" class="wp-caption aligncenter" style="width: 505px"><a href="http://blog.flo.cx/mycontent/2011/06/bigbang_relations.png"><img class="size-large wp-image-2591" title="Big Bang Theory Relationship Diagram" src="http://blog.flo.cx/mycontent/2011/06/bigbang_relations_small-495x500.png" alt="Big Bang Theory Relationship Diagram" width="495" height="500" /></a><p class="wp-caption-text">Big Bang Theory Relationship Diagram</p></div>
<p>i hope it is self explanatory. in case it is not,<span id="more-2588"></span> here is how it works: the series starts in the center of the circle. each season has a ring around the center (season 4 on the outside). in case of a relationship (relationship, sex) between characters there is a line for each character which corresponds in color between the characters. e.g. Shelodon and Amy have a long relationship in season 4. the shortest lines are relations that only occur in one episode. double colored lines show a dual relation for that character.</p>
<p>let me know what you think in the comments.</p>
<p>i&#8217;m mirroring the <a href="http://blog.flo.cx/mycontent/2011/06/bigbang_relations_data.txt">data here</a> (actually it corrects missing entries i found too).<br />
<strong>edit</strong> 110702: there was an error in the dataset. i corrected that and updated the graphic (v1.2)</p>
<p><strong>edit</strong> 110707: there was another missing entry in the dataset. i corrected that and updated the graphic (v1.3)</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2588&amp;md5=1085e53817526b74dbedec7a35b6fe8e" 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/06/big-bang-theory-relationship-diagram/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bday Pie Chart&#8230;</title>
		<link>http://blog.flo.cx/2011/06/bday-pie-chart/</link>
		<comments>http://blog.flo.cx/2011/06/bday-pie-chart/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 09:20:03 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[bday]]></category>
		<category><![CDATA[pie chart]]></category>
		<category><![CDATA[stat]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[wishes]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2553</guid>
		<description><![CDATA[having had my birthday recently i was curious about the channels via which people would wish me a happy birthday. so i counted.
and here is the resulting pie chart - what's better than a pie chart for a birthday wish statistic?

it is not surprising that facebook has the biggest piece of the pie. people ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>having had my birthday recently i was curious about the channels via which people would wish me a happy birthday. so i counted.<br />
and here is the resulting pie chart &#8211; what&#8217;s better than a pie chart for a birthday wish statistic?<br />
<div id="attachment_2567" class="wp-caption aligncenter" style="width: 510px"><a href="http://blog.flo.cx/mycontent/2011/06/bday-pie-chart.png"><img src="http://blog.flo.cx/mycontent/2011/06/bday-pie-chart-500x374.png" alt="Birthday wishes pie chart" title="Birthday wishes pie chart" width="500" height="374" class="size-large wp-image-2567" /></a><p class="wp-caption-text">Birthday wishes pie chart</p></div><br />
it is not surprising that <a href="http://facebook.com">facebook</a> has the biggest piece of the pie. people seem to like facebook, i certainly have a bigger contact list than on skype plus facebook knows my birthday and people get reminded. that sums up to a high count.<br />
suprising for me was the second place: the telephone. it beat skype by 1.4% to the second place. it has no auto reminder and it&#8217;s the only medium that is synchronous.<br />
third place goes to <a href="http://skype.com">skype</a> (just text messages) with 11.9%. fourth to <a href="http://en.wikipedia.org/wiki/SMS">SMS</a>.<br />
the last place is shared by twitter and e-mail. twitter is not that much of a surprise to me. on the other hand e-mail suprised me. a few years ago this statistic would have looked totally different without facebook, and e-mail would not be in the last place.</p>
<p>what&#8217;s your birthday wishes statistic like?</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2553&amp;md5=43c56164a149b6b9d8f3dc3bf9244848" 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/06/bday-pie-chart/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HAL chromium icon II&#8230;</title>
		<link>http://blog.flo.cx/2011/05/hal-chromium-icon-ii/</link>
		<comments>http://blog.flo.cx/2011/05/hal-chromium-icon-ii/#comments</comments>
		<pubDate>Tue, 03 May 2011 15:34:00 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[OnlineLife Net Webapps]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[chrome icon]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hal]]></category>
		<category><![CDATA[icon]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2513</guid>
		<description><![CDATA[for the last chromium icon i made HAL version. chrome and chromium got new logos. so i have an update for the HAL icon:



this time i'm providing the svg file and of course you can get the png from above.

Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/09/chromium-icon-hal-edition/' rel='bookmark' title='chromium icon hal edition&#8230;'>chromium icon hal edition&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>for the last chromium icon i made <a href="http://blog.flo.cx/2010/09/chromium-icon-hal-edition/">HAL version</a>. chrome and chromium got <a href="http://googlesystem.blogspot.com/2011/03/new-chrome-logo.html">new logos</a>. so i have an update for the HAL icon:</p>
<div id="attachment_2514" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/05/Chromium_11_Logo_hal.png"><img src="http://blog.flo.cx/mycontent/2011/05/Chromium_11_Logo_hal-300x300.png" alt="chromium icon HAL edition (for chromium 11)" title="chromium icon HAL edition (for chromium 11)" width="300" height="300" class="size-medium wp-image-2514" /></a><p class="wp-caption-text">chromium icon HAL edition (for chromium 11)</p></div>
<p>this time i&#8217;m providing the <a href="http://blog.flo.cx/mycontent/2011/05/Chromium_11_Logo_hal.svg">svg file</a> and of course you can get the png from above.</p>
<p>Related posts:<ol>
<li><a href='http://blog.flo.cx/2010/09/chromium-icon-hal-edition/' rel='bookmark' title='chromium icon hal edition&#8230;'>chromium icon hal edition&#8230;</a></li>
</ol></p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2513&amp;md5=c57bdf15e12216ca0c33c20247252fb2" 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/05/hal-chromium-icon-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to open magnet links on a remote transmission daemon with one click&#8230;</title>
		<link>http://blog.flo.cx/2011/02/how-to-open-magnet-links-on-a-remote-transmission-daemon-with-one-click/</link>
		<comments>http://blog.flo.cx/2011/02/how-to-open-magnet-links-on-a-remote-transmission-daemon-with-one-click/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 14:52:04 +0000</pubDate>
		<dc:creator>flo</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[OnlineLife Net Webapps]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[magnet]]></category>
		<category><![CDATA[magnet link]]></category>
		<category><![CDATA[torrent]]></category>
		<category><![CDATA[transmission]]></category>

		<guid isPermaLink="false">http://blog.flo.cx/?p=2301</guid>
		<description><![CDATA[i'm using transmission for my regular bittorrent needs. it has a nice simple interface and can even be run as a daemon on a server. therefor it even offers a nice looking web interface. 
since my working machine is not always running but my server is, this is where transmission is set up.

the web ...
No related posts.]]></description>
			<content:encoded><![CDATA[<p>i&#8217;m using <a href="http://www.transmissionbt.com/">transmission</a> for my regular bittorrent needs. it has a nice simple interface and can even be run as a daemon on a server. therefor it even offers a nice looking web interface.<br />
since my working machine is not always running but my server is, this is where transmission is set up.<br />
<div id="attachment_2311" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.flo.cx/mycontent/2011/02/Screenshot-Transmission-Web-Interface-Iron.png"><img src="http://blog.flo.cx/mycontent/2011/02/Screenshot-Transmission-Web-Interface-Iron-300x200.png" alt="" title="Transmission Web Interface" width="300" height="200" class="size-medium wp-image-2311" /></a><p class="wp-caption-text">Transmission Web Interface</p></div><br />
the web interface provides a nice mask to setup your torrents. you can upload a .torrent file (to your remote machine) or just an URL of a torrent or most recently a <a href="http://en.wikipedia.org/wiki/Magnet_Link">magnet link</a>. this is very handy since you don&#8217;t need to handle any .torrent files locally. just copy that link and you are done.</p>
<p>when you are running a torrent client directly on the machine you pick out your torrents clicking on the magnet link will most likely start the download immediately without having to copy that link. this kind of comfort was missing with the remote version of transmission.</p>
<p>so i hacked around to solve that.</p>
<p><span id="more-2301"></span></p>
<p>setup your <a href="http://www.google.at/search?q=howto+transmission+web+interface+daemon">remote transmission daemon</a>.</p>
<p>then you need a little script that calls the ajax function the web interface provides to &#8216;upload&#8217; the magnet link.<br />
this is what i came up with:</p>
<pre class="brush: bash; title: ; toolbar: true; notranslate">
#!/bin/bash
test -z $1 &amp;&amp; echo &quot;need magnet link!
$0 &lt;magnet link&gt;&quot; &amp;&amp; exit -1

HOST=YourRemoteHostNameOrIP
PORT=YourPort(default is 9091)
USER=User
PASS=pass

LINK=&quot;$1&quot;
# set true if you want every torrent to be paused initially
#PAUSED=&quot;true&quot;
PAUSED=&quot;false&quot;
SESSID=$(curl --silent --anyauth --user $USER:$PASS &quot;http://$HOST:$PORT/transmission/rpc&quot; | sed 's/.*&lt;code&gt;//g;s/&lt;\/code&gt;.*//g')
curl --silent --anyauth --user $USER:$PASS --header &quot;$SESSID&quot; &quot;http://$HOST:$PORT/transmission/rpc&quot; -d &quot;{\&quot;method\&quot;:\&quot;torrent-add\&quot;,\&quot;arguments\&quot;:{\&quot;paused\&quot;:${PAUSED},\&quot;filename\&quot;:\&quot;${LINK}\&quot;}}&quot;
</pre>
<p>the last thing you need to do is tell your system what to run when you click on a magnet link.<br />
adapting <a href="http://ubuntuforums.org/showthread.php?t=229924">this forum tip</a> you need to run:</p>
<pre class="brush: bash; title: ; notranslate">
gconftool-2 -t string -s /desktop/gnome/url-handlers/magnet/command &quot;/path/to/your/script/from/above/magnetLinkTransfer.sh %s&quot;
gconftool-2 -s /desktop/gnome/url-handlers/magnet/needs_terminal false -t bool
gconftool-2 -t bool -s /desktop/gnome/url-handlers/magnet/enabled true
</pre>
<p>that&#8217;s it. now click on any magnet link and transmission will intercept it and will start it automatically on your remote transmission-daemon.</p>
<p>No related posts.</p><p class="wp-flattr-button"></p> <p><a href="http://blog.flo.cx/?flattrss_redirect&amp;id=2301&amp;md5=a27d7f015ba3365137a5bae0e5bb6ce6" 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/02/how-to-open-magnet-links-on-a-remote-transmission-daemon-with-one-click/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

