<?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>Projects :: NoSomos</title>
	<atom:link href="http://projects.nosomos.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://projects.nosomos.org</link>
	<description>Because we like doing it ourselves</description>
	<lastBuildDate>Wed, 30 Jun 2010 21:38:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New RSS feed URL</title>
		<link>http://projects.nosomos.org/2010/05/new-rss-feed-url/</link>
		<comments>http://projects.nosomos.org/2010/05/new-rss-feed-url/#comments</comments>
		<pubDate>Mon, 31 May 2010 22:30:59 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[feed]]></category>

		<guid isPermaLink="false">http://projects.nosomos.org/?p=65</guid>
		<description><![CDATA[As this site runs with a new CMS, the RSS feed has moved here. Please point your feed reader to the new URL to stay updated. Thanks  
(The old feed should run anyway, as it is now redirected to the new one, but just in case&#8230;)
]]></description>
			<content:encoded><![CDATA[<p>As this site runs with a new CMS, the RSS feed has moved <a href="http://projects.nosomos.org/feed/" target="_blank">here</a>. Please point your feed reader to the new URL to stay updated. Thanks <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>(The old feed should run anyway, as it is now redirected to the new one, but just in case&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2010/05/new-rss-feed-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moved to Wordpress</title>
		<link>http://projects.nosomos.org/2010/05/moved-to-wordpress/</link>
		<comments>http://projects.nosomos.org/2010/05/moved-to-wordpress/#comments</comments>
		<pubDate>Thu, 27 May 2010 08:57:35 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://projects.nosomos.org/?p=60</guid>
		<description><![CDATA[Hi there!
This site is finally running in Wordpress instead of Drupal. For sure we&#8217;ll have some broken links that I hope to fix soon, and start publishing new content as soon as possible.
I haven&#8217;t chosen a theme yet, so, if you feel like recommending one, I&#8217;ll be happy to test any.
Sorry for the delay. We&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there!</p>
<p>This site is finally running in Wordpress instead of Drupal. For sure we&#8217;ll have some broken links that I hope to fix soon, and start publishing new content as soon as possible.</p>
<p>I haven&#8217;t chosen a theme yet, so, if you feel like recommending one, I&#8217;ll be happy to test any.</p>
<p>Sorry for the delay. We&#8217;re up again!</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2010/05/moved-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ambilamp code</title>
		<link>http://projects.nosomos.org/2010/04/ambilamp-code/</link>
		<comments>http://projects.nosomos.org/2010/04/ambilamp-code/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 18:44:13 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Ambilamp]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=34</guid>
		<description><![CDATA[There it goes. v0.1 of the Ambilamp code.
Basically, the lamp changes it&#8217;s color randomly, choosing a random target value for red, other for green and other for blue (yes, I&#8217;m using RGB leds   It then roams between the current value of each color to the target value. The colors are represented as hexadecimal [...]]]></description>
			<content:encoded><![CDATA[<p>There it goes. v0.1 of the Ambilamp code.</p>
<p>Basically, the lamp changes it&#8217;s color randomly, choosing a random target value for red, other for green and other for blue (yes, I&#8217;m using RGB leds <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It then roams between the current value of each color to the target value. The colors are represented as hexadecimal numbers in RGB, so FF0000 is red, 00FF00 is green and 0000FF is blue, and so on&#8230;</p>
<p>I mainly adapted the code from Devon D. Jones from <a href="http://www.evilsoft.org" target="ext">evilsoft</a>. His code provides a way of sending external commands to command the color you want to display, roam randomly, blink, etc&#8230; I&#8217;m only using the random roam (at least in v0.1, there are important additions in v0.2, not released yet). The code is easy to understand, so I won&#8217;t explain it here, I added a few modifications, though:</p>
<p>- I forced using &#8220;stepmax&#8221; instead of a random number between stepmax and stepmin. This makes the transition between colors always as slow as possible.<br />
- When receiving a command for displaying a specific color, I prefer a transition to it instead of just displaying it inmediately.<br />
- I added a delay (5 seconds) after reaching the target color, to wait there for a while before roaming again.<br />
- To get better random numbers, I used as seed the value of an unconnected analog input pin, as using millis() as seed makes random numbers that repeat among restarts.</p>
<p><code>
<pre>

/*
 * Adapted 15 June 2009
 * modification copyleft 2009 Enrique Jorreto
 * quercus [at] nosomos.org
 * http://projects.nosomos.org
 * Adapted 14 April 2007
 * modifications copyleft 2007 Devon D. Jones soulcatcher [at] evilsoft.org
 * http://www.evilsoft.org
 * Adapted from Serial RGB LED TOO
 * Created 18 October 2006
 * copyleft 2006 Tod E. Kurt tod [at] todbot.com
 * http://todbot.com/
 */

/*
 * This program can take a number of inputs on the serial port:
 * 1) #[HHHHHH] where H = Hex.  Example: #FF6666.  This will set the orb to the color that is declared.
 * 2) roam.  This will cause the orb to float between colors
 * 3) %[HHHHHH] where H = Hex.  Examples: %, %00FF00.  This will put the orb into alert mode, where
 *    it will flash between the color (or FF0000 if no color is passed in) and a very dim version of the color
 */
#define slen 7        // 7 characters, e.g. '#ff6666'
#define maxCommandLength 16
// For random colors, this is the lower &#038; upper bound.
// The result is multiplied by 16, and then normalized to 0-255
// we start at -3 and go to 20 to bias the randomness towards 0 and 255
// because it results in generally better colors
#define randmin -3
#define randmax 20
// For color transition we use varied transition speed,
// this is the lower &#038; upper bound.
#define stepmin 16
#define stepmax 1

char serInStr[slen];  // array to hold the incoming serial string bytes

struct led {
  int curr; // Current brightness
  int dest; // Next intended brightness
  int step; // If transitioning from one brightness to another, this is the amount to step by
}; // Struct representing a single led
struct ledcolors { led red; led green; led blue; }; // Struct representing the 3 leds
ledcolors colors;

int roam = 0; // 0 roam off, 1 roam on
int roamTo=0;

int alert = 0; // 0 alert off, 1 alert off
unsigned long alertMillis = 0; // used to determine when to swap colors
int alertInterval = 300; // interval used between swap requests

int gndPin   = 12;  // Ground pin.  We use this instead of gnd so that we can get 4 pins in a row.
                    //   Pin 13 has a resistor, so it is not a good pin for us to use.
                    //   as either gnd or vcc for an LED
int redPin   = 11;  // Red LED,   connected to digital pin 11
int greenPin = 10;  // Green LED, connected to digital pin 10
int bluePin  = 9;   // Blue LED,  connected to digital pin 9

void roamToColor(int red, int green, int blue);

void setup() {
  // sets the pins as output
  pinMode(gndPin,   OUTPUT);
  digitalWrite(gndPin, LOW);
  pinMode(redPin,   OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin,  OUTPUT);

  Serial.begin(9600);
  roam = 1; // start off roaming
}

void loop () {
  //read the serial port and create a string out of what you read
  int spos = readSerialString();

  if(spos == slen &#038;&#038; serInStr[0] == '#') {
    roam = 0;
    alert = 0;
    long colorVal = strtol(serInStr + 1, NULL, 16);
    decodeColor(colorVal);
    //displayColor(colors.red.curr, colors.green.curr, colors.blue.curr);
    roamToColor(colors.red.dest, colors.green.dest, colors.blue.dest);
    roam=1;
    roamTo=1;
    memset(serInStr,0,slen);      // indicates we've used this string
  }
  else if(spos != -1 &#038;&#038; strncmp(serInStr, "roam", 4) == 0) {
    alert = 0;
    roam = 1;
    roamTo=0;
    initStruct();
    prepRoam();
  }
  else if(spos != -1 &#038;&#038; serInStr[0] == '%') {
    roam = 0;
    alert = 1;
    initStruct();
    if(spos == slen) {
      long colorVal = strtol(serInStr + 1, NULL, 16);
      decodeColor(colorVal);
    }
    else {
      colors.red.curr = 255;
    }
    prepAlert();
  }

  if(roam == 1) {
    int ret = doRoam();
    displayColor(colors.red.curr, colors.green.curr, colors.blue.curr);
    if(ret > 0 &#038;&#038; roamTo==0) {
      delay(5000);
      prepRoam();
    }

  }

  if(alert == 1) {
    doAlert();
    displayColor(colors.red.curr, colors.green.curr, colors.blue.curr);
  }

  delay(100);  // wait a bit, for serial data
}

// Takes in a string in ?000000 - ?FFFFFF format (Ex: #FFAA33)
// and sets the curr color to the value
void decodeColor(long colorVal) {
  colors.red.dest = (colorVal&#038;0xff0000) >> 16;
  colors.green.dest = (colorVal&#038;0x00ff00) >> 8;
  colors.blue.dest = (colorVal&#038;0x0000ff) >> 0;
}

void displayColor(int red, int green, int blue) {
  analogWrite(redPin, red);
  analogWrite(greenPin, green);
  analogWrite(bluePin, blue);
}

//read a string from the serial and store it in an array
int readSerialString () {
  int i = 0;
  if(!Serial.available()) {
    return -1;
  }
  while (Serial.available() &#038;&#038; i < maxCommandLength) {
    int c = Serial.read();
      serInStr[i++] = c;
  }
  //Serial.println(serInStr);
  return i;
}

void initStruct() {
  colors.red.curr = 0;
  colors.red.dest = 0;
  colors.red.step = 0;
  colors.green.curr = 0;
  colors.green.dest = 0;
  colors.green.step = 0;
  colors.blue.curr = 0;
  colors.blue.dest = 0;
  colors.blue.step = 0;
}

//------------------------------
//ALERT
//------------------------------
void doAlert() {
  if (millis() - alertMillis > alertInterval) {
    alertMillis = millis();
    int tmp = 0;
    tmp = colors.red.curr;
    colors.red.curr = colors.red.dest;
    colors.red.dest = tmp;
    tmp = colors.green.curr;
    colors.green.curr = colors.green.dest;
    colors.green.dest = tmp;
    tmp = colors.blue.curr;
    colors.blue.curr = colors.blue.dest;
    colors.blue.dest = tmp;
  }
}

void prepAlert() {
  colors.red.dest = colors.red.curr / 8;
  colors.green.dest = colors.green.curr / 8;
  colors.blue.dest = colors.blue.curr / 8;
}

//------------------------------
//ROAMING
//------------------------------
int doRoam() {
  colors.red.curr = roamColor(colors.red.curr, colors.red.dest, colors.red.step);
  colors.green.curr = roamColor(colors.green.curr, colors.green.dest, colors.green.step);
  colors.blue.curr = roamColor(colors.blue.curr, colors.blue.dest, colors.blue.step);
  if((colors.red.curr == colors.red.dest)
      &#038;&#038; (colors.green.curr == colors.green.dest)
      &#038;&#038; (colors.blue.curr == colors.blue.dest)) {
    return 1;
  }
  else
  {
    // For some debugging
    /*
    Serial.print("#");
    Serial.print(colors.red.curr);
    Serial.print(" ");
    Serial.print(colors.green.curr);
    Serial.print(" ");
    Serial.print(colors.blue.curr);
    Serial.print(" -> #");
    Serial.print(colors.red.dest);
    Serial.print(" ");
    Serial.print(colors.green.dest);
    Serial.print(" ");
    Serial.println(colors.blue.dest);
    */
  }
  return 0;
}

int roamColor(int curr, int dest, int step) {
  int diff = curr - dest;
  if(diff < 0) {
    diff = diff * -1;
  }

  if(curr == dest) {
    return dest;
  }
  else if(curr < dest) {
    if(diff <= step) {
      return dest;
    }
    return curr + step;
  }
  else {
    if(diff <= step) {
      return dest;
    }
    return curr - step;
  }
}

void prepRoam() {
  randomSeed(analogRead(1));
  colors.red.dest = getRandomColor();
  // I prefer using stepmax for lower gradient
  //colors.red.step = random(stepmin, stepmax);
  colors.red.step = stepmax;
  colors.green.dest = getRandomColor();
  //colors.green.step = random(stepmin, stepmax);
  colors.green.step = stepmax;
  colors.blue.dest = getRandomColor();
  //colors.blue.step = random(stepmin, stepmax);
  colors.blue.step = stepmax;
}

void roamToColor(int red, int green, int blue) {
  colors.red.dest = red;
  // I prefer using always stepmax for lower gradient
  //colors.red.step = random(stepmin, stepmax);
  colors.red.step = stepmax;
  colors.green.dest = green;
  //colors.green.step = random(stepmin, stepmax);
  colors.green.step = stepmax;
  colors.blue.dest = blue;
  //colors.blue.step = random(stepmin, stepmax);
  colors.blue.step = stepmax;
}

int getRandomColor() {
  int color = (random(randmin, randmax) * 16) -1;
  if (color < 0) color = 0;
  if (color > 255) color = 255;
  return color;
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2010/04/ambilamp-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ambilamp video!</title>
		<link>http://projects.nosomos.org/2009/09/ambilamp-video/</link>
		<comments>http://projects.nosomos.org/2009/09/ambilamp-video/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:41:07 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Ambilamp]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=30</guid>
		<description><![CDATA[Yeah, baby, here we go&#8230;
More info in ambilamp page.

Ambilamp from Quercus on Vimeo.
]]></description>
			<content:encoded><![CDATA[<p>Yeah, baby, here we go&#8230;</p>
<p>More info in <a href="http://projects.nosomos.org/ambilamp">ambilamp</a> page.</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6597736&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6597736&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/6597736">Ambilamp</a> from <a href="http://vimeo.com/quercus">Quercus</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/09/ambilamp-video/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some more ambilamp pictures</title>
		<link>http://projects.nosomos.org/2009/06/some-more-ambilamp-pictures/</link>
		<comments>http://projects.nosomos.org/2009/06/some-more-ambilamp-pictures/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 18:40:23 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Ambilamp]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=27</guid>
		<description><![CDATA[Here we go with a couple of new pictures of the ambilamp project. First one is the box where the arduino resides. It&#8217;s just a simple box that you can buy in any electronics shop.
I added a switch for being able to turn off the lamp without unplugging it from the mains. Note that every [...]]]></description>
			<content:encoded><![CDATA[<p>Here we go with a couple of new pictures of the <a href="http://projects.nosomos.org/ambilamp">ambilamp</a> project. First one is the box where the arduino resides. It&#8217;s just a simple box that you can buy in any electronics shop.</p>
<p>I added a switch for being able to turn off the lamp without unplugging it from the mains. Note that every project <strong>must</strong> use at least a piece of duct tape to be considered a real hardware hacking project <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div align="center"><a target="flick" href="http://www.flickr.com/photos/recursivo/3660057421/in/set-72157611958099748/"><img src="http://farm4.static.flickr.com/3348/3660057421_7993b6cb70.jpg" /></a></div>
<p></p>
<p>And the second is the same box, opened <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can see the mini-shield that I made to set the transistor bridge and solder the wires that go to the lamp. And the conector I used to connect the switch to the arduino board (you won&#8217;t be able to do it this way if you are using the newer arduino duemilanuove, as it doesn&#8217;t have anymore the jumper to switch the power supply):</p>
<div align="center"><a target="flick" href="http://www.flickr.com/photos/recursivo/3660855622/in/set-72157611958099748/"><img src="http://farm4.static.flickr.com/3623/3660855622_2931aa07de.jpg" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/06/some-more-ambilamp-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ambilamp code v0.1</title>
		<link>http://projects.nosomos.org/2009/06/ambilamp-code-v0-1/</link>
		<comments>http://projects.nosomos.org/2009/06/ambilamp-code-v0-1/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 18:39:51 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Ambilamp]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=25</guid>
		<description><![CDATA[Here we go, it is not probably very useful without the schematics if you plan to build your own ambilamp, but in the meantime you can have a look and start thinking how to improve this  
This is the v0.1, it is a simple ambilamp very similar to the hundreds that are all around [...]]]></description>
			<content:encoded><![CDATA[<p>Here we go, it is not probably very useful without the schematics if you plan to build your own ambilamp, but in the meantime you can have a look and start thinking how to improve this <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>This is the v0.1, it is a simple ambilamp very similar to the hundreds that are all around the internet. It is in fact an adaptated code, with some improvements that I like.</p>
<p>Whatever&#8230; Show me <a href="ambilamp-code">the code!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/06/ambilamp-code-v0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ambilamp first pictures</title>
		<link>http://projects.nosomos.org/2009/06/ambilamp-first-pictures/</link>
		<comments>http://projects.nosomos.org/2009/06/ambilamp-first-pictures/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 18:38:38 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Ambilamp]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=23</guid>
		<description><![CDATA[I might be somehow offline, but I&#8217;m not off at all  
I&#8217;ve been working, among other things, in an arduino controlled ambient lamp. That is, a lamp that changes its color. Cool, isn&#8217;t it?
What&#8217;s different between my lamp and the hundreds of ambilamps that are round the internet? Well, not much, at least not [...]]]></description>
			<content:encoded><![CDATA[<p>I might be somehow <em>offline</em>, but I&#8217;m not <strong>off</strong> at all <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;ve been working, among other things, in an arduino controlled ambient lamp. That is, a lamp that changes its color. Cool, isn&#8217;t it?</p>
<p>What&#8217;s different between my lamp and the hundreds of ambilamps that are round the internet? Well, not much, at least not right now, but stay tuned&#8230; <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here you have a couple of pictures of the lamp, soon I&#8217;ll upload some code, schematics, more pictures and hopefully a video <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>A nice blue:</p>
<div align="center"><a href="http://www.flickr.com/photos/recursivo/3629263245/in/set-72157611958099748/" target="_blank"><img src="http://farm4.static.flickr.com/3300/3629263245_ccc4ab0e29.jpg" /></a></div>
<p>And the four RGB leds that do the magic stuff <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div align="center"><a href="http://www.flickr.com/photos/recursivo/3630076846/in/set-72157611958099748/" target="_blank"><img src="http://farm4.static.flickr.com/3411/3630076846_2dbf3617ae.jpg"></a></div>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/06/ambilamp-first-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Camera and flash trigger module</title>
		<link>http://projects.nosomos.org/2009/03/camera-and-flash-trigger-module/</link>
		<comments>http://projects.nosomos.org/2009/03/camera-and-flash-trigger-module/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 18:37:50 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[trigger]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=21</guid>
		<description><![CDATA[Here we go again, here is a picture of the camera and flash trigger module I made for my arduino photographic projects:

It includes three 4N26 optocouplers. One (first one from the left side) to trigger a flash, as I did in the arduino controlled flash trigger project; and two more for triggering my Canon EOS [...]]]></description>
			<content:encoded><![CDATA[<p>Here we go again, here is a picture of the camera and flash trigger module I made for my arduino photographic projects:</p>
<p><a href="http://www.flickr.com/photos/recursivo/3362704819/in/set-72157611958099748/" target="new"><img src="http://farm4.static.flickr.com/3141/3362704819_815e934fd6.jpg" alt="" /></a></p>
<p>It includes three 4N26 optocouplers. One (first one from the left side) to trigger a flash, as I did in the <a href="http://projects.nosomos.org/flash-trigger/">arduino controlled flash trigger</a> project; and two more for triggering my Canon EOS 40D camera.</p>
<p>The trigger mechanism is quite simple in modern EOS cameras, they simply have three pins in the trigger plug, short-circuit one (the common one) with one of the others and the camera will focus, short-circuit the common with the other pin and the camera will take a picture.</p>
<p>My camera has a propietary plug, called N3, so I had to &#8220;canibalize&#8221; a remote camera trigger I bought somewhere in eBay to take the wire and the plug apart. This is the safest way to check which wire is each one, but you can get the wiring diagram in lots of sites around the Internet. Or you can check the site of <a href="http://www.glacialwanderer.com/hobbyrobotics/?p=13" target="new">Glacial Wanderer</a>, that also this this hack.</p>
<p>This trigger thing can easily be accomplished with other models of Canon cameras (at least with the 350D and sisters, as they use a simple stereo mini-jack plug, easier to get) and may be with other brands too. I made myself a custom remote trigger for my old 350D, even before I knew about <a href="http://www.arduino.cc" target="new">arduino</a> <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Here is the schematic to control this module:</p>
<p><a href="/files/camera_trigger.png"><img src="/files/camera_trigger_tn.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/03/camera-and-flash-trigger-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash trigger code v0.1</title>
		<link>http://projects.nosomos.org/2009/02/flash-trigger-code-v0-1/</link>
		<comments>http://projects.nosomos.org/2009/02/flash-trigger-code-v0-1/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 19:39:27 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Flash trigger]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=54</guid>
		<description><![CDATA[There it goes, version 0.1 code of the Arduino controlled flash trigger:


int val=0; // To store the value from the LDR
int laserPin=12;
int redLed=8;
int flash=10;
int greenLed=13;
int ldrPin=0;
bool aligned=false;
bool lastAligned=false;
bool beamBroken=false;

void setup() {
  pinMode(greenLed,OUTPUT);
  pinMode(redLed,OUTPUT);
  pinMode(flash,OUTPUT);
}

void loop()
{
  // Laser/LDR alignment
  val=analogRead(ldrPin);
  if(val &#62; 200)
  {
    digitalWrite(greenLed,HIGH);
  [...]]]></description>
			<content:encoded><![CDATA[<p>There it goes, version 0.1 code of the Arduino controlled flash trigger:</p>
<p><code>
<pre>
int val=0; // To store the value from the LDR
int laserPin=12;
int redLed=8;
int flash=10;
int greenLed=13;
int ldrPin=0;
bool aligned=false;
bool lastAligned=false;
bool beamBroken=false;

void setup() {
  pinMode(greenLed,OUTPUT);
  pinMode(redLed,OUTPUT);
  pinMode(flash,OUTPUT);
}

void loop()
{
  // Laser/LDR alignment
  val=analogRead(ldrPin);
  if(val &gt; 200)
  {
    digitalWrite(greenLed,HIGH);
    aligned=true;
  }
  else
  {
    digitalWrite(greenLed,LOW);
    aligned=false;
  }
  // Broken beam?
  if(lastAligned!=aligned &amp;&amp; aligned==false)
  {
    // Alignment has changed or beam broken
    beamBroken=true;
  }
  else
  {
    beamBroken=false;
  }

  if(beamBroken)
  {
    digitalWrite(laserPin,LOW);
    // We probably need to put a delay here, to allow
    // the laser to turn off before the flash triggers
    digitalWrite(redLed,HIGH);
    digitalWrite(flash,HIGH);
    delay(10);
    digitalWrite(flash,LOW);
    delay(1000);
    digitalWrite(laserPin,HIGH);
    digitalWrite(redLed,LOW);
    delay(200); // Wait some time to allow the LDR
                // to stabilize after laser off/on
                // to avoid false positives.
  }
  digitalWrite(laserPin,HIGH);
  lastAligned=aligned;
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/02/flash-trigger-code-v0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash trigger update</title>
		<link>http://projects.nosomos.org/2009/01/flash-trigger-update/</link>
		<comments>http://projects.nosomos.org/2009/01/flash-trigger-update/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 18:37:06 +0000</pubDate>
		<dc:creator>Quercus</dc:creator>
				<category><![CDATA[Flash trigger]]></category>

		<guid isPermaLink="false">http://nosomos.org/projects_wp/?p=19</guid>
		<description><![CDATA[Hi there, I&#8217;ve uploaded the code of the flash trigger project and the schematic (made with gEDA, by the way), in case you feel like making it for yourself (don&#8217;t forget commenting back if you do so).
Hope it&#8217;s useful.
Next I&#8217;ll try to improve the connections to the laser and to the flash, as they are [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there, I&#8217;ve uploaded the code of the <a href="http://projects.nosomos.org/category/flash-trigger/">flash trigger project</a> and the schematic (made with <a href="http://geda.seul.org/index.html" target="_blank">gEDA</a>, by the way), in case you feel like making it for yourself (don&#8217;t forget commenting back if you do so).</p>
<p>Hope it&#8217;s useful.</p>
<p>Next I&#8217;ll try to improve the connections to the laser and to the flash, as they are too much in prototype status, and the whole system needs to be robust if I pretend to use it in real life situations&#8230; And I do <img src='http://projects.nosomos.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://projects.nosomos.org/2009/01/flash-trigger-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
