<?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>exploration &#187; arduino</title>
	<atom:link href="http://robertcarlsen.net/tag/arduino/feed" rel="self" type="application/rss+xml" />
	<link>http://robertcarlsen.net</link>
	<description>accounts of success and misadventure</description>
	<lastBuildDate>Tue, 13 Jul 2010 14:37:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Arduino in Eclipse</title>
		<link>http://robertcarlsen.net/2009/10/31/arduino-in-eclipse-989</link>
		<comments>http://robertcarlsen.net/2009/10/31/arduino-in-eclipse-989#comments</comments>
		<pubDate>Sun, 01 Nov 2009 02:06:19 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/?p=989</guid>
		<description><![CDATA[This tutorial describes how to set up Eclipse for Arduino (AVR) C/C++ development. Eclipse is a full-featured Integrated Development Environment with modern editor features such as syntax highlighting, code completion and error checking. I became interested in using Eclipse for Arduino development as I&#8217;m often simultaneously developing firmware for the chip and visualization software in [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial describes how to set up Eclipse for Arduino (AVR) C/C++ development. <a class="external text" title="http://www.eclipse.org/downloads/" rel="nofollow" href="http://www.eclipse.org/downloads/" onclick="pageTracker._trackPageview('/outgoing/www.eclipse.org/downloads/?referer=');">Eclipse</a> is a full-featured Integrated Development Environment with modern editor features such as syntax highlighting, code completion and error checking. I became interested in using Eclipse for Arduino development as I&#8217;m often simultaneously developing firmware for the chip and visualization software in a Java / Processing applet. Since I&#8217;m already using Eclipse for Java / <a title="Processing in Eclipse" href="http://itpedia.nyu.edu/wiki/Processing_in_Eclipse" onclick="pageTracker._trackPageview('/outgoing/itpedia.nyu.edu/wiki/Processing_in_Eclipse?referer=');"> Processing</a>, it&#8217;s nice to be able to work in the same environment for both.</p>
<p>The <a class="external text" title="http://www.arduino.cc/" rel="nofollow" href="http://www.arduino.cc/" onclick="pageTracker._trackPageview('/outgoing/www.arduino.cc/?referer=');">Arduino</a> site has a decent <a class="external text" title="http://www.arduino.cc/playground/Code/Eclipse" rel="nofollow" href="http://www.arduino.cc/playground/Code/Eclipse" onclick="pageTracker._trackPageview('/outgoing/www.arduino.cc/playground/Code/Eclipse?referer=');">walkthrough</a>, but I found some of the steps to be confusing or outdated. Hopefully, this will get you up and running quickly.<span id="more-989"></span></p>
<table id="toc" class="toc" border="0" summary="Contents">
<tbody>
<tr>
<td>
<div id="toctitle">
<h2>Contents</h2>
</div>
<ul style="width: 100%;">
<li class="toclevel-1"><a href="#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a></li>
<li class="toclevel-1"><a href="#Setup_Eclipse"><span class="tocnumber">2</span> <span class="toctext">Setup Eclipse</span></a></li>
<li class="toclevel-1"><a href="#Create_an_Arduino_project"><span class="tocnumber">3</span> <span class="toctext">Create an Arduino project</span></a></li>
<li class="toclevel-1"><a href="#Add_a_new_main.c_source_file"><span class="tocnumber">4</span> <span class="toctext">Add a new main.c source file</span></a></li>
<li class="toclevel-1"><a href="#Building"><span class="tocnumber">5</span> <span class="toctext">Building</span></a></li>
<li class="toclevel-1"><a href="#New_projects"><span class="tocnumber">6</span> <span class="toctext">New projects</span></a></li>
<li class="toclevel-1"><a href="#Follow_up"><span class="tocnumber">7</span> <span class="toctext">Follow up</span></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p><a name="Overview"></a></p>
<h3><span class="mw-headline">Overview</span></h3>
<p>Most of this setup will have to happen once, then starting new projects is typically as easy as duplicating a simple, skeleton project. Getting the paths and configuration options correct for this initial project was the most confusing for me, but I haven&#8217;t needed to tinker with them again.</p>
<p>To begin, download <a class="external text" title="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-macosx-cocoa.tar.gz" rel="nofollow" href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-macosx-cocoa.tar.gz" onclick="pageTracker._trackPageview('/outgoing/www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-cpp-galileo-SR1-macosx-cocoa.tar.gz&amp;referer=');">Eclipse for C/C++ Developers</a>, or install the C/C++ plugin for your existing Eclipse version (these instructions assume Eclipse 3.5 Galileo). To install an Eclipse plugin:</p>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/install-new.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-999" style="clear: both;" title="install new" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/install-new-150x150.png" alt="install new" width="150" height="150" /></a>Open Eclipse. Navigate to Help &gt; Install New Software&#8230;</li>
</ul>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/Select-CDT.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-1001" style="clear: both;" title="Select CDT" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/Select-CDT-150x150.png" alt="Select CDT" width="150" height="150" /></a>Select CDT from the drop down menu. If CDT is not present, then click the add button and paste the link to the plugin update site in the Location field: <a class="external free" title="http://download.eclipse.org/tools/cdt/releases/galileo" rel="nofollow" href="http://download.eclipse.org/tools/cdt/releases/galileo" onclick="pageTracker._trackPageview('/outgoing/download.eclipse.org/tools/cdt/releases/galileo?referer=');">http://download.eclipse.org/tools/cdt/releases/galileo</a></li>
<li>Select Eclipse C/C++ Development Tools, then click &#8220;Next &gt;&#8221; and &#8220;Finish&#8221; on the following screen. This may prompt you to restart Eclipse, however select No so we can install the next plugin.</li>
</ul>
<ul>
<li>Return to the Install New Software dialog. Paste in the location for the <a class="external text" title="http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download" rel="nofollow" href="http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download" onclick="pageTracker._trackPageview('/outgoing/avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download?referer=');">AVR Plugin</a> and select it and click Next to install. You may have to agree to license terms. <a class="external free" title="http://avr-eclipse.sourceforge.net/updatesite/" rel="nofollow" href="http://avr-eclipse.sourceforge.net/updatesite/" onclick="pageTracker._trackPageview('/outgoing/avr-eclipse.sourceforge.net/updatesite/?referer=');">http://avr-eclipse.sourceforge.net/updatesite/</a></li>
</ul>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVR-plugin.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-994" style="clear: both;" title="AVR plugin" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVR-plugin-150x150.png" alt="AVR plugin" width="150" height="150" /></a>AVR tools. You should install tools appropriate for your platform:
<ul>
<li>Mac OS X: <a class="external text" title="http://www.obdev.at/products/crosspack/index.html" rel="nofollow" href="http://www.obdev.at/products/crosspack/index.html" onclick="pageTracker._trackPageview('/outgoing/www.obdev.at/products/crosspack/index.html?referer=');">CrossPack</a> (Note: I&#8217;m targeting this tutorial for an OS X system)</li>
<li>Linux: apt-get install avrdude binutils-avr gcc-avr avr-libc gdb-avr</li>
<li>Windows: <a class="external text" title="http://winavr.sourceforge.net/" rel="nofollow" href="http://winavr.sourceforge.net/" onclick="pageTracker._trackPageview('/outgoing/winavr.sourceforge.net/?referer=');">WinAVR</a></li>
</ul>
</li>
</ul>
<p><a name="Setup_Eclipse"></a></p>
<h3><span class="mw-headline">Setup Eclipse</span></h3>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVR-Paths.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-993" style="clear: both;" title="AVR Paths" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVR-Paths-150x150.png" alt="AVR Paths" width="150" height="150" /></a></p>
<p>After the plugins have been installed they need to be configured. Specifically, the paths to the AVR Tools need to be verified.</p>
<ul>
<li>Open the Eclipse Preferences: Eclipse &gt; Preferences. Twirl down the AVR category and select &#8220;Paths&#8221;. Verify that the paths have located the correct AVR toolkit (CrossPack-AVE on OS X). You can edit these fields as necessary.</li>
</ul>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVRDude.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-995" style="clear: both;" title="AVRDude" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/AVRDude-150x150.png" alt="AVRDude" width="150" height="150" /></a>Select the AVRDude category. I&#8217;ve found that I need to add a Programmer configuration for each Arduino (or USB to Serial adapter) that I use. Please let me know if you can get a better solution working with wildcards.
<ul>
<li>Give this configuration a descriptive name. I&#8217;m using &#8220;Arduino Diecimila&#8221;.</li>
<li>Select &#8220;Arduino&#8221; as the Programmer Hardware</li>
<li>Enter the correct port for your Arduino. You can display this by plugging the Arduino into the computer, opening the Terminal then typing: /dev/tty.usbserial then hitting the Tab key. The remainder of the port name should appear.</li>
<li>Set the baud rate to 19200</li>
<li>Click OK. Then close the preferences.</li>
</ul>
</li>
</ul>
<p><a name="Create_an_Arduino_project"></a></p>
<h3><span class="mw-headline">Create an Arduino project</span></h3>
<p>For the first project you&#8217;ll need to manually set up the configuration. I&#8217;d *highly* recommend making a basic blink sketch, then duplicate it for each new project. This is what the tutorial will set up. Alternatively, you can try importing this basic project, but may have to set up the paths for your system anyway. <a class="external text" title="http://robertcarlsen.net/media/itp/hello_blink.tar.gz" rel="nofollow" href="http://robertcarlsen.net/media/itp/hello_blink.tar.gz">Eclipse Blink Sketch</a></p>
<ul>
<li>Go to File -&gt; New -&gt; C Project</li>
<li>Select Empty Project under AVR Cross Target Application and name the project &#8220;Hello_Blink&#8221;.</li>
<li>Click Finish.</li>
<li>Select the &#8220;Hello_Blink&#8221; project in the Project Explorer panel, then navigate to Project &gt; Properties menu.</li>
<li>Twirl down the AVR category and select AVRDude.
<ul>
<li>Select your Arduino from the Programmer configuration menu</li>
</ul>
</li>
<li>Select Target Hardware at left.
<ul>
<li>Ensure that your Arduino is plugged into your computer via USB (and is powered on).</li>
<li>Click &#8220;Load from MCU&#8221;. This should query the Arduino for it&#8217;s type and detect it correctly.
<ul>
<li>If this doesn&#8217;t work, typically the Diecimila is an ATmega168 while the Duemilanove is an ATmega328</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>Each Ardiuno project needs to include the Ardunio core library. This file is compiled automatically by the Arduino IDE. While you could compile it yourself in Eclipse, the easiest way to get it is to build a simple sketch in the Arduino IDE, then copy the &#8220;core.a&#8221; file into your Eclipse project.</p>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/core.a-file.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-1002" title="core.a file" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/core.a-file-150x150.png" alt="core.a file" width="150" height="150" /></a>Start the Arduino IDE</li>
<li>Open the Blink sketch (File &gt; Examples &gt; Digital &gt; Blink)</li>
<li>Click the &#8220;Verify&#8221; button to compile the sketch</li>
<li>Select Sketch &gt; Show Sketch Folder</li>
<li>Drag core.a into your Eclipse Hello_Blink project to copy it in.</li>
<li>Right-click on core.a, select Rename and change it to &#8220;libcore.a&#8221;</li>
</ul>
<p>Now we set up the correct building settings:</p>
<ul>
<li>Twirl down C/C++ Build and select Settings</li>
<li>Select &#8220;Additional Tools in Toolchain&#8221;</li>
<li>Check the following:
<ul>
<li>Generate HEX for Flash Memory</li>
<li>Print Size</li>
<li>AVRDude</li>
</ul>
</li>
<li>Uncheck Generate Extended Listing</li>
</ul>
<ul>
<li>Select AVR Compiler
<ul>
<li>Change the command from avr-gcc to avr-g++</li>
</ul>
</li>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/include-path.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-998" title="include path" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/include-path-150x150.png" alt="include path" width="150" height="150" /></a>Select AVR Compiler &gt; Directories
<ul>
<li>Add an Include Path to the header files within the Arduino.app bundle (look at the screenshot)</li>
<li>You can right-click on Arduino.app and select Show Package Contents, then navigate to the Contents/Resources/Java/hardware/cores/arduino folder</li>
</ul>
</li>
</ul>
<ul>
<li>Select AVR Compiler &gt; Debugging
<ul>
<li>Set &#8220;Generate Debugging info&#8221; to &#8220;No debugging info&#8221;</li>
</ul>
</li>
<li>Select AVR Compiler
<ul>
<li>Set the Optimization level to Size Optimizations</li>
</ul>
</li>
</ul>
<ul>
<li>Select AVR Assembler &gt; Debugging
<ul>
<li>Set &#8220;Generate Debugging info&#8221; to &#8220;No debugging info&#8221;</li>
</ul>
</li>
</ul>
<ul>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/core-lib.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-996" title="core lib" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/core-lib-150x150.png" alt="core lib" width="150" height="150" /></a>Select AVR C Linker &gt; Libraries
<ul>
<li>Add a library named &#8220;core&#8221;</li>
<li>Add a library path. If libcore.a is in the Hello_Blink project folder, the path will be &#8220;${workspace_loc:/Hello_Blink}&#8221;</li>
</ul>
</li>
</ul>
<p><a name="Add_a_new_main.c_source_file"></a></p>
<h3><span class="mw-headline">Add a new main.c source file</span></h3>
<p>This file will contain your typical Arduino sketch code. There are additional bits of code that are typically added automatically by the Arduino IDE which need to be explicitly written in Eclipse. Feel free to copy the below code.</p>
<ul>
<li>Go to File &gt; New&#8230; &gt; C Source File. Name this file main.c</li>
<li>Paste in the following for a basic blink sketch:</li>
</ul>
<pre class="brush: cpp;">
#include &quot;WProgram.h&quot;

// prototypes
void blink(int n, int d);

// variables
int ledPin = 13; // LED connected to digital pin 13

void setup(){
Serial.begin(9600);	// opens serial port, sets data rate to 9600 bps
pinMode(ledPin, OUTPUT);      // sets the digital pin as output
Serial.println(&quot;------------------&quot;);
Serial.println(&quot;   hello world&quot;);
Serial.println(&quot;------------------&quot;);
}

void loop(){

  blink(3, 50); // blink led (n times, ms interval)
  delay(1000); // wait 1 sec
}

void blink(int n, int d){
  for (int i=0; i&lt;n; i++) {
    digitalWrite(ledPin, HIGH);
    delay(d/2);
    digitalWrite(ledPin, LOW);
    delay(d/2);
  }
}

int main(void)
{
init();

setup();

for (;;)
loop();

return 0;
}
</pre>
<p><a name="Building"></a></p>
<h3><span class="mw-headline">Building</span></h3>
<p>When you&#8217;re ready to build and upload to the Arduino, click the Hammer icon. This should compile your program and then run avrdude, which uploads to the Arduino.</p>
<p><a name="New_projects"></a></p>
<h3><span class="mw-headline">New projects</span></h3>
<p>Duplicating a project in Eclipse is as simple as selecting the source project in the Project Explorer panel, copying it (Edit &gt; Copy) then paste. Eclipse will prompt you for a new name , then will create a new, duplicate project in the workspace.</p>
<p>If you keep the blink sketch intact, you should be able to duplicate it each time and avoid the above setup.</p>
<p><a name="Follow_up"></a></p>
<h3><span class="mw-headline">Follow up</span></h3>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/perspectives.png" rel="lightbox[989]"><img class="alignright size-thumbnail wp-image-1000" title="perspectives" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/perspectives-150x100.png" alt="perspectives" width="150" height="100" /></a></p>
<p>You should be all set to work on Arduino projects in Eclipse. Note that Eclipse uses various &#8220;perspectives&#8221; for different modes and programming languages. Typically, you&#8217;ll be working in the C/C++ perspective while working on Arduino code. If you&#8217;d like to switch back to the Java perspective for working with Processing, select it from the perspectives at the upper right of the main window, or Navigate to Window &gt; Open Perspective &gt; Other&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/10/31/arduino-in-eclipse-989/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>ITP 1-in-1: bike blinky!</title>
		<link>http://robertcarlsen.net/2009/10/04/itp-1-in-1-bike-blinky-975</link>
		<comments>http://robertcarlsen.net/2009/10/04/itp-1-in-1-bike-blinky-975#comments</comments>
		<pubDate>Sun, 04 Oct 2009 16:07:10 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[itp]]></category>
		<category><![CDATA[1in1]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[blinky]]></category>
		<category><![CDATA[itp30]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[tail light]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/?p=975</guid>
		<description><![CDATA[For the 1-in-1 Project as part of ITP&#8217;s 30th anniversary celebration I over-engineering the simple bicycle blinky light. Why go for a simple, off-the-shelf blinky light when we can build a much more complicated one ourselves?!
I’m creating an animated display, which changes to solid red while braking.
Update: (5:26) It’s been a long night, but it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/blinky_on_bike.png" rel="lightbox[975]"><img class="alignright size-thumbnail wp-image-976" title="blinky_on_bike" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/blinky_on_bike-150x150.png" alt="blinky_on_bike" width="150" height="150" /></a>For the 1-in-1 Project as part of ITP&#8217;s 30th anniversary celebration I over-engineering the simple bicycle blinky light. Why go for a simple, off-the-shelf blinky light when we can build a much more complicated one ourselves?!</p>
<p>I’m creating an animated display, which changes to solid red while braking.</p>
<p>Update: (5:26) It’s been a long night, but it all came together. I wish I could have finished at the floor, but sometimes you need to go to your cave. The bike blinky light is all I could have asked for…it’s obnoxious, it’s animated, it has a handlebar control to switch to a flashing warning mode.<span id="more-975"></span></p>
<p>Context:<br />
<a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/breadboard_matrix.png" rel="lightbox[975]"><img class="alignright size-thumbnail wp-image-977" title="breadboard_matrix" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/breadboard_matrix-150x150.png" alt="breadboard_matrix" width="150" height="150" /></a>I got a package of several 5×8 LED matrix displays early in my first semester on clearance from an online electronics wholesaler. I’ve had aspirations to work them into a project ever since but never got around to it.</p>
<p>Several months ago my bicycle taillight stopped working. I took it apart and found a bad solder joint at the LED, so I fixed it and it was happy for several more weeks before acting up again. Now, I’m betting that it’s just a dead battery, but those coin cells can be expensive!</p>
<p>A (more) reasonable person would just get new batteries…performing an effective mental calculation between cost and safety. I say that’s a fool’s errand! Just build a new one, with a rechargeable lithium battery…and while you’re at it upgrade from one LED to 40!</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/matrix_blinky.png" rel="lightbox[975]"><img class="alignright size-thumbnail wp-image-978" title="matrix_blinky" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/10/matrix_blinky-150x150.png" alt="matrix_blinky" width="150" height="150" /></a>I suppose this is from the “because we can” category. Next steps are to build a weatherproof housing, quick-release mounting, serial control for updating the animation and maybe generative graphics or bluetooth…real-time Twitter feed anyone?</p>
<p>Check out the other <a href="http://www.itp30show.org/" onclick="pageTracker._trackPageview('/outgoing/www.itp30show.org/?referer=');">ITP30 1-in-1</a> projects.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ukhcfbjP7J4&#038;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/ukhcfbjP7J4&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/10/04/itp-1-in-1-bike-blinky-975/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rest of You: Bike Forces</title>
		<link>http://robertcarlsen.net/2009/09/28/rest-of-you-bike-forces-968</link>
		<comments>http://robertcarlsen.net/2009/09/28/rest-of-you-bike-forces-968#comments</comments>
		<pubDate>Mon, 28 Sep 2009 18:47:39 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Rest of You]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/?p=968</guid>
		<description><![CDATA[(note: I&#8217;m awaiting the HR sensor, this is mostly outward forces)
I&#8217;m logging the acceleration forces at the handlebars of my bicycle while riding through New York City. The body has roughly three contact points with a bicycle, the hands at the handlebars, the &#8220;seat&#8221; at the saddle, and the feet at the pedals. The downward [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/IMG_0726.jpg" rel="lightbox[968]"><img class="alignright size-thumbnail wp-image-971" title="IMG_0726" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/IMG_0726-150x150.jpg" alt="IMG_0726" width="150" height="150" /></a>(note: I&#8217;m awaiting the HR sensor, this is mostly outward forces)</p>
<p>I&#8217;m logging the acceleration forces at the handlebars of my bicycle while riding through New York City. The body has roughly three contact points with a bicycle, the hands at the handlebars, the &#8220;seat&#8221; at the saddle, and the feet at the pedals. The downward force of the rider&#8217;s weight and pedaling force and the upward forces of the bicycle rolling over uneven ground are distributed over these three points. I was interested to see just what kind of forces are &#8220;pushing back&#8221; that I may not be aware of, myself lost in the act of simply keeping the bicycle upright and safely navigating through traffic.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/handlebar_vibration.png" rel="lightbox[968]"><img class="alignright size-thumbnail wp-image-966" title="handlebar_vibration" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/handlebar_vibration-150x150.png" alt="handlebar_vibration" width="150" height="150" /></a>To contextualize the raw accelerometer data I also tracking GPS location and eventually geocoding the raw data in software. The bicycle sensors are being transmitted via Bluetooth to a mobile phone and the data is logged with a custom written (but now <a href="http://github.com/rcarlsen/pyLoggerBT" onclick="pageTracker._trackPageview('/outgoing/github.com/rcarlsen/pyLoggerBT?referer=');">open-source</a>!) python script. Below is the first draft of the visualization.<span id="more-968"></span></p>
<p>I intend to add more sensors to record internal forces to see if there is a physiological response (HR, GSR, breathing, pressure on contact points) to external factors such as speed, traffic / road / weather conditions, time-of-day etc.</p>
<p><a href="http://www.youtube.com/watch?v=2JRuBMMNNgY" onclick="pageTracker._trackPageview('/outgoing/www.youtube.com/watch?v=2JRuBMMNNgY&amp;referer=');">Video demonstration</a> of the initial visualization.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/2JRuBMMNNgY&#038;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/2JRuBMMNNgY&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/09/28/rest-of-you-bike-forces-968/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>rattle&#8230;</title>
		<link>http://robertcarlsen.net/2009/09/26/rattle-965</link>
		<comments>http://robertcarlsen.net/2009/09/26/rattle-965#comments</comments>
		<pubDate>Sat, 26 Sep 2009 06:09:49 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Rest of You]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[bike]]></category>
		<category><![CDATA[datalogging]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[sensor]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/?p=965</guid>
		<description><![CDATA[This is just a teaser for a project I&#8217;ve recently begun, but I had an &#8220;a-ha&#8221; moment when the visualization program finally came together just now and wanted to share&#8230;
This is geocoded accelerometer data from the handlebars of my bicycle on my commute from Greenpoint to ITP in the East Village. The sample at middle of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/handlebar_vibration.png" rel="lightbox[965]"><img class="alignright size-thumbnail wp-image-966" title="handlebar_vibration" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/09/handlebar_vibration-150x150.png" alt="handlebar_vibration" width="150" height="150" /></a>This is just a teaser for a project I&#8217;ve recently begun, but I had an &#8220;a-ha&#8221; moment when the visualization program finally came together just now and wanted to share&#8230;</p>
<p>This is geocoded accelerometer data from the handlebars of my bicycle on my commute from Greenpoint to ITP in the East Village. The sample at middle of the graph, and the red circle on the path coincide. I realized just now that this is a seam in the Williamsburg Bridge. Neat.</p>
<p>I&#8217;ll post proper documentation of the project as it becomes more robust&#8230;but I&#8217;m excited. Waiting for the heart rate monitor interface to arrive&#8230;looking to couple internal status with external events&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/09/26/rattle-965/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking Physically: BlindSight presentation</title>
		<link>http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697</link>
		<comments>http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697#comments</comments>
		<pubDate>Mon, 04 May 2009 17:51:08 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Thinking Physically]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[andrew styer]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[atmega]]></category>
		<category><![CDATA[blindsight]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[wearable]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=697</guid>
		<description><![CDATA[This is the final project presentation of BlindSight for the ITP Thinking Physically class in Spring 2009. BlindSight is is a collaboration between Robert Carlsen and Andrew Styer.
BlindSight aims to explore synesthesia by associating certain body positions with visual hallucinations induced by photic stimulation. In other words, flashing lights at various frequencies seems to cause [...]]]></description>
			<content:encoded><![CDATA[<p>This is the final project presentation of BlindSight for the ITP Thinking Physically class in Spring 2009. BlindSight is is a collaboration between Robert Carlsen and Andrew Styer.</p>
<p>BlindSight aims to explore synesthesia by associating certain body positions with visual hallucinations induced by photic stimulation. In other words, flashing lights at various frequencies seems to cause visual patterns to appear for the viewer. Simple wearable sensors adjust the frequency of the flashes and thus provide various patterns.<span id="more-697"></span></p>
<p>[<a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1.pdf">download PDF</a>]</p>

<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1001' title='blindsight-presentation-v1001'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1001-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1001" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1002' title='blindsight-presentation-v1002'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1002-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1002" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1003' title='blindsight-presentation-v1003'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1003-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1003" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1004' title='blindsight-presentation-v1004'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1004-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1004" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1005' title='blindsight-presentation-v1005'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1005-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1005" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1006' title='blindsight-presentation-v1006'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1006-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1006" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1007' title='blindsight-presentation-v1007'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1007-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1007" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1008' title='blindsight-presentation-v1008'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1008-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1008" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1009' title='blindsight-presentation-v1009'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1009-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1009" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1010' title='blindsight-presentation-v1010'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1010-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1010" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1011' title='blindsight-presentation-v1011'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1011-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1011" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1012' title='blindsight-presentation-v1012'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1012-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1012" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1013' title='blindsight-presentation-v1013'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1013-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1013" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1014' title='blindsight-presentation-v1014'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1014-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1014" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1015' title='blindsight-presentation-v1015'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1015-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1015" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1016' title='blindsight-presentation-v1016'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1016-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1016" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1017' title='blindsight-presentation-v1017'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1017-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1017" /></a>
<a href='http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/blindsight-presentation-v1018' title='blindsight-presentation-v1018'><img width="150" height="150" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/05/blindsight-presentation-v1018-150x150.jpg" class="attachment-thumbnail" alt="" title="blindsight-presentation-v1018" /></a>

]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/05/04/thinking-physically-blindsight-presentation-697/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vision is highly overrated&#8230;</title>
		<link>http://robertcarlsen.net/2009/04/15/vision-is-highly-overrated-637</link>
		<comments>http://robertcarlsen.net/2009/04/15/vision-is-highly-overrated-637#comments</comments>
		<pubDate>Wed, 15 Apr 2009 06:41:27 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Thinking Physically]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[hallucination]]></category>
		<category><![CDATA[synesthesia]]></category>
		<category><![CDATA[think phys]]></category>
		<category><![CDATA[visual]]></category>
		<category><![CDATA[wearable]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=637</guid>
		<description><![CDATA[This project aims to explore synesthesia by associating certain body positions with visual hallucinations induced by photic stimulation. In other words, flashing lights at various frequencies seems to cause visual patterns to appear for the viewer. Simple wearable sensors will adjust the frequency of the flashes and thus provide various patterns. Although the patterns may differ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/glasses_robert.jpg" rel="lightbox[637]"><img class="alignright size-thumbnail wp-image-638" title="glasses_robert" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/glasses_robert-150x150.jpg" alt="glasses_robert" width="150" height="150" /></a>This project aims to explore synesthesia by associating certain body positions with visual hallucinations induced by photic stimulation. In other words, flashing lights at various frequencies seems to cause visual patterns to appear for the viewer. Simple wearable sensors will adjust the frequency of the flashes and thus provide various patterns. Although the patterns may differ for each viewer, they seem to be the same for the viewer at a given frequency.<span id="more-637"></span></p>
<p>Much of this project stems from two separate influences. First, William Gibson&#8217;s &#8220;Neuromancer&#8221; where he depicts the protagonist using electrodes/glasses to jack into cyberspace, which is depicted as a three-dimensional space largely visualized as colored geometric shapes. Secondly, my general jealousy of individuals whom describe themselves as synesthetes, those who experience certain senses crossing over, ie. seeing certain letters as colored or hearing certain visual motion.</p>
<p>An article in the journal Cortex (#44, May 2008,  Dominic H. ffytche), describes a study which employed flashing goggles to induce visual hallucinations for the purpose of analyzing brain activity with MRI. The study indicates that flashing frequencies between 5-30Hz at a certain intensity caused participants to describe perceiving hallucinations (Purkinje patterns) and produced a measurable change in the brain activity.</p>
<p>I&#8217;d like to use this visual stimulation to represent a small portion of our sense of proprioception. The ideal scenario would be to enable a user to generate an association between certain Purkinje patterns and the orientation of the body relative to itself. I&#8217;m working closely with Andrew Styer on the input devices and we&#8217;ve been discussing the best sensing for our end. Trying to visualize all of proprioception in this manner would be arrogant at best, so for this prototype we are looking to limit our focus to the upper body, possibly the arms alone.</p>
<p>Initial user testing of the glasses have provided strong reactions and most participants report perceiving patterns which change in response to frequency shift. Participants generally indicate that the experience is pleasant, however the prototype glasses may provide too much illumination intensity, overpowering the effect.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/glasses.jpg" rel="lightbox[637]"><img class="alignright size-thumbnail wp-image-640" title="glasses" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/glasses-150x150.jpg" alt="glasses" width="150" height="150" /></a></p>
<p>Next steps are to experiment with various sensors / inputs and to determine the levels of discernible patterns within the available frequency range. Another direction for exploration is the event as frequencies change. Several participants have expressed strong reactions when the patterns initially change. Perhaps alternating between frequencies could provide another dimension to the expressiveness of the glasses.</p>
<address>I was first introduced to this visual effect by Mitch Altman&#8217;s Sound and Light Machine (aka. the Brainwave Glasses) as described in Make zine. My first electronics kit was hacking Adafruit&#8217;s MiniPOV kit to make the glasses.</address>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/04/15/vision-is-highly-overrated-637/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toy Design: Talking Blocks sketches</title>
		<link>http://robertcarlsen.net/2009/04/07/toy-design-talking-blocks-sketches-620</link>
		<comments>http://robertcarlsen.net/2009/04/07/toy-design-talking-blocks-sketches-620#comments</comments>
		<pubDate>Tue, 07 Apr 2009 18:29:11 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Toy Design]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[atmega]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[cad]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[qcad]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=620</guid>
		<description><![CDATA[Alex and I have been developing the plans for the blocks in preparation for building the prototypes in the next week. For this, I built the community edition of QCad (open source FTW!) and have been teaching myself how to draw with it. There was a bit of a learning curve to the interface and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/sketch_v01_dark.png" rel="lightbox[620]"><img class="alignright size-thumbnail wp-image-621" title="sketch_v01_dark" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/sketch_v01_dark-150x150.png" alt="sketch_v01_dark" width="150" height="150" /></a>Alex and I have been developing the plans for the blocks in preparation for building the prototypes in the next week. For this, I built the community edition of <a href="http://www.ribbonsoft.com/qcad_downloads.html" onclick="pageTracker._trackPageview('/outgoing/www.ribbonsoft.com/qcad_downloads.html?referer=');">QCad</a> (open source FTW!) and have been teaching myself how to draw with it. There was a bit of a learning curve to the interface and the modal model of the application tools, but I&#8217;m now relatively comfortable with the basics.<span id="more-620"></span></p>
<p>Alex made several physical models of the blocks in styrofoam, which determined that 67mm is the most desirable size for the cubes. After casting a test, hollow cube of silicone, we decided that given the pliability of the material we&#8217;d need at least 15mm thick walls. Using these measurements I started sketching out the components as the might be assembled inside the form.</p>
<p>Currently, we plan to have the blocks respond the their orientation as children hold them. The blocks will change colors and vary the color pulsing rate as they are tumbled. Shaking a block will cause it to &#8220;call out&#8221; to other nearby blocks using IR communication. We&#8217;re still determining the effective function of the talking, but we&#8217;re thinking of having the colors or pulse rate transfer to the listening blocks. Each block that receives a message will relay it in turn, hopefully contributing to a &#8220;bucket brigade&#8221; or domino effect.</p>
<p>We&#8217;re looking to use the ATmega168 chip for the prototypes as they are cheap and we&#8217;re comfortable using them – having come from an Arduino background. Of course, with the timing necessary for the IR encoding and decoding, plus the color variations needed for the RGB LED, we&#8217;ve had to dive into the C code and use the mega168&#8217;s interrupts directly.</p>
<p>Using these sketches I&#8217;ll lay out a circuit that we can prototype on a perf board or even etch some sample boards. We&#8217;re still working out the power supply&#8230;but I think that getting the user experience right for this first version trumps the practicality goals at this point.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/arduino_ir_communication.jpg" rel="lightbox[620]"><img class="alignleft size-medium wp-image-622" title="arduino_ir_communication" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/04/arduino_ir_communication-300x237.jpg" alt="arduino_ir_communication" width="300" height="237" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/04/07/toy-design-talking-blocks-sketches-620/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinking Physically: ThinkBig</title>
		<link>http://robertcarlsen.net/2009/03/13/thinking-physically-thinkbig-564</link>
		<comments>http://robertcarlsen.net/2009/03/13/thinking-physically-thinkbig-564#comments</comments>
		<pubDate>Sat, 14 Mar 2009 00:51:00 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Thinking Physically]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[think phys]]></category>
		<category><![CDATA[wearable]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=564</guid>
		<description><![CDATA[
Corey Menscher and I worked together on ThinkBig for the Whole Body Interface exercise in Thinking Physically. Corey had the basic idea of making soft switches which would be foot activated. Initially he was going to make three which you&#8217;d have to skip between.
We had a discussion about other implementations of the idea, including a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-566" title="thinkbig-floor" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/thinkbig-floor-150x150.jpg" alt="thinkbig-floor" width="150" height="150" /></p>
<p>Corey Menscher and I worked together on ThinkBig for the Whole Body Interface exercise in Thinking Physically. Corey had the basic idea of making soft switches which would be foot activated. Initially he was going to make three which you&#8217;d have to skip between.<span id="more-564"></span></p>
<p>We had a discussion about other implementations of the idea, including a hopscotch-type arrangement but ended up riffing off the large keyboard depicted at FAO Schwartz in the movie Big. To this end we made 8 switches which would be mapped to notes on a musical scale. After more discussion we decided to allow the switches to be arbitrarily positioned, including on walls, and the actions would trigger sound samples rather than notes.</p>
<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/thinkbig-guts.jpg" rel="lightbox[564]"><img class="alignleft size-thumbnail wp-image-567" style="margin-right: 2px;" title="thinkbig-guts" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/03/thinkbig-guts-150x150.jpg" alt="thinkbig-guts" width="150" height="150" /></a>Building the soft switches was easy enough – two layers of conductive fabric with a layer of dense foam between them. We wanted to put them on flexible surfaces, but for the prototype affixed each to a small wooden block.</p>
<p>The class seemed to enjoy using them, especially when they were on the wall rather than the floor. The scale of the interface encouraged multiple simultaneous users to play, and the distance between each switch introduced a natural limit to how quickly you could move from one switch to the next. As with the Brauswitch the output was simple sound samples, but it would be interesting to experiment with other actions.</p>
<p>Video of the class trying it out below. Enjoy.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Dq-EwkHjtMU&#038;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/Dq-EwkHjtMU&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/03/13/thinking-physically-thinkbig-564/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Arduino in Xcode</title>
		<link>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532</link>
		<comments>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532#comments</comments>
		<pubDate>Sat, 28 Feb 2009 22:31:40 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[make]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=532</guid>
		<description><![CDATA[While the Arduino IDE (Integrated Development Environment) is relatively simple way to program the Arduino hardware, I found myself getting frustrated by it&#8217;s limited features after spending time using Xcode and Eclipse. There are some simple tutorials available online which demonstrate how to set up Xcode for programming the Arduino, however these didn&#8217;t &#8220;just work&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>While the Arduino IDE (Integrated Development Environment) is relatively simple way to program the Arduino hardware, I found myself getting frustrated by it&#8217;s limited features after spending time using Xcode and Eclipse. There are some simple tutorials available online which demonstrate how to set up Xcode for programming the Arduino, however these didn&#8217;t &#8220;just work&#8221; for me, and were targeting arduino-0.10.</p>
<p>I made a few (simple in hindsight) changes to the project which has worked well for me so far.<span id="more-532"></span></p>
<h3>Bill of Materials</h3>
<ul>
<li><a href="http://developer.apple.com/mac/" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/mac/?referer=');">Xcode</a> &#8211; provided with the Apple Developer Tools</li>
<li><a href="http://arduino.cc/en/Main/Software" onclick="pageTracker._trackPageview('/outgoing/arduino.cc/en/Main/Software?referer=');">Arduino IDE</a> &#8211; needed for the core libraries for programming the Arduino</li>
<li><a href="http://www.obdev.at/products/avrmacpack/download.html" onclick="pageTracker._trackPageview('/outgoing/www.obdev.at/products/avrmacpack/download.html?referer=');">AVR programming tools</a>. Easiest solution is to install the AVRMacPack.
<ul>
<li>You can alternatively install avr-gcc, avr-libc, avrdude and libusb via MacPorts or Fink.</li>
</ul>
</li>
<li><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/arduinoonxcode.zip">Project Template</a> for Arduino on Xcode.
<ul>
<li>For reference: <a href="http://1175.free.fr/?browse=Arduino%20on%20Xcode" onclick="pageTracker._trackPageview('/outgoing/1175.free.fr/?browse=Arduino_20on_20Xcode&amp;referer=');">Original source</a> of the ArduinoXcode project template.</li>
</ul>
</li>
</ul>
<h3>Set-up</h3>
<ol>
<li>Install Xcode. Typically at /Developer</li>
<li>Install Arduino. Typically at /Applications/arduino-x.xx<br />
<strong>Update:</strong> Arduino 017+ on OS X is now provided as an application bundle. See below.</li>
<li>Install AVRMacPack. The tools are located at /usr/local/AVRMacPack</li>
<li>Uncompress the ArduinoOnXcode project template. Move it to /Developer/Library/Xcode/Project Templates/Other/</li>
<li>Open the Makefile in the ArduinoOnXcode folder. Edit the ARDUINO and AVRDUDE_DIR lines to reflect your system. The default values should work &#8220;as is&#8221; with this tutorial. <strong>Note:</strong> for Arduino 017+ change the ARDUINO path to:<br />
/Applications/Arduino.app/Contents/Resources/Java/hardware/cores/arduino</li>
</ol>
<h3>Use</h3>
<p>Create a new project in Xcode and select Other&gt;ArduinoOnXcode. You&#8217;ll be prompted for a save location for the new project. Select a location and name and click &#8220;Save&#8221;.</p>
<p>The code for your sketch is written in &#8220;main.cpp&#8221;. Any custom functions you write will need to be either prototyped at the top of the file where indicated, or will have to be declared before they are used in setup() or loop(). A prototype just indicates the return value and any arguments a function requires. The blink function returns nothing (void) and expects two integer arguments, which is prototyped as: void blink(int n, int d); Again, look at the example code in the template for guidance.</p>
<h3>Compiling/Uploading to Arduino</h3>
<h3><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/activetarget.png" rel="lightbox[532]"><img class="size-full wp-image-535" style="clear: both;" title="activetarget" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/activetarget.png" alt="activetarget" width="374" height="80" /></a></h3>
<p>Connect the Arduino via USB. Change the Active Target to &#8220;Upload&#8221;. The select Build&gt;Clean All Targets. This will compile the code and upload it to the Arduino. The template contains a simple blink sketch to confirm that the process worked.</p>
<h3>Serial Terminal</h3>
<p>I recall a neat trick to enable easy access to opening a serial terminal through Xcode, but can&#8217;t find it now. In the meantime you can use the Terminal.app to open a serial connection to the Arduino:</p>
<ol>
<li> Open /Applications/Utilities/Terminal.app</li>
<li>The the command prompt in the new terminal window type (without the quote marks),
<ul>
<li>&#8220;screen /dev/tty.usbserial&#8221;</li>
<li>Hit the Tab key. The rest of the serial port&#8217;s name should appear. If it doesn&#8217;t, verify that the Arduino is plugged in via serial and is powered on.</li>
<li>For example, the command for my Arduino looks like: &#8220;screen /dev/tty.usbserial-A4001Jdl&#8221;</li>
</ul>
</li>
<li>Press return to execute the screen command. The Arduino will reset and should open the serial port.</li>
<li>You can type to send characters, but there is no local echo (ie. you won&#8217;t see the typed characters)</li>
<li>To exit and close the serial port
<ul>
<li>Press Control-A then &#8216;k&#8217; to &#8220;kill&#8221; the window. This just stops the screen program and returns to the command prompt.</li>
</ul>
</li>
</ol>
<p>Of course, you could use ZTerm instead&#8230;<br />
Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/02/28/using-arduino-in-xcode-532/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Thinking Physically: brauswitch demonstration</title>
		<link>http://robertcarlsen.net/2009/02/21/thinking-physically-brauswitch-demonstration-500</link>
		<comments>http://robertcarlsen.net/2009/02/21/thinking-physically-brauswitch-demonstration-500#comments</comments>
		<pubDate>Sat, 21 Feb 2009 20:48:30 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Thinking Physically]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[itp]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[think phys]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wearable]]></category>

		<guid isPermaLink="false">http://robertcarlsen.net/blog/?p=500</guid>
		<description><![CDATA[Following up on the initial post about the brauswitch &#8211; the eyebrow activated headband switch. Here is some video with a simple application demonstrating it&#8217;s use. There are separate switches for both the left and right sides. The simple Arduino code listed below will indicate if the left, right or both sides have been activated. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/kara_brauswitch.jpg" rel="lightbox[500]"><img class="alignright size-thumbnail wp-image-501" title="kara_brauswitch" src="http://robertcarlsen.net/blog/wp-content/uploads/2009/02/kara_brauswitch-150x150.jpg" alt="kara_brauswitch" width="150" height="150" /></a>Following up on the initial post about the <a href="http://robertcarlsen.net/blog/?p=430">brauswitch</a> &#8211; the eyebrow activated headband switch. Here is some video with a simple application demonstrating it&#8217;s use. There are separate switches for both the left and right sides. The simple Arduino code listed below will indicate if the left, right or both sides have been activated. A Processing sketch reads the serial output of the device and plays a variety of sound samples.</p>
<p>There is something really nice about the amplification of a small facial movement and the larger audio/visual response of the sketch. It&#8217;s also nice to interact in a handsfree way. Oh! Fun. Code after the video.<span id="more-500"></span></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/XQSk12AwXnY&#038;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/XQSk12AwXnY&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><strong>Arduino code:</strong></p>
<pre class="brush: cpp;">

/* brauswitch
* robert carlsen | robertcarlsen.net
* 2-2008
*
* the brauswitch is a headband mounted switch activated by raising the eyebrows.
* the prototype version is made from burlap with conductive fabric on opposite sides
* of a small gap in the headband just above the eyebrows. raising the eyebrows closes the gap
* which closes the switch. the position of the headband needs to be adjusted carefully for proper
* action - however once situated well the brauswitch works very consistently.
*
* this code sends a byte via serial when the switch is closed:
* 1, 2 or 3 for left, right and both switches respectively
*/

#define LEFT_BROW 8
#define RIGHT_BROW 9
#define LED 3

void setup() {
Serial.begin(9600);

pinMode(LEFT_BROW, INPUT);
pinMode(RIGHT_BROW, INPUT);
pinMode(LED, OUTPUT);

}

void loop(){
int var1 = digitalRead(LEFT_BROW);
int var2 = digitalRead(RIGHT_BROW);

byte msg = 0;

if(var1 == HIGH){
digitalWrite(LED, HIGH);
msg += 1;
delay(10);
digitalWrite(LED, LOW);
}

if(var2 == HIGH){
digitalWrite(LED, HIGH);
msg += 2;
delay(100);
digitalWrite(LED, LOW);
}

if(msg&gt;0)
Serial.print(msg,BYTE);

delay(100);
}
</pre>
<p><strong>Processing (java) code:</strong></p>
<pre class="brush: java;">

// Project:         brauswitch
// File:             Brauswitch.java
// Created by:         rcarlsen, Feb 21, 2009

// Imports
import processing.core.*;
import ddf.minim.*;
import processing.serial.*;

public class Brauswitch extends PApplet {
Serial myPort;

// holder for the incoming data
byte[] data = new byte[1];

// color array
int[] c = {0x33000000,0x33ff0000,0x3300ff00,0x330000ff};
int cIndex = 0;

int timer;
int timeout = 1000;

Minim minim;
AudioSnippet bothSound,leftSound,rightSound;

public void setup() {
size(500,300);
smooth();
background(0);
noStroke();

//println(Serial.list());
myPort = new Serial(this,Serial.list()[0],9600);

minim = new Minim(this);
bothSound = minim.loadSnippet(&quot;beat.wav&quot;);
leftSound = minim.loadSnippet(&quot;msgstart.wav&quot;);
rightSound = minim.loadSnippet(&quot;msgend.wav&quot;);
}

public void draw() {
// draw a partially transparent rect over the previous frame
fill(0x33000000);
rect(0,0,width,height);

// read the serial data is available
if(myPort.available()&gt;0){
println(myPort.available() + &quot; bytes available&quot;);

//only expecting one byte
data = myPort.readBytes();
myPort.clear();
}

// act on the read data. it will be 0,1,2,3
if(data[0]&gt;0){
println(&quot;Data read: &quot; + data[0]);
cIndex = data[0];
// clear the data
data[0] = 0;

switch(cIndex){
case 1:
if(!leftSound.isPlaying())
leftSound.loop(0);
break;
case 2:
if(!rightSound.isPlaying())
rightSound.loop(0);
break;
case 3:
if(!bothSound.isPlaying())
bothSound.loop(0);
break;
}

// keep the timer going
timer = millis();
}

// fade out if the brauswitch is open
if(millis() - timer &gt; timeout){
cIndex = 0;
if(bothSound.isLooping())
bothSound.play(); //finish the sound and stop
if(leftSound.isPlaying())
leftSound.pause();
if(rightSound.isPlaying())
rightSound.pause();
timer = millis();
}

// draw the indicator ellipse
fill(c[cIndex]);
ellipseMode(CENTER);
ellipse(this.width/2, this.height/2,200,200);
}

public void stop()
{
// always close Minim audio classes
bothSound.close();
leftSound.close();
rightSound.close();
// always stop Minim before exiting
minim.stop();

super.stop();
}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://robertcarlsen.net/2009/02/21/thinking-physically-brauswitch-demonstration-500/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
