<?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>lithium flowers bloom</title>
	<atom:link href="http://leejayxia.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://leejayxia.com/blog</link>
	<description>the weblog</description>
	<lastBuildDate>Sat, 15 May 2010 20:52:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Communication Setup for Blinded</title>
		<link>http://leejayxia.com/blog/communication-setup-for-blinded/</link>
		<comments>http://leejayxia.com/blog/communication-setup-for-blinded/#comments</comments>
		<pubDate>Sat, 15 May 2010 20:52:00 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Sociable Objects Workshop]]></category>
		<category><![CDATA[Kinetic]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=857</guid>
		<description><![CDATA[Li and I worked on a group of robotic/kinetic creatures to create an ironic and self-balanced networked system called Blinded. A very detailed documentation of the construction iterations are up on Li&#8217;s website, so I&#8217;ll just write a bit about the communication between the creatures. For the first iteration we had only one creature fully [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/05/4573919919_ab5486a201_o.jpg" rel="lightbox[857]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/05/4573919919_ab5486a201_o.jpg" alt="" title="4573919919_ab5486a201_o" width="720" height="465" class="alignnone size-full wp-image-858" /></a></p>
<p><a href="http://im-li.com">Li</a> and I worked on a group of robotic/kinetic creatures to create an ironic and self-balanced networked system called <em><a href="http://im-li.com/blinded/">Blinded</a></em>. </p>
<p>A very <a href="http://im-li.com/project-blinded/">detailed documentation</a> of the construction iterations are up on Li&#8217;s website, so I&#8217;ll just write a bit about the communication between the creatures.</p>
<p>For the first iteration we had only one creature fully assembled so I built a quick &#8220;single character communication protocol&#8221; that allows the creature to be remotely controlled from a computer. I have two pre-paired series one xbees which are perfect for this basic cable replacement purpose. </p>
<p>The arduino on the creature side is expecting specific &#8220;single character&#8221; functions from the serial channel via xbee, available instructions are:</p>
<p>1. L &#8211; turn left<br />
2. R &#8211; turn right<br />
3. F &#8211; step forward<br />
4. anything else &#8211; stop</p>
<p>At the same time, for monitoring purpose the arduino is reporting if the creature is on its target by comparing its left and right sensors and their historic readings, the reported status is written into the serial channel simply with notation of 1 (on-target) and 0 (target lost).</p>
<p>Because we had only one creature ready back then, the pursuing status is not entirely making sense, so the computer mainly served as a remote controller. The controller setup is pretty simple though, it can be just an xbee explorer board and any serial terminal program can be used to send commands to the remote creature. Following video shows one of our field tests in the park.</p>
<p><object type="application/x-shockwave-flash" width="500" height="375" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=736789bd13&#038;photo_id=4573469454&#038;flickr_show_info_box=true"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=736789bd13&#038;photo_id=4573469454&#038;flickr_show_info_box=true" height="375" width="500"></embed></object> </p>
<p>After more creatures were added to the group, the situation became much more complicated and I have to put up a processing sketch to coordinate input from multiple creatures. I did not use the xbee library for processing although it did look pretty promising in the examples and taking care a lot of the heavy liftings. But I dig into the source code a little bit and got a feeling that it might be a pain to use with series 2 xbees. So I just wrote some very simple parsing functions to take apart I/O packets and make sure I have access to any digital or analog pins without too much hack. </p>
<p>For physical setup, I switched all remote xbees to series 2 and put their firmware to router-at mode. The base station that stays with the computer is in coordinator-api mode. I used 4 pins of the remote xbees, 2 for digital output (remote commands), 2 for analog input (transferring sensor values to the remote computer/coordinator). Each remote xbee will still need to handle status reporting and command receiving, and the arduino on the creature remains as local intelligence that parses the sensor information and actually controls the motion.</p>
<p>Commands for Xbee configuration:</p>
<p>ATD04<br />
ATD14<br />
ATD22<br />
ATD32</p>
<p>During runtime, the computer is able to set the remote xbee digital pin state through processing sketch. Code snippet for setting</p>
<div class="codecolorer-container java dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">void</span> setRemotePin<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">byte</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span>address, <span style="color: #003399;">String</span> command, <span style="color: #000066; font-weight: bold;">int</span> value<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>address.<span style="color: #006633;">length</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;invalid address&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>command.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; println<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;invalid command&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x7E<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// start byte</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// high part of length (always zero)</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x10<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// low part of length (the number of bytes that follow, not including checksum)</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x17<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 0x17 is a remote AT command</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// frame id set to zero for no reply</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// ID of recipient, or use 0xFFFF for broadcast</span><br />
<br />
&nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>i <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>address<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp;<span style="color: #666666; font-style: italic;">/* broadcast */</span><br />
&nbsp;<span style="color: #666666; font-style: italic;">/*<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(00);<br />
&nbsp; serialSelector.port.write(0xFF); // 0xFF for broadcast<br />
&nbsp; serialSelector.port.write(0xFF); // 0xFF for broadcast<br />
&nbsp; */</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// 16 bit of recipient or 0xFFFE if unknown</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0xFF<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0xFE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>0x02<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 0x02 to apply changes immediately on remote</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// command name in ASCII characters</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>command.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>command.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// command data in as many bytes as needed</span><br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// checksum is all bytes after length bytes</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">int</span> sum <span style="color: #339933;">=</span> 0x17 <span style="color: #339933;">+</span> 0xFF <span style="color: #339933;">+</span> 0xFE <span style="color: #339933;">+</span> 0x02 <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>command.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#40;</span>command.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> value<span style="color: #339933;">;</span><br />
&nbsp;<br />
&nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>i <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;sum <span style="color: #339933;">+=</span> address<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; serialSelector.<span style="color: #006633;">port</span>.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span> 0xFF <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span> sum <span style="color: #339933;">&amp;</span> 0xFF<span style="color: #009900;">&#41;</span> &nbsp;<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// calculate the proper checksum</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">//delay(10); // safety pause to avoid overwhelming the serial port (if this function is not implemented properly)</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/communication-setup-for-blinded/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Contour Study</title>
		<link>http://leejayxia.com/blog/contour-study/</link>
		<comments>http://leejayxia.com/blog/contour-study/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:02:13 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Procrastination]]></category>
		<category><![CDATA[Thesis]]></category>
		<category><![CDATA[contour]]></category>
		<category><![CDATA[impersonal]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=851</guid>
		<description><![CDATA[These probably won&#8217;t be posted to the actual impersonal archive site since I would like to keep that as only archives for self-supervised creations. The brush is working very well even it&#8217;s just training direct output from blob detection, the brush itself is taking care of the motion dynamics. It could be just a side [...]]]></description>
			<content:encoded><![CDATA[<p>These probably won&#8217;t be posted to the actual impersonal <a href="http://im-personal.tumblr.com">archive site</a> since I would like to keep that as only archives for self-supervised creations. The brush is working very well even it&#8217;s just training direct output from blob detection, the brush itself is taking care of the motion dynamics.</p>
<p>It could be just a side project, the contour training of impersonal seems to producing some interesting visuals. Click image for better resolution.</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/04/contour.jpg" rel="lightbox[851]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/04/contour-300x213.jpg" alt="" title="contour" width="300" height="213" class="alignnone size-medium wp-image-853" /></a></p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/04/drawing_machine_api.jpg" rel="lightbox[851]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/04/drawing_machine_api-266x300.jpg" alt="" title="drawing_machine_api" width="266" height="300" class="alignnone size-medium wp-image-852" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/contour-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Imaginary Sociable Objects</title>
		<link>http://leejayxia.com/blog/imaginary-sociable-objects/</link>
		<comments>http://leejayxia.com/blog/imaginary-sociable-objects/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 04:35:56 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Sociable Objects Workshop]]></category>
		<category><![CDATA[imaginary]]></category>
		<category><![CDATA[nanorobots]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=836</guid>
		<description><![CDATA[Nanorobots! Click to read more about Local Network for Group Intelligence (a collaboration with Adi Marom)]]></description>
			<content:encoded><![CDATA[<p>Nanorobots!</p>
<p>Click to read more about <a href='http://leejayxia.com/blog/wp-content/uploads/2010/03/Imaginary_Sociable_Objects.pdf'><strong>Local Network for Group Intelligence</strong></a></p>
<p>(a collaboration with Adi Marom)</p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/imaginary-sociable-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Face Reader</title>
		<link>http://leejayxia.com/blog/face-reader/</link>
		<comments>http://leejayxia.com/blog/face-reader/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 04:02:11 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Sociable Objects Workshop]]></category>
		<category><![CDATA[data collection]]></category>
		<category><![CDATA[emotion]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[face]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=827</guid>
		<description><![CDATA[Think of a question you have about the world, the simpler the better. Create an experiment that seeks the answer. Design a pilot study that includes gathering data. Consider having a control group and an experimental group to compare. User your data to try and see something that might be invisible to the casual observer. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Think of a question you have about the world, the simpler the better. Create an experiment that seeks the answer. Design a pilot study that includes gathering data. Consider having a control group and an experimental group to compare. User your data to try and see something that might be invisible to the casual observer.</p></blockquote>
<p>I wondered if people actually smile or cry on the streets, or if they would explicitly express their feelings in a public space. So I would like to put sensors out on the streets to track individual people that are not in groups, and see if their emotions are easily detectable from their facial expressions.</p>
<p>The best known active emotion sensors are our own eyes, we&#8217;ve been trained for years since our very birth to read other people&#8217;s facial expressions and to properly respond to it. So I decide to walk outside with my own eyes as the sensor to &#8220;scan&#8221; the street. I set up some basic rules as follows:</p>
<ul>
<li>record only people who walk past me from the front so that I can read their face</li>
<li>log only people who are alone</li>
<li>it&#8217;s okay to miss a person or two, the sample rate is determined by how fast I write the data down</li>
<li>avoid crowds and busy streets</li>
</ul>
<p>It would be great if different aspects of information about the people could be logged together with their facial expression, which might reveal a lot more about why or why not and how people are showing their feelings to strangers. In this case with time and other constraint I decide to record just people&#8217;s gender and (rough estimation of) age for cross reporting. By just myself it&#8217;s kinda hard to all these things at once, I started by thinking of using devices like vehicle traffic counter but ended up with some simplified logging strategy that helped me also organize the visualization while I was logging.</p>
<p>The data is logged with following rules:</p>
<ul>
<li>each circle represents a person</li>
<li>the vertical position of the circle represents the facial expression: middle for neutral, the top for a big laugh, and the bottom for sad/crying</li>
<li>horizontal positon is not relevant, although it does loosely represents the time it is logged</li>
<li>size of the circle represents age, bigger circle is an older person</li>
<li>circle pattern represents gender, filled circles are female</li>
</ul>
<p>The completely human powered data visualization looks like below. The data is collected from an approximately 2 hours walk including two subway trips.</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/03/face_reading_graph.jpg" rel="lightbox[827]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/03/face_reading_graph-1024x360.jpg" alt="" title="face_reading_graph" width="1024" height="360" class="alignnone size-large wp-image-830" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/face-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sensor Network: Data Logging and Visualization</title>
		<link>http://leejayxia.com/blog/sensor-network-data-logging-and-visualization/</link>
		<comments>http://leejayxia.com/blog/sensor-network-data-logging-and-visualization/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 07:50:18 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Sociable Objects Workshop]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[sensor network]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=823</guid>
		<description><![CDATA[I&#8217;m working with Sebastian and Michael as &#8220;visualization&#8221; team for the sensor network assignment for this week&#8217;s Sociable Objects Workshop. It&#8217;s very challenging for the whole class to work on one single project, but so far it went on pretty well. Tasks are split and assigned and we also find ways to work with dependencies [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working with Sebastian and Michael as &#8220;visualization&#8221; team for the sensor network assignment for this week&#8217;s Sociable Objects Workshop. It&#8217;s very challenging for the whole class to work on one single project, but so far it went on pretty well. Tasks are split and assigned and we also find ways to work with dependencies and such constraints.</p>
<p>Since we are just focusing on the visualization part, meaning that we take on only after all the data are aggregated at the coordinator xbee, our main effort will be data logging, mining and visualization. So the first thing we built is a <strong>pseudo data generator</strong> that feeds data in the same format as the data will be from the coordinator. We talked to the base station team and agreed that we will be getting raw API I/O RX packet and we will take care of the parsing and data storage. </p>
<p>I put together some simple arduino code to feed pseudo data, they could be easily replaced by a real coordinator and ideally we will not have to change the processing code on the other side which is listening to the serial channel.</p>
<div class="codecolorer-container c dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:1300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">#define ADDRESS_COUNT 9</span><br />
<span style="color: #993333;">int</span> addresses<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">9</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #208080;">0x0001</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0002</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0003</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0004</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0005</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0006</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0007</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0008</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #208080;">0x0009</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; randomSeed<span style="color: #009900;">&#40;</span>analogRead<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>i <span style="color: #339933;">&lt;</span> ADDRESS_COUNT<span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">990</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>random<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #0000dd;">500</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sendPseudoPackage<span style="color: #009900;">&#40;</span>addresses<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sendPseudoPackage<span style="color: #009900;">&#40;</span>addresses<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<br />
<span style="color: #993333;">void</span> sendPseudoPackage<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> address<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> value<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<span style="color: #666666; font-style: italic;">// pass either a 0x4 or and 0x5 to turn the pin on or off</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x7E</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// start byte</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x0</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// high part of length (always zero)</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x17</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// low part of length (the number of bytes that follow, not including checksum)</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x92</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 0x92 is I/O RX Packet</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//05-12: &nbsp;64-bit address</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x13</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0xA2</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x40</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x33</span><span style="color: #339933;">,</span>BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #993333;">int</span> low <span style="color: #339933;">=</span> address <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #993333;">int</span> high <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>address <span style="color: #339933;">-</span> low<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;&gt;</span> <span style="color: #0000dd;">2</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span>high<span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span>low<span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
<br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//13-14: &nbsp;16 bit of recipient or 0xFFFE if unknown</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0xFF</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0xFE</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//15: &nbsp;Receive Option</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x01</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//16: &nbsp;Num Samples</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x01</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//17-18 Digital Channel Mask</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x01</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//only Digital I/O 0</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//19: &nbsp;Analog Channel Mask</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//20-21: &nbsp;Digital Samples</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0x00</span><span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span>value<span style="color: #339933;">,</span> BYTE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">//no analog samples</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// checksum is all bytes after length bytes</span><br />
&nbsp; <span style="color: #993333;">long</span> sum <span style="color: #339933;">=</span> <span style="color: #208080;">0xFF</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//fake</span><br />
&nbsp; Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span> <span style="color: #208080;">0xFF</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span> sum <span style="color: #339933;">&amp;</span> <span style="color: #208080;">0xFF</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">,</span> BYTE <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// calculate the proper checksum</span><br />
&nbsp; delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// safety pause to avoid overwhelming the serial port (if this function is not implemented properly)</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Then I wrote a basic processing sketch which filters the data and stores only changes to the databases. The sketch itself servers as some sort of realtime visualization on the input, and we get a feeling of how often data are changing and potentially detects sensor failures if one sensor is not active for a very long time.</p>
<p><object width="500" height="281"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9819815&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9819815&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="281"></embed></object></p>
<p>The processing sketch is sending data to a website that handles data logging. The website also provides query api that returns sensor history in json format, and functions like filtering by certain address. The site itself is lightweight and fairly easy to add new functionality.</p>
<p>The plan is to meet tomorrow and start building a web interface upon the api for the final visualization. Hopefully we could also get to verify if the pseudo data is identical to the real format, and maybe we can get a test run with the real setup.</p>
<p><del datetime="2010-03-24T04:37:19+00:00">Stay tuned!</del></p>
<p><strong>UPDATE</strong>: A list of available API functions:</p>
<p>url: http://itp.nyu.edu/~lx243/sensornet/index.php/api/</p>
<blockquote><p>all (meaning that the url will look like http://itp.nyu.edu/~lx243/sensornet/index.php/api/all)
</p></blockquote>
<p>returning all records in json format</p>
<blockquote><p>find/:address</p></blockquote>
<p>returning all records from address specified<br />
address should be a string of 64bit address, e.g. 0013A20040330001</p>
<blockquote><p>find_today/:address</p></blockquote>
<blockquote><p>find_by_day/:address/:day
</p></blockquote>
<p>day should be in the format of yyyymmdd, e.g. 20100301</p>
<blockquote><p>status/:address
</p></blockquote>
<p>returning latest records from specified address</p>
<blockquote><p>status_at/:address/:time
</p></blockquote>
<p>returning latest records by the time specified<br />
time should be in the format of yyyymmddHHMMSS, e.g. 20100301140000</p>
<blockquote><p>changes/:address
</p></blockquote>
<p>returning all changes at specified address</p>
<blockquote><p>changes_today/:address
</p></blockquote>
<p>returning changes happened today at specified address</p>
<blockquote><p>changes_by_day/:address/:day
</p></blockquote>
<p>returning changes happened today on specified date at specified address<br />
day should be in the format of yyyymmdd, e.g. 20100301</p>
<blockquote><p>stats/:address
</p></blockquote>
<p>returning open time, close time, changes, and total active time of the sensor</p>
<blockquote><p>stats_today/:address
</p></blockquote>
<p>returning above stats from specified address</p>
<blockquote><p>stats_by_day/:address/:day
</p></blockquote>
<p>returning above stats from specified address on specified day</p>
<p><strong>UPDATE 2</strong>: Visualization</p>
<p>It took a while for Sebastian and I to make processing.js to talk to the API and get real time update. We used jQuery as a bridge to retrieve the data and feed it on the page to processing.js.  But eventually all is fine:</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/03/Mozilla-Firefox.png" rel="lightbox[823]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/03/Mozilla-Firefox.png" alt="" title="Where is my professor?" width="797" height="284" class="alignnone size-full wp-image-840" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/sensor-network-data-logging-and-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using XBee Without Arduino</title>
		<link>http://leejayxia.com/blog/using-xbee-without-arduino/</link>
		<comments>http://leejayxia.com/blog/using-xbee-without-arduino/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 04:34:04 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Sociable Objects Workshop]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=821</guid>
		<description><![CDATA[I worked with Adi on the &#8220;Romantic Lighting Sensor&#8221; Lab for Sociable Objects Workshop. Since we do not have a photo cell at hand, we just used a normal potentiometer as the remote sensor. The code is from Rob Faludi&#8217;s course code sample page. We had some problem at first with the receiver side and [...]]]></description>
			<content:encoded><![CDATA[<p>I worked with Adi on the &#8220;Romantic Lighting Sensor&#8221; Lab for Sociable Objects Workshop.  Since we do not have a photo cell at hand, we just used a normal potentiometer as the remote sensor. The code is from Rob Faludi&#8217;s course <a href="http://www.faludi.com/classes/sociableobjectsworkshop/code/">code sample</a> page.</p>
<p>We had some problem at first with the receiver side and we didn&#8217;t find an effective to debug it. It was pretty clear that the transmitter is working fine since while I was using just xbee explorer board as receiver I can directly see the data coming from the serial channel. However I cannot get the code to work when I plugged the xbee back to arduino circuit.</p>
<p>I ended up using a processing sketch to print out serial data from arduino since I cannot see it directly by printing out data to the serial terminal in arduino code. So lesson learned:</p>
<p>1. the resister used to augment sensor output value to fit xbee&#8217;s 3.3v requirement has to be carefully handled, otherwise you do not get to use full range of the sensor output and it makes it harder to figure out the range to look for in the receiver code,</p>
<p>2. a processing sketch is necessary for debugging. it gives a lot of confidence while you can see what is in the data stream, at least for me.</p>
<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9747935&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9747935&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object><br />
simple remote xbee sensor</p>
<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9748291&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9748291&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object><br />
with feedback</p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/using-xbee-without-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;im-personal&#8221;: components and features</title>
		<link>http://leejayxia.com/blog/im-personal-components-features/</link>
		<comments>http://leejayxia.com/blog/im-personal-components-features/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 08:32:15 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Thesis]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[wireframe]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=819</guid>
		<description><![CDATA[Overview My thesis project is a software program that creates generative drawings on its own, one drawing per day, and updates its own drawing blog. The program was built on the reverse of most generative computer graphics artwork or simulation approaches that creates realistic graphics; instead of creating complex visual graphics based on intensive computational [...]]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p>My thesis project is a software program that creates generative drawings on its own, one drawing per day, and updates its own drawing blog. </p>
<p>The program was built on the reverse of most generative computer graphics artwork or simulation approaches that creates realistic graphics; instead of creating complex visual graphics based on intensive computational power, it is trying to simulate human drawing in a very low-level approach of recreating emotion and gestures.</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.009.png" rel="lightbox[819]"><img class="alignnone size-medium wp-image-810" title="impersonal system wireframe" src="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.009-300x225.png" alt="" width="300" height="225" /></a></p>
<h2>Rationale</h2>
<p>I choose not to build another program to appreciate visual complexity because it comes down to the question of the value of the work of art, which in my opinion has a lot to do with mastery of skills and efforts put in it. So for me people appreciate complex visuals in computer graphics because those visuals are extremely hard to achieve by manual effort. However it is not always true for computers and that is why I am not super excited about computer generated complex abstracts. The real effort would be assigning emotion to fully automated process, and achieve humanity in the drawings produced.</p>
<p>In short, I am building this program in a way that is extremely hard for the computers to do, giving up the significance that could be easily achieved (compared to human effort) by a computer program. I would like to show the slow and painful process of this computer generated drawing and its evolution towards its own aesthetics.</p>
<p>There are infinite number of ways to build a program that draws on itself, and I am building it to mimic my own way of drawing/doodling. From the way the brush moves on the canvas, the shape of the brush strokes, to the composition preferences and training materials feed to the program for inspirations, all implementation would be following my own subjective choice. However the machine is running all by itself without constant intervention even by myself. Ideally it could live as part of my ghost in a different shell. The program could be an extension of the body, virtually. Would it be an even closer way to communicate directly through my ghost? </p>
<h2>Goals</h2>
<p>The goal of this project is to create new genre of computer graphic that expresses humanity by mimicking the doodling experience and generating drawing based on emotional factors and gestures. </p>
<p>It is not the goal of the project to produce tradition painting through simulation of painting tools and media. Drawings produced by the program should be visually recognizable as a computer generated artwork, while the content of the drawing can be subjective, emotional and less “visually mathematical”.</p>
<p>Technically, I would like to show the process of how a computer program would make sense of visual inputs and produce creative result out of it. And ideally it should also be able to publish its evolution from creating basic shapes and curves to being able to produce complex compositions (but not necessarily always doing so).</p>
<h2>Audience and Location</h2>
<p>The project is expecting a wide audience, essentially anyone that has prior experience of using a computer and interested in computer generated graphics. It would also probably draw attention of people that has particular interest in drawings.</p>
<p>This project itself is a very personal expression, meaning that I decide to design the algorithm independently without too much concerns about potential audience. While I am building the project not for particular target audience, I do expect different responses from different groups of people, and there are several that I am more interested in: a) generative graphics artists, b) illustrators, c) artificial intelligence scholars or engineers. </p>
<p>In terms of presentation, I would like the piece to be accessible online including the whole archive of the drawings it created. It is meant to be experienced alone than in a group. While it’s most preferred to be viewed through a web browser or a downloadable application running on one’s own computer, the project could possible still be suitable for public spaces like galleries or museums. </p>
<p>For now it seems that a website would provide a most complete experience for this project given its non-linear nature and technical difficulty to replicate its infrastructure. If I would have enough time to release the application itself to the public or make it easily deployable to other people’s website, and the copies of this project would be able to evolve independently, the final presentation of this decentralized artificial intelligence would have to be on the internet, or at least using internet to aggregate the productions/artworks from all copies. </p>
<h2>Core Features and Functionality</h2>
<p>The core of the project is a software that generates drawings. Every time the program launches, it creates a drawing and terminates itself. The drawing takes inspiration from the program’s external visual memories mixed with some “live” input that adds emotional factors to it. The drawing process is monitored and supervised by the composition and aesthetics assessment algorithms. The program determines the scale of the drawing and the moment to finish drawing.</p>
<p>There will be a few peripheral components to assist the core drawing module. </p>
<p>a) Visual Memory Storage, an important basis for building up the aesthetics preference of the program, as well as its raw material for inspiration. The memory is prioritized based on an arbitrary “impression” algorithm that puts the program’s most favorite visuals on the top.</p>
<p>b) Interface for Visual Memory allows the program to accept multiple source of external graphical inputs. The source could be a streaming video feed from a live webcam on justin.tv, or a favorite image feed from my ffffound.com image bookmarking account. The sources could be used as either positive or negative training material to build up the program’s aesthetic preference. The interface should be easily configured to maintain the input feeds which the program is listening to, and whether or not they are used as training materials. Ideally it could be easily accessible on the web.</p>
<p>c) Aesthetic Preference database, is a set of rules that the program collectively builds up over time through the process of learning, drawing and self assessment. The database is referred to during the creation of the drawing, and will be updated through training, drawing, and feedback on the published drawings.</p>
<p>d) Coordination Scripts that launches the program and publishes its creation to a website. Since the program itself is designed to be modular for future portability, some coordination scripts are required to help keep the whole thing running. They would help monitoring the visual feeds and compiling any updates to the visual memory, launch the drawing module at a preconfigured time, publish<br />
the drawing created in this iteration and collect the feedback on the drawing to reflect into the preference database.</p>
<p>e) A website, technically a blog, that showcases the daily creation of the program. </p>
<p>People will be able to browse through the drawings the program created over time. They will probably not be able to search, since there will not be enough metadata associated with the drawing for filtering. If there has to be a filter or category, it could be based on timeline, emotion, or arbitrary themes (if the program evolves to name its creation).</p>
<p>For individual drawings, people will be able to:</p>
<p>a) watch a playback of the drawing process;<br />
b) see the inspiration of the drawing, or the pictures that the program referred to in the creation;<br />
c) rate the drawing, the result might or might not be used as training material;<br />
d) (optional) order a print of the drawing;</p>
<p>This project is not intended to be instantly interactive because I would like to show the slow and painful process of creating a drawing, not to draw people’s attention to the coolness of computer generative graphics. I would like each of the drawing the program made would take a while for people to digest. I would like people to notice and appreciate the drawings themselves as work of art without knowing that they are created by a computer. This is already a very challenging task both in AI and fine art.</p>
<p>The software program shares my attitude on computer generative graphic art. While it is capable of creating complex generative visuals, it chooses to (as I choose to make it ) take the hard way and to apply its own (as my own) preference of visual beauty to its creation. It is a very personal critique on current computer generative art.</p>
<p>The core drawing module will either be written in Processing or openFrameworks, depending on my research on the portability of each option. I would like the program to be able to executed on a command line tool that does not require user intervention in the drawing process, so that it would be easily automated after it is deployed to a linux server.</p>
<p>For visual memory storage, couchDB seems a competitive choice for my data structure given its document oriented concept and flexibility in data types. MySql will be a safe but second choice since I’m more familiar with it.</p>
<p>Housekeeping scripts will be a compilation of a set of tools written in combination of shell scripts, python and php. It is most likely that I will build the website in php or just hack around the wordpress CMS framework.</p>
<p>As a software program, it does not have a user interface. It should not even require an input. It could be simply described as an application that generates one drawing at a time. </p>
<p>The showcase website, as the final presentation of the program, does have a user interface. I have in mind a blog site with clean minimalist design, highlighting latest drawing created by the program. And it should be easy enough to navigate through the archive of drawings to see how the algorithm evolves.</p>
<h2>Success Measures / Future Plans</h2>
<p>The goal of this project is to achieve machine intelligence in artworks, meaning that it should essentially create drawing that is visually or emotionally appealing to its viewers. Although the concept of machine intelligence evolution made public is as important, I would like to make the project beyond just being conceptual. The diversity of the drawings that it creates and the fact whether or not people appreciate those drawings will be also very important and valuable information for me.</p>
<p>For thesis, of course I would like to build the whole project to its greatest completion. However given the time constraints and technical challenges, I could still sort out some of the components to be lower prioritized than others.</p>
<p>The core drawing module is first priority, but it does not mean that the evolving algorithm needs to be perfect. The most important thing is the self driven composition process.</p>
<p>Secondly important is the infrastructure that automates the program and publish the drawings. Even if the algorithm is not perfect, it still makes a lot of sense if the whole evolution procedure is online and accessible to all.</p>
<p>Next will be the external interface of the program to the outside world, which makes it easier to feed training materials, to supervise the training process and to apply the feedbacks.</p>
<p>For future I will be most interested in making it portable enough so that there could be multiple instances of this program evolving individually and people could observe how different they are becoming over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/im-personal-components-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;im-personal&#8221;: use cases</title>
		<link>http://leejayxia.com/blog/im-personal-use-cases/</link>
		<comments>http://leejayxia.com/blog/im-personal-use-cases/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 08:14:08 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Thesis]]></category>
		<category><![CDATA[impersonal]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[machine]]></category>
		<category><![CDATA[use-case]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=804</guid>
		<description><![CDATA[I still need a name for my drawing machine. My class felt the &#8220;machine&#8221; in the name is confusing, but I keep thinking the whole application as a machine since there will be loosely coupled components, and they are assembled in a way like machines. Anyways a name would still be necessary because that will [...]]]></description>
			<content:encoded><![CDATA[<p>I still need a name for my drawing machine. My class felt the &#8220;machine&#8221; in the name is confusing, but I keep thinking the whole application as a machine since there will be loosely coupled components, and they are assembled in a way like machines. Anyways a name would still be necessary because that will make the project itself a lot personal. A working title for now is &#8220;im-personal&#8221; because it is an impersonal machine but it is crying out and saying that &#8220;i am personal&#8221; and its creations and its own visual memories are really personal.</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.004.png" rel="lightbox[804]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.004-300x225.png" alt="" title="user scenario.004" width="300" height="225" class="alignnone size-medium wp-image-806" /></a>&nbsp;<br />
Collect training materials</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.005.png" rel="lightbox[804]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.005-300x225.png" alt="" title="user scenario.005" width="300" height="225" class="alignnone size-medium wp-image-807" /></a>&nbsp;<br />
Supervise training process</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.006.png" rel="lightbox[804]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.006-300x225.png" alt="" title="user scenario.006" width="300" height="225" class="alignnone size-medium wp-image-808" /></a><br />
Training personal drawing style</p>
<p><a href="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.007.png" rel="lightbox[804]"><img src="http://leejayxia.com/blog/wp-content/uploads/2010/02/user-scenario.007-300x225.png" alt="" title="user scenario.007" width="300" height="225" class="alignnone size-medium wp-image-809" /></a><br />
A public online gallery showcases all creations</p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/im-personal-use-cases/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thesis Workplan</title>
		<link>http://leejayxia.com/blog/thesis-workplan/</link>
		<comments>http://leejayxia.com/blog/thesis-workplan/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 07:46:32 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Thesis]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[plan]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=798</guid>
		<description><![CDATA[is here: http://bit.ly/thesis-workplan]]></description>
			<content:encoded><![CDATA[<p>is here: <a href="http://bit.ly/thesis-workplan">http://bit.ly/thesis-workplan</a></p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/thesis-workplan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thesis Idea Switch</title>
		<link>http://leejayxia.com/blog/thesis-idea-switch/</link>
		<comments>http://leejayxia.com/blog/thesis-idea-switch/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 06:48:18 +0000</pubDate>
		<dc:creator>L.J</dc:creator>
				<category><![CDATA[Thesis]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[use-case]]></category>

		<guid isPermaLink="false">http://leejayxia.com/blog/?p=801</guid>
		<description><![CDATA[So this is happening to me, and I guess sooner is better than later. I would like to have a specific idea to develop (and code!) so I am turning back to the self-evolving drawing machine idea. I realized that given the very limited time it is nearly impractical to complete my research on the [...]]]></description>
			<content:encoded><![CDATA[<p>So this is happening to me, and I guess sooner is better than later. I would like to have a specific idea to develop (and code!) so I am turning back to the <a href="http://leejayxia.com/blog/drawing-machine-project-proposal/">self-evolving drawing machine idea</a>. I realized that given the very limited time it is nearly impractical to complete my research on the online privacy issue and develop a great idea that is proper as a thesis project. I would like to save all research that I&#8217;ve already done on this matter as a theme for my future project and I&#8217;m still working on the readings that I found.</p>
<p>Get back to the drawing machine that learns from human drawing, I finished the <a href="http://leejayxia.com/blog/update-on-my-brush-stroke/">brush stroke</a> and <a href="http://leejayxia.com/blog/automating-the-brush-stroke/">drawing API encapsulation</a> last semester. From now on until the end of the semester, I would like to finish the genetic algorithm for evolving machine aesthetics and the publishing module, so that I can at least setup a solid basis for this project. Even if I cannot finish all features that I planned, I will still be able to have a running platform to improve the underlying intelligence on.</p>
]]></content:encoded>
			<wfw:commentRss>http://leejayxia.com/blog/thesis-idea-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
