<?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>scanlime</title> <atom:link href="http://scanlime.org/feed/" rel="self" type="application/rss+xml" /><link>http://scanlime.org</link> <description>one girl&#039;s diary of improvisational engineering</description> <lastBuildDate>Tue, 14 May 2013 01:17:25 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>High Quality Zen</title><link>http://scanlime.org/2013/05/high-quality-zen/</link> <comments>http://scanlime.org/2013/05/high-quality-zen/#comments</comments> <pubDate>Tue, 14 May 2013 01:17:25 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Zen photon garden]]></category> <category><![CDATA[art]]></category> <category><![CDATA[graphics]]></category> <category><![CDATA[hqz]]></category> <category><![CDATA[new-project]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2361</guid> <description><![CDATA[Announcing High Quality Zen, a batch renderer based on Zen photon garden. I built it as a way to further experiment with this 2D raytracing style, adding animation and color.]]></description> <content:encoded><![CDATA[<p>Announcing High Quality Zen, a batch renderer based on <a
href="http://zenphoton.com">Zen photon garden</a>. I built it as a way to further experiment with this 2D raytracing style, adding animation and color.</p><p>I created a short <a
href="http://www.youtube.com/watch?v=obbew_7_Xo8">video intro</a> in the form of an Amon Tobin music video:</p><p><iframe
width="640" height="360" src="http://www.youtube-nocookie.com/embed/obbew_7_Xo8?rel=0" frameborder="0" allowfullscreen></iframe></p><p>Try it yourself:</p><ul><li>Create art in your browser at <a
href="http://zenphoton.com/">zenphoton.com</a></li><li>Take a look at the <a
href="https://github.com/scanlime/zenphoton/blob/master/hqz/README.md">hqz README</a> on GitHub</a>.</li></ul><p><a
href="http://scanlime.org/wp-content/uploads/2013/05/particles10-0066.png"><img
src="http://scanlime.org/wp-content/uploads/2013/05/particles10-0066-640x360.png" alt="particles10-0066" width="640" height="360" class="aligncenter size-large wp-image-2362" /></a></p><p><a
href="http://scanlime.org/wp-content/uploads/2013/05/partners.png"><img
src="http://scanlime.org/wp-content/uploads/2013/05/partners-640x360.png" alt="partners" width="640" height="360" class="aligncenter size-large wp-image-2363" /></a></p><p><a
href="http://scanlime.org/wp-content/uploads/2013/05/particles11-proto2.png"><img
src="http://scanlime.org/wp-content/uploads/2013/05/particles11-proto2-640x360.png" alt="particles11-proto2" width="640" height="360" class="aligncenter size-large wp-image-2369" /></a></p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2013/05/high-quality-zen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Zen photon garden</title><link>http://scanlime.org/2013/04/zen-photon-garden/</link> <comments>http://scanlime.org/2013/04/zen-photon-garden/#comments</comments> <pubDate>Tue, 23 Apr 2013 01:00:02 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Portfolio]]></category> <category><![CDATA[Zen photon garden]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2311</guid> <description><![CDATA[Sculpting with photons, using a new HTML5 raytracer made specifically for art.
]]></description> <content:encoded><![CDATA[<p>Lately I&#8217;ve been spending more time working on creative projects. I would say <em>focusing</em> on creative projects, though sometimes focus seems counterproductive. As a project hurtles toward one goal, it leaves a trail of sharp edges and unanswered questions that lead to completely new projects.</p><p>This happened recently. In the course of designing a <a
href="http://www.flickr.com/photos/micahdowty/8573040699/in/photostream">triangular pixel grid</a> prototype for a larger project, I found myself building a little raytracing toy in Processing. I wanted to optimize the shape of my reflectors in order to get the smoothest and most uniform LED light. Before I could even use this tool for its intended purpose, I got distracted with using it to create art. Then I got distracted with making it run in web browsers, so anyone could use it to create art.</p><p>This became <a
href="http://zenphoton.com">Zen photon garden</a>:</p><p><a
href="http://zenphoton.com/#AAQAAkACAAEghwBVAZoAhgFWAN//AAAB6wCOAbgAy/8AAAH/AM0B9wDQ/wAAAqoAwQK9ANb/AAACfwCjAo8Anv8AAAJWAG0CXABt/wAAAj4ANQJCADX/AAADkgFvA5MBd/8AAANaAS0DWgE0/wAAAy4BBwMuAQr/AAADDwEDAw4BBP8AAAL+AQMC+QEq/wAAAwwBCwMMASj/AAADMwEiAzEBTv8AAADIAVkA6AF1/wAAASUBawEoAXH/AAAA4wFjAPABY/8AAAD2ASEA+gEj/wAAAO4BFADwASD/AAAAuQEMALwBGP8AAAEBAPABAgD7/wAAAQoA6AEKAO7/AAABBwEeAQkBIf8AAAEmAU0BJQFN/wAAAQgBRwERAVX/AAABAAFFAQABR/8AAAHGAd8B0AHj/wAAAbYB4gG4AeH/AAABoAHgAaAB5f8AAAGUAfwBkQH8/wAAAXQB+AF5Af//AAABewIWAXwCGv8AAAGCAhsBgwIc/wAAAcoCEQHPAhT/AAABwAHtAcYB7f8AAAHjAcUB2wHF/wAAAdMBwwHQAcP/AAABqQHMAaEBz/8AAAHcAbEB3QGy/wAAAdkBsQHYAbH/AAAByQGsAccBrP8AAAHHAawByAGr/wAAAewBegHwAXn/AAAB3QGDAdIBlP8AAAHSAZQB0gGZ/wAAAdgBmQHcAZz/AAAB5wGUAegBk/8AAAHoAXsB6AF3/wAAAfUBYgH0AWH/AAAB6AFzAe0Baf8AAAH2AWgB9QFq/wAAAfcBVQHzAVX/AAACRgFxApYBO/8AAAKWATsC1QFU/wAAAtUBVAJ9AYf/AAACfQGHAkUBc/8AAAKZAUECyAFUUJcAAsgBVAJ7AYFQlwACewGBAk4BcFCXAAJaAbECigGqTRqXAm0BtwKCAbRNGpcCcwHGArIBxE0alwJbAdYCpAHWTRqXAmUB5wKNAedNGpcCfwH4ArcB900alwJSAgcCowIHTRqXAmUCJgLGAiZNGpcCWAIfAqACH00alwJpAhsCyQIbTRqXAj8CMQLQAiZNGpcCjQFAAn0BTAD/AAJ1AVECbQFXAP8AAmkBWAJjAV0A/wACTwFrAlsBYAD/AAAEAAQAAQI9AP8AAYQBXQGHAWH/AAABWAGBAVsBh/8AAAEwAasBNAGw/wAAARAB1wETAdv/AAABBAH+AQEB/P8AAAEDAiEA/wIi/wAAAe8BFAHyATSaAGQB8gE0AgwBMJoAZAIMATACCQESmgBkAgkBEgHuARaaAGQ="><img
src="http://scanlime.org/wp-content/uploads/2013/04/Screen-Shot-2013-04-22-at-2.49.03-PM-640x393.png" alt="" title="Screenshot of Zen photon garden" width="640" height="393" class="aligncenter size-large wp-image-2315" /></a></p><p>There are <a
href="http://nerget.com/rayjs-mt/rayjs.html">plenty</a> <a
href="http://www.slimeland.com/raytrace/">of</a> <a
href="http://29a.ch/2010/6/2/realtime-raytracing-in-javascript">other</a> <a
href="http://labs.flog.co.nz/raytracer/">JavaScript</a> <a
href="http://jsraytracer.herokuapp.com/">raytracers</a> out there. It makes a great tech demo; an impressive way to show that web browsers can be a serious platform for even the most CPU-intensive applications. And, no doubt, zenphoton needed to invoke some very modern web technologies to run as fast as it does.</p><p>But I didn&#8217;t write it as a tech demo, I wrote it to try out an interaction model: <b>sculpting with light</b>.</p><p>For example, a <a
href="http://youtu.be/giTxJdOjRAk">screencast</a>:</p><p><iframe
width="640" height="360" src="http://www.youtube-nocookie.com/embed/giTxJdOjRAk?rel=0" frameborder="0" allowfullscreen></iframe></p><p>And the fully rendered result:</p><p><a
href="http://zenphoton.com/#AAQAAkACAAEgfwBCAdAAwgI5AMD/AAACWwCfAqUA7v8AAAKSAQMChgFa/wAAAmABWgItAX//AAABrQCXAXIA1f8AAAGXAPIBpQEw/wAAAYgBQAHTAYH/AAAB5QFkAhUBYP8AAAEiAHoAwwC/AP8AAu0AvQMXAO4A/wADLQGvA1oBnwD/AAJOAe4CUgHoAP8AAlIB3QJWAdcA/wACVwHSAloBygD/AAJbAcUCXgHAAP8AAl4BuwJgAbQA/wACYgGvAmQBpwD/AAJkAaQCZgGdAP8AAL8BJAGHAY7WAQAA+wF2AXQBt9YBAAFRAXsBvQGo1gEAAWsBlAGfAbfWAQABFAGdAaQB19YBAAFCAbsBpwHq1gEAASYBxgGRAfjWAQABGQFwAYkBt9YBAALsAE0DHgBe1gEAAx4AXgM1AIbWAQADNQCGAzkAsNYBAAM5ALADNgDV1gEAAp0AWwLLAFzWAQACywBcAuoAZ9YBAALqAGcDAAB61gEAAwAAegMFAJLWAQADOwEFA2QBH9YBAANkAR8DmQFb1gEAA5kBWwObAZ7WAQADmwGeA4EB3dYBAAOBAd0DSgHz1gEAA0MBMQN4AVLWAQADeAFSA4YBf9YBAAOGAX8DdwGu1gEAA3cBrgNVAczWAQADGwE1Aw4BU9YBAAMZAUoDDgFo1gEAAx8BVQMTAXnWAQADFgEiAwkBQ9YBAAMUAToDBQFl1gEAAysBPQMgAWLWAQADFAERAwQBQ9YBAAL+AVQC9QF21gEAAwcBawMFAYfWAQABEwA7AVUAORO8AAE8AEIBdwBCE7wAAT8ATQFqAE0TvAABUwBgAX0AWxO8AAEtAG0BWwBqE7wAAeYAOgJVAEATvAABswBJAgIASRO8AAHhAFgCTQBaE7wAAbgAagIeAGgTvAACEADrAiUA/f8AAAI2APoCOAEe/wAAAecA4AHSAPD/AAABxQEUAdMBMP8AAAHrAToB+wE4/wAA"><img
src="http://scanlime.org/wp-content/uploads/2013/04/demo-640x360.png" alt="" title="End result from the screencast demo" width="640" height="360" class="aligncenter size-large wp-image-2323" /></a></p><h2>Gallery</h2><p>I&#8217;ve been enjoying using Zen photon garden myself, and I&#8217;ve been posting most of my work on Flickr:</p><div
class='photonic-flickr-stream photonic-stream '><div
class='photonic-flickr-set '><a
href='http://www.flickr.com/photos/22238428@N05/sets/72157633220413480' class='photonic-header-thumb photonic-flickr-set-solo-thumb' title='Zen photon garden' ><img
src="http://farm9.static.flickr.com/8099/8640106662_af2e2eeb83_t.jpg" alt="Zen photon garden" /></a><div
class='photonic-header-details photonic-set-details'><div
class='photonic-header-title photonic-set-title'><a
href='http://www.flickr.com/photos/22238428@N05/sets/72157633220413480' >Zen photon garden</a></div><span
class='photonic-header-info photonic-set-photos'>27 photos</span></div></div><ul
class='title-display-tooltip'><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8099/8640106662_af2e2eeb83_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640106662&#039; &gt;Solids&lt;/a&gt;" ><img
alt="Solids" src="http://farm9.static.flickr.com/8099/8640106662_af2e2eeb83_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8398/8640025775_2e991cf775_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640025775&#039; &gt;Cargo Cult&lt;/a&gt;" ><img
alt="Cargo Cult" src="http://farm9.static.flickr.com/8398/8640025775_2e991cf775_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8248/8640301675_2103d79c97_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640301675&#039; &gt;Horizontal Momentum&lt;/a&gt;" ><img
alt="Horizontal Momentum" src="http://farm9.static.flickr.com/8248/8640301675_2103d79c97_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8124/8639007885_6e0f5ee9ec_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8639007885&#039; &gt;Henge&lt;/a&gt;" ><img
alt="Henge" src="http://farm9.static.flickr.com/8124/8639007885_6e0f5ee9ec_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8254/8639051621_8db8e7c90d_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8639051621&#039; &gt;Zig&lt;/a&gt;" ><img
alt="Zig" src="http://farm9.static.flickr.com/8254/8639051621_8db8e7c90d_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8404/8640272848_c49369d59f_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640272848&#039; &gt;Arc Flash&lt;/a&gt;" ><img
alt="Arc Flash" src="http://farm9.static.flickr.com/8404/8640272848_c49369d59f_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8246/8639021245_a753aa9540_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8639021245&#039; &gt;Edgewise Decomposition&lt;/a&gt;" ><img
alt="Edgewise Decomposition" src="http://farm9.static.flickr.com/8246/8639021245_a753aa9540_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8400/8640188328_4355bb94ea_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640188328&#039; &gt;Landing&lt;/a&gt;" ><img
alt="Landing" src="http://farm9.static.flickr.com/8400/8640188328_4355bb94ea_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8123/8639023389_8e9331985c_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8639023389&#039; &gt;Sine Whale&lt;/a&gt;" ><img
alt="Sine Whale" src="http://farm9.static.flickr.com/8123/8639023389_8e9331985c_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8536/8640113366_ed5b5f22bc_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640113366&#039; &gt;Escher Skyline&lt;/a&gt;" ><img
alt="Escher Skyline" src="http://farm9.static.flickr.com/8536/8640113366_ed5b5f22bc_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8125/8639014531_db535d0b64_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8639014531&#039; &gt;Untitled&lt;/a&gt;" ><img
alt="Untitled" src="http://farm9.static.flickr.com/8125/8639014531_db535d0b64_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8529/8640237082_94094e6767_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8640237082&#039; &gt;80138&lt;/a&gt;" ><img
alt="80138" src="http://farm9.static.flickr.com/8529/8640237082_94094e6767_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8540/8642723352_a65f5de0d5_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8642723352&#039; &gt;Atmospheric Sieve&lt;/a&gt;" ><img
alt="Atmospheric Sieve" src="http://farm9.static.flickr.com/8540/8642723352_a65f5de0d5_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8105/8647918432_39bf863eee_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8647918432&#039; &gt;Society&lt;/a&gt;" ><img
alt="Society" src="http://farm9.static.flickr.com/8105/8647918432_39bf863eee_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8260/8652895400_2389d83545_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8652895400&#039; &gt;Cave painting&lt;/a&gt;" ><img
alt="Cave painting" src="http://farm9.static.flickr.com/8260/8652895400_2389d83545_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8125/8655391239_cfc4b88322_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8655391239&#039; &gt;Stormy&lt;/a&gt;" ><img
alt="Stormy" src="http://farm9.static.flickr.com/8125/8655391239_cfc4b88322_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8124/8656543634_d43ec6a0cb_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8656543634&#039; &gt;Metamorph&lt;/a&gt;" ><img
alt="Metamorph" src="http://farm9.static.flickr.com/8124/8656543634_d43ec6a0cb_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8107/8655492493_f493c2b261_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8655492493&#039; &gt;Ordinate&lt;/a&gt;" ><img
alt="Ordinate" src="http://farm9.static.flickr.com/8107/8655492493_f493c2b261_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8261/8664486614_397d08b283_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8664486614&#039; &gt;Fragmentation from above&lt;/a&gt;" ><img
alt="Fragmentation from above" src="http://farm9.static.flickr.com/8261/8664486614_397d08b283_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8390/8677362884_13df8c01b6_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8677362884&#039; &gt;Duel&lt;/a&gt;" ><img
alt="Duel" src="http://farm9.static.flickr.com/8390/8677362884_13df8c01b6_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8265/8677366060_9308678e38_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8677366060&#039; &gt;Retrographical&lt;/a&gt;" ><img
alt="Retrographical" src="http://farm9.static.flickr.com/8265/8677366060_9308678e38_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8124/8677393912_82ec3cc271_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8677393912&#039; &gt;Polygon Trap&lt;/a&gt;" ><img
alt="Polygon Trap" src="http://farm9.static.flickr.com/8124/8677393912_82ec3cc271_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8527/8677665654_b10b36fa39_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8677665654&#039; &gt;Ad-hoc&lt;/a&gt;" ><img
alt="Ad-hoc" src="http://farm9.static.flickr.com/8527/8677665654_b10b36fa39_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8542/8693172127_f0d920b301_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8693172127&#039; &gt;Color Duel&lt;/a&gt;" ><img
alt="Color Duel" src="http://farm9.static.flickr.com/8542/8693172127_f0d920b301_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm9.static.flickr.com/8257/8701550888_de362419d8_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8701550888&#039; &gt;Spotlight&lt;/a&gt;" ><img
alt="Spotlight" src="http://farm9.static.flickr.com/8257/8701550888_de362419d8_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm8.static.flickr.com/7337/8716320725_5be78bc65b_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8716320725&#039; &gt;Partners&lt;/a&gt;" ><img
alt="Partners" src="http://farm8.static.flickr.com/7337/8716320725_5be78bc65b_t.jpg" /></a></li><li
class="photonic-flickr-image photonic-flickr-photo photonic-pad-photos"><a
class='launch-gallery-fancybox fancybox'  rel='lightbox-photonic-flickr-stream-2'  href="http://farm8.static.flickr.com/7291/8742876247_29e7122091_b.jpg" title="&lt;a href=&#039;http://www.flickr.com/photos/22238428@N05/8742876247&#039; &gt;bubble02&lt;/a&gt;" ><img
alt="bubble02" src="http://farm8.static.flickr.com/7291/8742876247_29e7122091_t.jpg" /></a></li></ul></div><h2>Nuts and Bolts</h2><p>Zen photon garden isn&#8217;t a typical raytracer. Normal raytracers operate in 3D space, and they simulate the paths taken by light as it travels from lamp to camera. Like in the real world, you only see light once it reaches the camera.</p><p>In Zen photon, we trace rays in flat 2D space, but the entire path of each ray is visible. It&#8217;s as if you&#8217;re looking down at a table, a lamp in the center, in a room covered with fog. But unlike real fog  which would absorb and scatter light, Zen photon traces the path of light rays through free space without disturbing them.</p><p>This gives you a sense for how light behaves <em>everywhere in the scene</em>, not just where we can see it. In fact, the image you create can be thought of as a histogram of probabilities. Each pixel represents a small square of space. Brighter pixels are squares of space that, on average, are likely to contain more photons than darker pixels.</p><p>Zen photon garden is entirely probabilistic. When it&#8217;s too complicated to find an exact solution to a problem, sometimes it&#8217;s easier to find a large number of terrible solutions. That&#8217;s the basis behind the <a
href="http://en.wikipedia.org/wiki/Monte_Carlo_method">Monte Carlo method</a>. For each light ray, I simulate just a single way that this ray could have bounced. The light source generates rays in random directions, and diffuse reflections also randomize a ray&#8217;s angle.</p><p>Each ray by itself is a really lousy approximation of the full raytraced scene, but if you collect enough of these bad solutions and average them together, you can get a pretty good solution. Since it&#8217;s very difficult to find a deterministic mathematical solution to the raytracing problem, Zen photon is built to cast many rays really quickly, and display the average solution in real-time.</p><p>This job of repeatedly sending out random rays into the scene is what Zen photon spends almost all of its time doing. It uses several modern web technologies to keep this process fast:</p><ul><li><a
href="https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers">Web Workers</a>, for rendering on multiple CPU cores.</li><li><a
href="https://developer.mozilla.org/en-US/docs/HTML/Canvas">Canvas</a>, for drawing the results.</li><li><a
href="https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays">Typed Arrays</a>, for efficiently operating on large blocks of data.</li><li><a
href="http://asmjs.org/">asm.js</a> when available, for compiling a subset of JavaScript to fast native code.</li></ul><p>Zen photon garden is open source. <a
href="https://github.com/scanlime/zenphoton">Find it on GitHub.</a></p><h2>Where to?</h2><p>There are a bunch of directions I can imagine taking Zen photon garden in.</p><p>If it gets popular, I&#8217;d love to create an iOS app. The web site works on iOS in a minimal capacity, but it&#8217;s slow and not at all fun to use. Sculpting with light on the iPad seems like a natural fit.</p><p>The programmer in me would love to keep adding features. More shapes, like circles or polygons. Color, by simulating the wavelength of each light ray. A resizable canvas. I&#8217;ve been trying to keep this site simple, though, in an effort to make it approachable and keep it focused on aesthetic exploration rather than tools and features.</p><p>I&#8217;d like to track upcoming web technologies. I&#8217;m excited about <a
href="http://asmjs.org/">asm.js</a>, which as of now is available only in nightly builds of Firefox. This is exactly the kind of HTML5 feature that really shines for creating art apps like this, especially when WebGL wouldn&#8217;t necessarily help.</p><p>If you&#8217;re at all interested in hacking on Zen photon garden, please <a
href="https://github.com/scanlime/zenphoton/">fork it on GitHub</a>, post your art, and post your patches!</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2013/04/zen-photon-garden/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>AVR RFID, Optimized and Ported to C</title><link>http://scanlime.org/2012/12/avr-rfid-optimized-and-ported-to-c/</link> <comments>http://scanlime.org/2012/12/avr-rfid-optimized-and-ported-to-c/#comments</comments> <pubDate>Sat, 29 Dec 2012 19:20:26 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[RFID]]></category> <category><![CDATA[avr]]></category> <category><![CDATA[link]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2300</guid> <description><![CDATA[Way back in 2008, I posted a writeup about using an AVR microcontroller as an RFID tag. Since then, it&#8217;s been great to see many people pick up this code and build their own DIY RFID tags. In my original project, I was just interested in using an AVR as a way of emulating any [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.nycresistor.com/2012/12/27/rfid-multipass/"><img
class="aligncenter size-large wp-image-2303" title="Trammell's tiny AVRFID card with reader" src="http://scanlime.org/wp-content/uploads/2012/12/8276683178_24909cb6a9_k-640x480.jpg" alt="" width="640" height="480" /></a></p><p>Way back in 2008, I posted a writeup about <a
href="http://scanlime.org/2008/09/using-an-avr-as-an-rfid-tag/">using an AVR microcontroller as an RFID tag</a>. Since then, it&#8217;s been great to see many people pick up this code and build their own DIY RFID tags.</p><p>In my original project, I was just interested in using an AVR as a way of emulating any tag protocol I wanted, even proprietary protocols like the HID cards that are so common for door entry. But a general purpose microcontroller really lends itself to making even more interesting tags. For example, imagine an action figure that has different poses which trigger microswitches that can be read by the AVR. It could report a different RFID code depending on which pose the action figure is in. This kind of very low-power physical computing is really interesting to me.</p><p>Trammell Hudson recently took a big step in this direction, in the name of creating a &#8220;multipass&#8221; card which could stay in his pocket and pretend to be any number of other cards. His original idea didn&#8217;t quite work out, due to limitations in the HID readers. But along the way, he created an optimized version of the AVRFID firmware which uses much less flash memory, and he ported it to C so that it can be more easily extended and modified.</p><p>He made this posible by very carefully choosing the instructions in the inner loops, creating a state machine that just barely fits within the available clock cycles:</p><blockquote><p>One issue with programming HID Prox compatible cards is that the AVR’s <tt>RCALL</tt> and <tt>RET</tt> instructions are quite slow — <a
href="http://www.atmel.com/images/doc0856.pdf">3 and 4 clocks respectively</a> — so making a function call and returning from it requires seven clocks and would cause errors in the RF waveform. To get around this, Beth expanded all of the code inline to produce a single function that bit-bangs the coil loading with <tt>NOP</tt>‘s between each cycle. The 20-bit manufacturer ID (<tt>0x01002</tt>), 8-bit faciity code and 16-bit unique ID, all <a
href="http://en.wikipedia.org/wiki/Manchester_code">Manchester encoded</a>, required 80 instructions per bit for a total of 3700 instructions out of the Tiny85′s maximum of 4096. Supporting 34-bit cards would not be possible with this design, much less multiple card IDs!</p><p>While <tt>RCALL/RET</tt> are out of the question, I noticed that <tt>IJMP</tt> is only 2 clocks. This means that the CPU can do an indirect jump to the value in the 16-bit <tt>Z</tt> register in enough time to be ready for the next FSK cycle. If we know where to go, that is… The <tt>LPM</tt> instruction takes three cycles to read a byte from flash into a register, which just barely fits during the idle time during a FSK baseband one. Loading the Z register for <tt>LPM</tt> takes at least two clocks (since it is really the two 8-bit registers <tt>r31:r30</tt>), which means the <tt>pgm_read_word()</tt> macro in <a
href="http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html"><tt>avr/progmem.h</tt></a> won’t work. While the rest of the firmware is in mostly normal C, I resorted to writing assembly to interleave the coil toggling with the operations to determine the next output state and make the appropriate jump. If you want to follow along, the source for the RFID firmware is available in <a
href="https://bitbucket.org/hudson/rfid/src/0ef4c3636f0a/avrfid2.c?at=default"><tt>rfid/avrfid2.c</tt></a>.</p></blockquote><p>His post covers a lot of ground, including how to connect an off-the-shelf HID card reader to a computer, and how to repeatedly program the AVR using a <a
href="http://dangerousprototypes.com/docs/Bus_Pirate">Bus Pirate</a>.</p><p><a
href="http://www.nycresistor.com/2012/12/27/rfid-multipass/">Go check out the full article already!</a></p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2012/12/avr-rfid-optimized-and-ported-to-c/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How we built a Super Nintendo out of a wireless keyboard</title><link>http://scanlime.org/2012/12/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard/</link> <comments>http://scanlime.org/2012/12/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard/#comments</comments> <pubDate>Wed, 05 Dec 2012 16:28:01 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Portfolio]]></category> <category><![CDATA[Projects]]></category> <category><![CDATA[graphics]]></category> <category><![CDATA[guest-post]]></category> <category><![CDATA[microcontroller]]></category> <category><![CDATA[virtualization]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2275</guid> <description><![CDATA[This is a guest article I wrote for Adafruit, on the story of how we built the hardware behind the new Sifteo Cubes, our second generation of a gaming platform that's all about tactile sensation and real, physical objects.]]></description> <content:encoded><![CDATA[<p><a
href="http://www.adafruit.com/blog/2012/12/05/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard-sifteo-sifteo/"><img
src="http://scanlime.org/wp-content/uploads/2012/12/siftulator-20120730-004344-640x393.png" alt="" width="640" height="393" class="aligncenter size-large wp-image-2283" /></a></p><p>I wrote a guest article for <a
href="http://www.adafruit.com/blog/">Adafruit</a> about <a
href="http://www.adafruit.com/blog/2012/12/05/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard-sifteo-sifteo/">the story behind the new Sifteo cubes</a>:</p><blockquote><p>In today&#8217;s world, video game consoles have become increasingly complex virtual worlds unto themselves. Shiny, high polygon count, immersive, but ultimately indirect. A video game controller is your gateway to the game&#8217;s world&mdash;but the gateway itself can be a constant reminder that you&#8217;re outside that world, looking in.</p><p><a
href="http://en.wikipedia.org/wiki/File:MOS_Technologies_large.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/12/mos6502.jpeg" width="300" height="215" alt="" title="A section of the C-64 motherboard, showing the 6510 CPU" class="alignright" /></a>Likewise, the technology in these game consoles has become increasingly opaque. Decades ago, platforms like the <a
href="http://en.wikipedia.org/wiki/Commodore_64">Commodore 64</a> encouraged tinkerers and do-it-yourselfers of all kinds. You could buy commercial games, sure, but the manual that shipped with the C-64 also told you what you needed to know to make your own games, tools, or even robots. The manual included a full schematic, the components were in large through-hole packages, and most of them were commonly-available chips with published data sheets.</p><p>Fast forward three decades. Today&#8217;s video game consoles are as powerful and as complex as a personal computer, with elaborate security systems designed specifically to keep do-it-yourselfers out. They contain dozens of customized or special-purpose parts, and it takes some serious wizardry to do anything with them other than exactly what the manufacturer intended. These systems are <em>discouragingly</em> complicated. It&#8217;s so hard to see any common link between the circuits you can build at home, and the complex electrical engineering that goes into an Xbox 360 or Playstation 3.</p><p>We wanted to build something different. Our platform has no controller, no television. The system itself <em>is</em> the game world. To make this happen, we had to take our engineering back to basics too. This is a game platform built using parts that aren&#8217;t fundamentally different from the <a
href="http://arduino.cc/">Arduino</a> or <a
href="http://leaflabs.com/devices/">Maple</a> boards that tens of thousands of makers are using right now.</p><p><a
href="http://sifteo.com/"><img
src="http://scanlime.org/wp-content/uploads/2012/12/domino_cubes.jpeg" width="435" height="250" alt="" title="The Sifteo Base and three cubes" class="aligncenter" /></a><p>This is the story of how we built the hardware behind the new <a
href="http://sifteo.com/">Sifteo Cubes</a>, our second generation of a gaming platform that&#8217;s all about tactile sensation and real, physical objects.</p></blockquote><p><a
href="http://www.adafruit.com/blog/2012/12/05/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard-sifteo-sifteo/">Read the full article at Adafruit</a>.</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2012/12/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hacking My Vagina</title><link>http://scanlime.org/2012/11/hacking-my-vagina/</link> <comments>http://scanlime.org/2012/11/hacking-my-vagina/#comments</comments> <pubDate>Sat, 24 Nov 2012 18:48:47 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Sex Toys]]></category> <category><![CDATA[arduino]]></category> <category><![CDATA[cc2500]]></category> <category><![CDATA[microcontroller]]></category> <category><![CDATA[mini-project]]></category> <category><![CDATA[reverse engineering]]></category> <category><![CDATA[sonar]]></category> <category><![CDATA[toys]]></category> <category><![CDATA[wireless]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2091</guid> <description><![CDATA[To me, a good sex toy helps form feedback loops. It doesn't get in the way. A good toy gives you simple ways of exchanging signals with a partner or with your own body. It acts as a conduit. A good sex toy is analog.]]></description> <content:encoded><![CDATA[<h1>Making a Vibrator That Listens to Your Body</h1><p>This project has been an astonishing little journey. Many of my <a
href="http://scanlime.org/portfolio/">previous projects</a> were characterized by an amazing outpouring of effort to build something <a
href="http://scanlime.org/2009/09/dsi-ram-tracing/">highly intricate</a> and <a
href="http://scanlime.org/2008/02/3d-graphics-at-vmware/">ultimately invisible</a>.</p><p>This is the opposite kind of project. A little bit of work and a little custom design to create something new and exciting that I can immediately use in my everyday life. It also happens to be a sex toy.</p><p>In other words, I wanted to hack something I actually use: my vagina.</p><h1>The Inspiration</h1><p>I love feedback loops. Servo motors, thermostats, op-amps, DC-DC converters, social networks, flocking behavior. Our bodies. Massages, cuddling, sex– these are all ways of bringing a partner into your body&#8217;s most fun closed-loop systems.</p><p>To me, a good sex toy helps form feedback loops. It doesn&#8217;t get in the way. A good toy gives you simple ways of exchanging signals with a partner or with your own body. It acts as a conduit. A good sex toy is analog.</p><p>I was in the market for a remote-controlled vibrator recently, and I ended up with <a
href="http://www.amazon.com/LELO-Lyla-Cerise-Wireless-Remote/dp/B005HRCL5S">LELO&#8217;s <em>Lyla</em> vibe</a>:</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe1.jpg"><img
class="aligncenter size-large wp-image-2094" title="The original unmodified vibrator" src="http://scanlime.org/wp-content/uploads/2012/11/vibe1-640x480.jpg" alt="" width="640" height="480" /></a>(<b>Update:</b> LELO was nice enough to send me their updated model, the <a
href="http://www.lelo.com/index.php?collectionName=insignia-luxe&#038;groupName=LYLA-2">Lyla 2</a>, which also works with this remote. The Lyla, Lyla 2, and Tiani 2 are all known to use the same radio protocol.)</p><p>There are some things I really like about this toy. The vibrator itself is reasonably strong, rechargeable, waterproof, and quite comfortable. I was much less happy with the remote. The radio range was rather lackluster, and using the controls made me feel more like I was programming a VCR (remember those?) than having sex.</p><p>The optional accelerometer input on the remote was a good idea, but I feel like the execution leaves much to be desired. The controls are laggy, and controlling the vibrator by tilting the controller never really felt right to me.</p><p>So, naturally, I wanted to see if I could do better. I really had no idea where the project would go.</p><h1>Choosing a Sensor</h1><p><a
href="http://learn.parallax.com/KickStart/28015"><img
class="alignright size-medium wp-image-2156" style="padding: 0 0 0 10px;" title="The Parallax Ping sonar sensor" src="http://scanlime.org/wp-content/uploads/2012/11/Ping-2-300x123.png" alt="" width="300" height="123" /></a>My early prototype used a simple knob attached to a variable resistor, and that already seemed like a big improvement over the original LELO remote. I wanted to build a simple proof-of-concept remote that would just demonstrate the improved radio range and responsiveness, without doing anything particularly fancy. After that, I planned to dabble in more esoteric input devices. Audio spectra, conductive fabric, capacitive sensors embedded in lingerie, and so on. The <a
href="https://github.com/scanlime/arduino-lelo-remote/tree/master/LeloRemote">Arduino library</a> I ended up writing for this project offers some great opportunities for further tinkering.</p><p>But I was rummaging through my sensor drawer, and thought: Why not sonar? A few quick tests, and it seemed more than responsive enough. And for myself, often lazy about mechanical things, a small sensor with no moving parts was much easier to build a robust prototype around.</p><h1>Invisible Walls</h1><p>At first, the benefits seemed pretty easy to understand. It was hands-free. This meant that, unlike the original remote, it doesn&#8217;t need a bright pink silicone jacket to stay clean. Well that sounds convenient. Then I start to play with it more, and I discover something really unique about this configuration.</p><p><a
href="http://www.vrealities.com/hapticworkstation.html"><img
src="http://scanlime.org/wp-content/uploads/2012/11/hap-300x281.jpg" alt="" title="In the future, our robot overlords will hold virtual reality fashion shows." width="300" height="281" class="alignright size-medium wp-image-2201" /></a>Something about this toy really does become more than the sum of its parts. More than a simple remote control, it starts to feel a little like virtual reality. <a
href="http://en.wikipedia.org/wiki/Haptic_technology">Haptic technology</a>, it&#8217;s called. Interfacing with computers through our sense of touch.</p><p>This toy serves as a kind of analog bridge between two remote spaces: the column of ultrasonically-oscillating air in front of the remote, and whatever body part happens to be in contact with the vibrator. Touch that invisible space above the remote, and the vibrator touches you.</p><p>In fact, it does start to feel like there&#8217;s a palpable object in space above the remote&#8217;s sensors. Move your body close to it, and it reacts. Press into it lightly, or tease the edges. Flick your hand through it, or make graceful waves back and forth. You can use your whole body to touch it, almost like a big fuzzy vibrating cone floating in air.</p><p>If the sensor can see your body&#8217;s rhythms, it responds in kind, effortlessly synchronizing to its frequency. This is exactly the sort of closed-loop control I was after.</p><p>You can even use multiple vibrators. There&#8217;s no unique address or channel assigned to a particular vibrator, so any vibes that are turned on and within radio range will respond.</p><p>So, what does it look like?</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe54.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe54-640x480.jpg" alt="" title="The sonar remote prototype" width="640" height="480" class="aligncenter size-large wp-image-2148" /></a>The two black circles are ultrasonic transducers. One of them transmits short &#8220;chirps&#8221; at a frequency too high for humans to hear. The other listens for echoes. The 4-digit display gives another satisfying bit of feedback, in visceral high-contrast blue LED light. The external antenna gives it quite a bit more radio range than the original remote, and the exposed serial port on the left makes it easy to reprogram the remote using the <a
href="http://arduino.cc">Arduino IDE</a>.</p><p>You can get an idea for how the prototype works in this <a
href="http://youtu.be/QhXoYcwsEVI">short video</a>:</p><p><iframe
width="640" height="360" src="http://www.youtube-nocookie.com/embed/QhXoYcwsEVI?rel=0" frameborder="0" allowfullscreen></iframe></p><p>That&#8217;s the end result, for now. The rest of this post will share the journey I took in building this toy. Perhaps it will inspire you to follow along, or to build something unique.</p><h1>Reverse Engineering</h1><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe5.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe5-300x225.jpg" alt="" title="Looking for clues in the FCC database" width="300" height="225" class="alignright size-medium wp-image-2171" /></a>In order to replace the original remote control, first I had to understand it. My first stop was the <a
href="http://transition.fcc.gov/oet/ea/fccid/">FCC ID database</a>, to see if they had any info that would help me know if it was even worthwhile to crack the remote open. I was in luck. The internal photos clearly showed an MSP430 microcontroller and CC2500 radio. Hackability was looking good so far.</p><p>The <a
href="http://www.ti.com/lit/ds/symlink/cc2500.pdf">CC2500</a> is a really nice configurable 2.4 GHz radio and modem chip with an SPI interface. It&#8217;s part of a line of highly integrated radios made by Chipcon, now owned by Texas Instruments. They&#8217;re quite similar to the competing <a
href="http://www.nordicsemi.com/eng/nordic/content_download/2730/34105/file/nRF24L01_Product_Specification_v2_0.pdf">nRF24L01</a> radio made by Nordic Semiconductor. The CC2500 also has a popular sub-1 GHz sibling, the <a
href="http://www.ti.com/lit/ds/symlink/cc1100.pdf">CC1100</a>. This chip was featured in the <a
href="http://greatscottgadgets.com/tc14badge/">ToorCon 14</a> badge, and the imminently hackable <a
href="http://hackaday.com/tag/im-me/">IM-ME</a> toy.</p><p>I wouldn&#8217;t even bother with trying to read or reprogram the original microcontroller. By sniffing this SPI bus, I could reverse engineer the proper radio settings and protocol to use. Then I could wire up any CC2500 to any microcontroller I want, and control the vibrator over the air.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe7.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe7-300x225.jpg" alt="" title="Prying the plastic shell open with a hobby knife" width="300" height="225" class="alignright size-medium wp-image-2100" /></a>Unfortunately, opening the remote turned out to be somewhat messier. The pink silicone jacket is glued to the white plastic shell, and I failed to remove it without tearing the fragile silicone. I soon discovered that the shell itself was also glued shut, and it required quite a lot of cutting and prying to open. I was willing to sacrifice this remote for science, but I really wouldn&#8217;t advise ever opening one of these if you want it to stay nice and watertight.</p><p>Once I had the remote open and the circuit board extracted, I started making a test jig. I&#8217;ll often do this by using a short length of snappable 0.1&#8243; headers as a mechanical anchor. I solder it to some big sturdy pads on the PCB. In this case, I used the pads for the battery contacts. Then, I break out <a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe13.jpg">the microscope</a> and run thin AWG 32 magnet wire from the headers to whatever I want to probe. In this case, I wanted the SPI bus. I also replaced the original remote&#8217;s small vibrator motor with an LED, so I could see when it was on without it shaking my whole setup.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe14.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe14-640x437.jpg" alt="" title="Fully prepped PCB from the original remote" width="640" height="437" class="aligncenter size-large wp-image-2107" /></a>At this point there are all sorts of options for snooping on the communications between these radio and microprocessor. If you have room in your budget and toolbox for a special-purpose device, Total Phase makes a pretty sweet little <a
href="http://www.totalphase.com/products/beagle_ism/">SPI and I2C sniffer</a> device. There are logic analyzers like the <a
href="http://www.saleae.com/logic/">Saleae Logic</a>, and open source tools like the <a
href="http://dangerousprototypes.com/docs/Logic_Shrimp_logic_analyzer">Logic Shrimp</a>.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe15.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe15-300x300.jpg" alt="" title="Quick and dirty SPI tracer" width="300" height="300" class="alignright size-medium wp-image-2187" /></a>Unfortunately, I had none of these handy. My Saleae Logic was far away, and my trusty <a
href="http://www.bitscope.com/">Bitscope</a> isn&#8217;t really that helpful for protocol reverse engineering once you get above the physical layer. So, I improvised. Often in this situation I&#8217;ll break out something like the <a
href="http://www.knjn.com/FPGA-FX2.html">Saxo</a> board, with an FPGA and a thick USB 2.0 pipe. In this case, I was dealing with low enough data rates that I could do something even simpler. I plugged the remote into my <a
href="http://www.parallax.com/tabid/768/ProductID/340/Default.aspx">Propeller Demo Board</a> and wrote a <a
href="https://github.com/scanlime/arduino-lelo-remote/blob/master/notes/spi-sniffer.spin">quick program</a> to capture the SPI traffic and send it back in ASCII over the serial port.</p><p>The <a
href="https://github.com/scanlime/arduino-lelo-remote/tree/master/notes">full traces</a> are available in Git. I was looking for two kinds of traffic: an initialization sequence for the radio, and SPI transfers which actually transmitted packets over the radio. I was also keeping my eye out for any clues as to how complex the protocol was. Do I need to pair with the vibrator? Exchange keys? Search for a radio channel to use?</p><p>When the remote turns &#8220;off&#8221;, it&#8217;s actually entering a low-power standby mode. It doesn&#8217;t fully shut down the radio in this mode, it just sends a standby command. As a result, waking up the remote doesn&#8217;t fully initialize the radio. To capture a complete init sequence, I would cut and reapply power, as if fresh batteries were just inserted. When I did this, I was greeted with a nice burst of configuration traffic:</p><pre>    300F            SRES        Strobe: Soft reset
    0B0F 0A0F       FSCTRL1     IF frequency of 253.9 kHz
    0C0F 000F       FSCTRL0     No frequency offset (default)
    0D0F 5D0F       FREQ2       FREQ = 0x5d13b1 = 2420 MHz
    0E0F 130F       FREQ1
    0F0F B10F       FREQ0
    100F 2D0F       MDMCFG4     CHANBW = 541.666 kHz
    110F 3B0F       MDMCFG3     DRATE = 249.94 kBaud
    120F 730F       MDMCFG2     MSK modulation, 30/32 sync word bits
    130F 220F       MDMCFG1     FEC disabled, 2 preamble bytes
    140F F80F       MDMCFG0     CHANSPC = 199.951 kHz
    ...
</pre><p>The hex numbers on the left come from the SPI sniffer. The text to the right is my own annotation, starting with the name of the radio register in question. Each line is one SPI transaction, and each group of four digits represents one byte going across the SPI bus. The first two digits are command data from the microcontroller (MOSI), the last two digits are the radio&#8217;s simultaneous response byte (MISO).</p><p>The log continues on like this a bit longer, but you can already see the most important radio parameters: A base frequency of 2.420 GHz, <a
href="http://en.wikipedia.org/wiki/Minimum-shift_keying">MSK modulation</a>, 250 kBps data rate.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/cc2500-block-diagram.png"><img
src="http://scanlime.org/wp-content/uploads/2012/11/cc2500-block-diagram-300x194.png" alt="" title="CC2500 block diagram" width="300" height="194" class="alignright size-medium wp-image-2206" /></a>When I looked at the SPI trace for waking the remote up from sleep, I was greeted with a rather large red herring. It spends some time scanning ten different channels, numbered 0 through 9. This represents 2 MHz of spectrum. On each channel, it spends some time polling the Received Signal Strength Indication (RSSI) register. Is it listening to see if the channel is clear? Is it searching for other remotes? Listening for an initialization sequence from the vibrator?</p><p>As far as I can tell, none of these things are true. I&#8217;ve never seen the vibrator transmit or the remote receive, which rules out any kind of pairing sequence. To verify this, you can turn on a vibrator while the remote is already transmitting. The vibrator picks up the signal and starts moving, without any change to the remote&#8217;s routine. The original remote will even control multiple vibrators happily. There seems to be no pairing sequence at all: the address and radio channel are both hardcoded. Why scan through channels then? It feels like either a vestige of some library code the folks at LELO adopted. Or maybe it&#8217;s scaffolding for future functionality. Either way, it doesn&#8217;t seem to matter for the vibrators I have.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/packet-tx.png"><img
src="http://scanlime.org/wp-content/uploads/2012/11/packet-tx-300x167.png" alt="" title="Scope trace of the original remote&#039;s CC2500 chip-select signal" width="300" height="167" class="alignright size-medium wp-image-2207" /></a>How about the actual packets? Well, they also seem to have a lot of vestigial content. It&#8217;s possible this is LELO being super clever and leaving room for future products to be protocol-compatible. Or it&#8217;s possible they just hacked together all the example code they could find until they had a working product. It&#8217;s hard to say.</p><p>The original remote transmits packets packets at a measly 9 Hz. This low update rate most definitely contributes to the laggy feeling and lacking radio range of the original remote. Why so slow? It was probably a battery life tradeoff. The original remote ran off of two AAAs, whereas my replacement is going to have significantly more power available. By transmitting about 10x as often, my remote can achieve much better responsiveness, plus it can tolerate more radio noise by virtue of having a lot more redundancy. Even if many packets are corrupted, quite a few packets are likely to make it through the air unharmed.</p><p>Each packet contains a motor strength update, as an 8-bit number which seems to have a usable range of 0 through 128. The packets themselves always have 9 bytes of payload provided by the microcontroller, plus a CRC and header which is generated by the CC2500 itself. Here&#8217;s the payload of a typical packet:</p><pre>    <b>01 00 A5 28 28 00 00 00 05</b>
             \___/
               Motor Strength</pre><p>In this example, the motor strength is 0&#215;28, or about 30% of full power. I&#8217;m not sure what the other bytes are for. They seem to stay constant, and simply replaying these packets back to the vibrator always seems to work. I&#8217;m also not sure why there are always two copies of the motor power byte. It seems most likely that this is for added redundancy, so that even if the radio is very noisy and there&#8217;s a CRC collision, the vibrator is unlikely to accept a corrupted motor strength byte.</p><p>At this point, I had enough information about the protocol to try and build my own emulation of the original remote. This was before I had ordered any CC2500 breakout boards, so I used the remote itself as a dumb CC2500 radio by holding the original MSP430 microcontroller in reset. This was the setup I used to develop an <a
href="https://github.com/scanlime/arduino-lelo-remote/tree/master/LeloRemote">Arduino library</a> that could configure the CC2500 radio correctly and send packets like the ones above.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe16.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe16-640x412.jpg" alt="" title="vibe16" width="640" height="412" class="aligncenter size-large wp-image-2109" /></a>Now that the <a
href="http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html">yak was bald</a>, I could get on to the really fun part of the project: Designing a better, stronger, faster remote using commonly available parts.</p><h1>Power Exchange</h1><p>At this point, the project was seeming pretty straightforward: Off-the-shelf Arduino, CC2500 breakout board, sonar sensor, and LED display. But how would I power all of this? The sonar and LEDs are both pretty power-hungry, and I would be using the radio much more heavily than the original remote. I would need to budget nearly 100 mA, with 5v rails for the sonar and LED and 3.3v for the radio and Arduino.</p><p><a
href="https://www.sparkfun.com/products/8483"><img
src="http://scanlime.org/wp-content/uploads/2012/11/Batt2AJST-01-L-300x300.jpg" alt="" title="LiPo battery (image from Spark Fun)" width="300" height="300" class="alignright size-medium wp-image-2221" /></a>I certainly could have used AA or AAA batteries. I wanted the mechanical design to be simple and compact, though. Designing my own battery holder would not have been simple, and an off-the-shelf <a
href="http://evilmadscience.com/productsmenu/partsmenu/414-3aabat">plastic battery holder</a> would have been bulky. I even thought about using a flashlight body as a battery holder, but I didn&#8217;t see an elegant way to attach my own mechanical parts to it. Rechargeable batteries come in much more friendly shapes. But now you need a charger.</p><p>This was getting complicated fast. Lithium polymer battery, a boost converter to raise the voltage to 5V for the sonar module, charging circuit, &#8220;fuel gauge&#8221; indicator. All of this work goes into every commercial product that runs on batteries, and we often take it for granted. As far as I&#8217;m aware, though, there isn&#8217;t a great equivalent for quick DIY prototyping. The <a
href="https://www.sparkfun.com/products/10116">Arduino Fio</a> board is close to what I want: an Arduino with a built-in LiPo battery charger. But it doesn&#8217;t have the 5V boost converter or any way of monitoring the battery&#8217;s charge.</p><p>Without designing my own PCB, I&#8217;d need several separate components: <a
href="https://www.sparkfun.com/products/8483">battery</a>, <a
href="https://www.sparkfun.com/products/10617">fuel gauge</a>, <a
href="https://www.sparkfun.com/products/11231">charge/boost</a>. All total, over $45 and a lot more bulk and complexity than I wanted. I was really hoping there was a better option.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe21.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe21-640x426.jpg" alt="" title="vibe21" width="640" height="426" class="aligncenter size-large wp-image-2114" /></a>It so happens that this sort of amalgamation of parts is already pretty commonplace in the form of portable cell-phone chargers. These devices are very little more than a boost converter, charger, lithium battery, and a very basic fuel gauge. Best of all, thanks to economy of scale, they&#8217;re really inexpensive. The <a
href="http://www.amazon.com/SlimTalk-External-Embedded-Micro-USB-Flashlight/dp/B0054VNHSW/">3200 mAH</a> battery I used in this project was only $22, and it&#8217;s something I can reuse for multiple projects&#8230; or even to charge my phone.</p><h1>Bill of Materials</h1><p>This lists the exact parts I used in my prototype, but nearly everything here is commonly available from multiple manufacturers. In particular, many different vendors on eBay usually carry CC2500 breakout boards. Some of these have special features such as nicer antennas or power amplifiers. Keep an eye out for those.</p><ul><li><a
href="https://www.sparkfun.com/products/11114">Arduino Pro Mini (3.3v)</a></li><li><a
href="http://www.ebay.com/itm/Wireless-RF-Transceiver-2-4G-Module-SMA-Antenna-CC2500-Board-2400-2483-5MHz-ISM-/280943727621?ssPageName=ADME:L:OC:US:3160">CC2500 radio module with SMA antenna (eBay)</a></li><li><a
href="http://www.amazon.com/SlimTalk-External-Embedded-Micro-USB-Flashlight/dp/B0054VNHSW/">Anker SlimTalk external battery pack</a></li><li><a
href="http://www.parallax.com/tabid/768/ProductID/92/Default.aspx">Parallax <em>Ping</em> ultrasonic distance sensor</a></li><li><a
href="https://www.sparkfun.com/products/9765">SparkFun serial 7-segment LED display</a></li><li>Printed plastic enclosure</li><li>Two M3x16 bolts and nuts (<b>Update:</b> The latest design <a
href="https://github.com/scanlime/arduino-lelo-remote">in GitHub</a> uses M3x25 bolts instead.)</li><li>PCB-mount USB type A plug (These can be recycled from older USB thumb drives, or <a
href="https://www.sparkfun.com/products/437">buy them new</a>.)</li><li>Thin hookup wire (I used Kynar-insulated AWG 30 wire-wrapping wire)</li><li>Snappable 0.1&#8243; headers</li><li>2-part epoxy or plastic adhesive</li></ul><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe19.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe19-640x374.jpg" alt="" title="vibe19" width="640" height="374" class="aligncenter size-large wp-image-2112" /></a><br
/> That&#8217;s it for the list of <a
href="http://reprap.org/wiki/Category:Vitamin">vitamins</a> we&#8217;ll need to make the remote. There is no &#8220;main&#8221; PCB for this project. The small boards are all held in place by a custom-designed plastic enclosure.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe31.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe31-300x132.jpg" alt="" title="vibe31" width="300" height="132" class="alignright size-medium wp-image-2124" /></a>At this point, I did a little bit of preparation on the Arduino by soldering the FTDI-compatible serial header, and disabling the pin-13 LED by desoldering its current limiting resistor. If it was still attached, its glow would be visible through the plastic enclosure. You may also want to remove the LED on the Ping module. I forgot to do this on my prototype, and its blinking is just barely visible through the plastic.</p><h1>Plastics</h1><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe43.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe43-300x224.jpg" alt="" title="vibe43" width="300" height="224" class="alignright size-medium wp-image-2173" /></a>It&#8217;s easy to neglect the non-electronic parts of any electronics project. I&#8217;ve certainly built my share of prototypes that were little more than a bare circuit board. In this project, though, the plastic parts serve multiple purposes: providing a slot for the battery pack, holding the individual circuit boards in place, and providing a smooth exterior that&#8217;s a little less unfriendly to use in the bedroom.</p><p>This seemed like a perfect job for 3D printing. I could make a plastic enclosure that exactly fits each of the circuit boards, and presents the LEDs and sonar transducers nicely while hiding all of the sharp and uncuddly circuitry inside.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe23.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe23-300x221.jpg" alt="" title="vibe23" width="300" height="221" class="alignright size-medium wp-image-2116" /></a>I chose to model the enclosure in <a
href="http://www.blender.org/">Blender</a>, a wonderfully powerful (if somewhat intimidating) open source tool. It takes some care to use Blender for CAD, but I enjoy having such diverse functionality integrated into one package, and the price is right.</p><p>To keep the model as parametric as possible, I modeled the shell and the negative space separately. First, I created meshes for each of the internal parts: The circuit boards, bolts, antenna hole, battery pack, USB connector. These meshes would become the negative space inside the enclosure. I separated them into two layers, for items that would mount to the top and to the bottom half of the case. On the top-half items, I extruded them downward, and the bottom-half items were extruded upward. This leaves the space toward the inside of the case hollow.</p><p>I modeled the outer shell using subdivision surfaces. A chain of boolean modifiers will non-destructively split the case into top and bottom, then carve out all holes. The downside to this technique is that all of the boolean operations can bog down Blender quite a bit. This can be mitigated by keeping your source meshes and your final meshes in different layers. With the final layers hidden, Blender won&#8217;t continuously recalculate them as you edit the source meshes.</p><p>The end result of all this 3D modeling was a set of <a
href="https://github.com/scanlime/arduino-lelo-remote/tree/master/vibeam/plastics">polygonal meshes in STL format</a> for the top and bottom halves of the case:</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/models.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/models-640x227.jpg" alt="" title="3D Models" width="640" height="227" class="aligncenter size-large wp-image-2236" /></a>I used <a
href="http://slic3r.org/">Slic3r</a> to convert the polygon models into G-code, a simple language that defines the actual tool path used by the printer. This program slices the 3D model into many thin layers. The 3D printer will draw out each layer with a thin filament of molten plastic. After each layer, the nozzle moves up a little and the process repeats.</p><p>This is a visualization of the tool path for just one of these thin layers. The tight zig-zag pattern is a solid fill, but much of the interior is filled with a light-weight honeycomb pattern that saves material and time:</p><p><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe30-539x480.jpg" alt="" title="Tool path visualization for an interior layer on the top half" width="539" height="480" class="aligncenter size-large wp-image-2123" />Over the course of several hours, my printer builds each part up from nothing.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe37.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe37-640x480.jpg" alt="" title="Scanbot at work" width="640" height="480" class="aligncenter size-large wp-image-2130" /></a><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe22.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe22-300x225.jpg" alt="" title="Bottom half, after printing" width="300" height="225" class="alignright size-medium wp-image-2175" /></a>A tiny bit of post-printing cleanup helps the parts assemble smoothly. A hobby knife makes quick work of the &#8220;brim&#8221; that is added along the bottom of each part to help it stick to the build surface. Since this will be a handheld project, it&#8217;s important to sand any sharp corners.</p><p>I also sanded the entire top face of each model, to eliminate any small bumps that would prevent the two halves from sitting flat against each other. This is a good time to test-fit the pieces with a pair of bolts and nuts. The bolts should go in easily, the nuts should be held in place by the hexagonal holes on the bottom half, and there should be only a very tiny gap between the two halves.</p><h1>Assembly</h1><p>Each component sits in its own custom-fit hole, with some epoxy to hold it in place. All of the components on the bottom half need to be robustly anchored. The radio&#8217;s antenna connector, the battery pack USB plug, and the Arduino&#8217;s serial header will all be subject to some mechanical force during normal use.</p><p>I used a liberal dose of epoxy both under and above the USB plug. The Arduino and Radio boards both have flat backsides, so I put a dab of epoxy underneath both. On the radio, I added some additional dabs of epoxy at the corners near the SMA connector.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe34.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe34-640x392.jpg" alt="" title="vibe34" width="640" height="392" class="aligncenter size-large wp-image-2127" /></a>It&#8217;s probably a good idea to avoid getting any epoxy on the RF components on the front side of the radio, as it may affect the circuit&#8217;s impedances and lead to reduced radio range. Also try to keep it off of anything you&#8217;ll be soldering. Solder won&#8217;t stick to it or burn through it, you&#8217;ll just be left with a mess that you have to scrape off with a hobby knife.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe35.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe35-300x300.jpg" alt="" title="Waiting for the epoxy to set" width="300" height="300" class="alignright size-medium wp-image-2128" /></a>I used the battery pack itself to help line up the USB connector while the epoxy sets. You&#8217;ll notice a little bit of wiggle when the connectors are mated. To make sure the battery pack plugs and unplugs smoothly, make sure that you seat the USB plug such that it&#8217;s pressed all the way to the back of the socket. This will ensure the plug isn&#8217;t stuck at a funny angle.</p><p>The top half assembles in a similar manner. The sonar and LED modules both press into their respective slots. When they&#8217;re all the way in, the front face of the LED module and the front of each sonar transducer should be approximately flush with the front of the enclosure.</p><p>Since these components are largely held in place by the shape of the enclosure, they only need a small amount of epoxy to keep them from sliding out of their holes. Note that the underside of the sonar module is exposed to the battery compartment. Make sure you go easy on the epoxy. Any blobby epoxy or messy wiring could get in the way of the battery pack.</p><p>After the epoxy set, I soldered everything up point-to-point style with wire-wrapping wire:</p><table><tr><th>Module</th><th>Pin</th><th>↔</th><th>Module</th><th>Pin</th></tr><tr><td>USB Plug</td><td>GND</td><td></td><td>Arduino</td><td>GND</td></tr><tr><td>USB Plug</td><td>+5v</td><td></td><td>Arduino</td><td>RAW</td></tr><tr><td>Arduino</td><td>GND</td><td></td><td>CC2500</td><td>GND</td></tr><tr><td>Arduino</td><td>VCC (+3.3v)</td><td></td><td>CC2500</td><td>VCC</td></tr><tr><td>Arduino</td><td>10</td><td></td><td>CC2500</td><td>CSN (SS)</td></tr><tr><td>Arduino</td><td>11</td><td></td><td>CC2500</td><td>SI (MOSI)</td></tr><tr><td>Arduino</td><td>12</td><td></td><td>CC2500</td><td>SO (MISO)</td></tr><tr><td>Arduino</td><td>13</td><td></td><td>CC2500</td><td>SCK</td></tr><tr><td>Arduino</td><td>GND</td><td></td><td>LED</td><td>GND</td></tr><tr><td>Arduino</td><td>RAW (+5v)</td><td></td><td>LED</td><td>VCC</td></tr><tr><td>Arduino</td><td>3</td><td></td><td>LED</td><td>RX</td></tr><tr><td>Arduino</td><td>GND</td><td></td><td>Ping</td><td>GND</td></tr><tr><td>Arduino</td><td>RAW (+5v)</td><td></td><td>Ping</td><td>5V</td></tr><tr><td>Arduino</td><td>4</td><td></td><td>Ping</td><td>SIG</td></tr></table><p>There will be six wires running between the top and bottom half. It&#8217;s okay to leave these a little bit long; there will be room to fold them up in the hollow space above the LED module.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe50.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe50-640x480.jpg" alt="" title="vibe50" width="640" height="480" class="aligncenter size-large wp-image-2144" /></a></p><h1>Firmware Time</h1><p>Bolt the enclosure together, making sure the wires end up in the hollow area instead of pinched in the edges of the controller. Now it&#8217;s ready for some firmware! The <a
href="https://github.com/scanlime/arduino-lelo-remote/blob/master/vibeam/vibeam.ino">Arduino sketch</a> is in the project&#8217;s <a
href="https://github.com/scanlime/arduino-lelo-remote">GitHub repository</a>.</p><p>I designed the enclosure to work with common <a
href="https://www.sparkfun.com/products/9717">3.3v FTDI cables</a>. The programming slot is probably a bit too narrow for the <a
href="https://www.sparkfun.com/products/9873">FTDI Basic</a>, but perhaps it works. I already had a <a
href="http://www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/ProductID/398/List/1/Default.aspx?SortField=ProductName,ProductName">Prop Plug</a> handy, so I&#8217;ve been using that with a simple passive adaptor.</p><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe52.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe52-640x480.jpg" alt="" title="vibe52" width="640" height="480" class="aligncenter size-large wp-image-2146" /></a>The firmware is currently pretty basic. It takes sonar measurements as fast as it can, feeding those into a median filter. Median filters are a little bit magical when it comes to discarding outliers from noisy-ish data. There&#8217;s a smidgen of state machinery to manage the &#8220;lock&#8221; mode. Finally, it scales the distance reading to a motor power level and sends packets to the radio and LED modules about 80 times a second.</p><h1>The Next Thing</h1><p><a
href="http://scanlime.org/wp-content/uploads/2012/11/vibe45.jpg"><img
src="http://scanlime.org/wp-content/uploads/2012/11/vibe45-139x300.jpg" alt="" title="Yep, that&#039;s the whole thing" width="139" height="300" class="alignright size-medium wp-image-2139" /></a>Where to go from here? Well, there is certainly room for improvement in the firmware. For different kinds of play, it may make sense to have different scaling algorithms for converting distance to intensity. I&#8217;m interested in making the firmware more versatile, but not at the expense of reducing its intuitive quality. The &#8220;Lock&#8221; mode is already way too unintuitive for my tastes. Perhaps an additional flavor of user interface, via an accelerometer or <a
href="https://www.sparkfun.com/search/results?term=softpot&#038;what=products">SoftPot</a> would help.</p><p>But honestly, the thing I&#8217;m most excited about improving isn&#8217;t even technical. In some ways, this kind of toy feels like a musical instrument. It is a simple machine with very few inputs, but it interacts with your body in such a way that it opens up a broad array of techniques that can each be mastered. I&#8217;m looking forward to spending more time with it and learning how to play.</p><p>I&#8217;ve already been thinking about the vast array of other sensing technologies that may be applicable for sex toys that support your own feedback loops instead of obstructing them. What if you could use a Kinect camera to remotely detect even your body&#8217;s subtler rhythms? Imagine using a <a
href="http://en.wikipedia.org/wiki/Phase-locked_loop">phase-locked loop</a> to not just synchronize with your motion, but <em>predict</em> it. The PLL could compensate for all of the system&#8217;s lag, including the mechanical lag in the vibrator motor.</p><p>There could be a lot more to electronic sex toys than just a battery and a motor. I want the future to be full of toys that know how to play.</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2012/11/hacking-my-vagina/feed/</wfw:commentRss> <slash:comments>167</slash:comments> </item> <item><title>Sifteo and San Francisco</title><link>http://scanlime.org/2011/11/sifteo-and-san-francisco/</link> <comments>http://scanlime.org/2011/11/sifteo-and-san-francisco/#comments</comments> <pubDate>Sat, 26 Nov 2011 10:36:10 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Personal]]></category> <category><![CDATA[Work]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2072</guid> <description><![CDATA[Moving to The City, starting a new job at Sifteo, and a month-long trip to Thailand!]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve been following me <a
href="https://twitter.com/#!/scanlime">on Twitter</a> you&#8217;ve probably noticed I&#8217;m not dead yet, despite the extreme silence on this blog lately. Well, possibly I just turned into a really inanely chatty zombie. But either way, I haven&#8217;t been cranking out awesome projects like mad. What gives??</p><p>First big event: this past July, I moved to San Francisco. Having grown up in the suburbs all my life, I&#8217;ve always wanted to live in a big city. So, I decided to pull up roots a bit and make that happen. So far, I feel like it&#8217;s one of the best decisions I could have made. If you also happen to live in SF, drop me a line. I&#8217;d love to meet, perhaps for an IPA or Trippel at <a
href="http://maps.google.com/maps/place?q=Toronado,+547+Haight+Street,+San+Francisco,+CA+94117-3406,+United+States&#038;hl=en&#038;cid=14952440980636118476">Toronado</a> or a fantastic soy latte at <a
href="http://maps.google.com/maps/place?q=Ritual+Coffee+Roasters,+1026+Valencia+Street,+San+Francisco,+CA+94110,+United+States&#038;hl=en&#038;cid=7742604836892468051">Ritual</a>.</p><p><img
src="http://scanlime.org/wp-content/uploads/2011/11/6018394339_cb269c3a8a_b-640x480.jpg" alt="" title="6018394339_cb269c3a8a_b" width="640" height="480" class="aligncenter size-large wp-image-2075" /></p><p>Then, a bit of a career shift. For the past six years, I&#8217;ve done a variety of operating systems, graphics, USB, and Bluetooth work at VMware. It&#8217;s been awesome, and I had the chance to build some great things there that I still get to use every day when I run VMware Fusion. But it was time for a change. I really wanted to work at a startup, and do something more hardware-focused.</p><p>So, very shortly after moving to SF, I got a job with <a
href="http://sifteo.com">Sifteo</a>, makers of the adorable little gaming cubes that <a
href="https://www.sifteo.com/press">everybody loves</a>. I arrived at the company shortly before their cubes went to market, so I didn&#8217;t have much time to influence that product much, but I&#8217;ve been having a fantastic time doing future R&#038;D work for them lately. We have some seriously fantastic stuff in store, and I can&#8217;t wait until I can share it with everyone.</p><p><img
src="http://scanlime.org/wp-content/uploads/2011/11/sifteo_chroma_shuffle_4800-640x312.jpg" alt="" title="sifteo_chroma_shuffle" width="640" height="312" class="aligncenter size-large wp-image-2077" /></p><p>And finally, as if that were too few New Things, I&#8217;m now one week in to a month-long trip to Thailand! I&#8217;m loving it so far. I discovered that I totally suck at trip logs, but luckily my travelling companion is a rather awesome amateur photographer, and he&#8217;s been keeping a blog at <a
href="http://numist.net/">numist.net</a>.</p><p><img
src="http://scanlime.org/wp-content/uploads/2011/11/57mx-640x263.png" alt="" title="57mx" width="640" height="263" class="aligncenter size-large wp-image-2080" /></p><p>With any luck, after I get back to the states I&#8217;ll have some more time for personal projects. Perhaps I&#8217;ll even get a chance to finish something I started.</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2011/11/sifteo-and-san-francisco/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>X-10 SmartRemote</title><link>http://scanlime.org/2011/07/x-10-smartremote/</link> <comments>http://scanlime.org/2011/07/x-10-smartremote/#comments</comments> <pubDate>Sun, 17 Jul 2011 03:15:07 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[Projects]]></category> <category><![CDATA[microcontroller]]></category> <category><![CDATA[old-project]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2055</guid> <description><![CDATA[I&#8217;m not even sure why I built this at all. I guess I did always have a childhood fascination with making things that seemed professional in some way. A simulacrum of some expensive piece of A/V equipment, or simple computer games that came in a shoe box with construction-paper cover art. This is another ancient [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m not even sure why I built this at all. I guess I did always have a childhood fascination with making things that seemed professional in some way. A simulacrum of some expensive piece of A/V equipment, or simple computer games that came in a shoe box with construction-paper cover art.</p><p>This is another ancient project I dug up during my recent move to San Francisco: A rather gigantic &#8220;smart&#8221; remote control for X-10 home automation devices.</p><p>I&#8217;m only posting this because it seems cute in some ways&#8230; like finding one of your childhood finger-paintings. But it was really an awful project in pretty much every way. It was over-engineered, terrible at the job it was designed to do, and of course the battery life was pretty bad.</p><p>The extremely clunky user interface is based on a numeric keypad recycled from a very old television set, and a 16&#215;2 alphanumeric LCD. The X-10 codes are transmitted via a reverse-engineered &#8220;Firecracker&#8221; board. A Basic Stamp 2 controls it all. This is one of my earlier microcontroller projects, from way back in 1999.</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921077038/" title="SmartRemote, Power Off" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6138/5921077038_a690ff1dd0_z.jpg" alt="SmartRemote, Power Off" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5920516143/" title="Closeup of SmartRemote Submenu (Oblique)" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6029/5920516143_aa8356064e_z.jpg" alt="Closeup of SmartRemote Submenu (Oblique)" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921079728/" title="SmartRemote keypad" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6004/5921079728_a0e6fe488e_z.jpg" alt="SmartRemote keypad" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921081670/" title="SmartRemote back, battery exposed" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6008/5921081670_c84e9d771d_z.jpg" alt="SmartRemote back, battery exposed" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921082132/" title="SmartRemote internals, top half" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6130/5921082132_7cabe56401_z.jpg" alt="SmartRemote internals, top half" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921083104/" title="SmartRemote X-10 Firecracker detail" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6131/5921083104_e62125735d_z.jpg" alt="SmartRemote X-10 Firecracker detail" class="" title="" longdesc="" /></a>&nbsp;</p><p><a
href="http://www.flickr.com/photos/micahdowty/5921082814/" title="SmartRemote Basic Stamp detail" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6013/5921082814_d9a1f84792_z.jpg" alt="SmartRemote Basic Stamp detail" class="" title="" longdesc="" /></a>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2011/07/x-10-smartremote/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Kiwi</title><link>http://scanlime.org/2011/07/kiwi/</link> <comments>http://scanlime.org/2011/07/kiwi/#comments</comments> <pubDate>Sun, 10 Jul 2011 02:22:01 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[PicoGUI]]></category> <category><![CDATA[big-project]]></category> <category><![CDATA[embedded]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[nostalgia]]></category> <category><![CDATA[old-project]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2036</guid> <description><![CDATA[Another nostalgic post about an old project that I&#8217;m purging from my closet&#8230; This time from late-1999 through mid-2000. The Kiwi was a rather ambitious built-from-scratch Linux PDA that I spent my high school years on. My original goal for this project was reminiscent of the One Laptop Per Child project. I liked typing my [...]]]></description> <content:encoded><![CDATA[<p>Another nostalgic post about an old project that I&#8217;m purging from my closet&#8230; This time from late-1999 through mid-2000.</p><p>The Kiwi was a rather ambitious built-from-scratch Linux PDA that I spent my high school years on. My original goal for this project was reminiscent of the <a
href="http://laptop.org/">One Laptop Per Child</a> project. I liked typing my notes, but of course laptops were prohibitively expensive. I wanted to design a very simple PDA, with a keyboard, that I could sell to my classmates for $100 a unit.</p> <a
href="http://www.flickr.com/photos/micahdowty/5920009823/" title="Kiwi (Oblique)" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6144/5920009823_42b017cfbc_z.jpg" alt="Kiwi (Oblique)" class="" title="" longdesc="" /></a><p>To reach that low cost, I needed something extremely simple:<ul><li>A cheap 16 MHz system on a chip, the <a
href="http://en.wikipedia.org/wiki/Freescale_DragonBall">Motorola 68EZ328 &#8220;DragonBall&#8221;</a></li><li>Minimal amounts of DRAM and Flash</li><li>A cheap laptop-style matrix keyboard, sourced from a surplus shop.</li><li>Very low-resolution grayscale LCD, with no touch screen.</li></ul><p>With these tight constraints, the project was actually more like a souped up <a
href="http://alphasmart.com">AlphaSmart</a> than a bare-bones PDA. It ran uCLinux, and I could use the <a
href="http://www.uclinux.org/ucsimm/">uCSimm</a> board to start prototyping the software. This project eventually led to the <a
href="http://picogui.org/Wiki/FAQ.html">PicoGUI</a> project, as I needed a special kind of GUI to fit such a small device. And developing PicoGUI led to starting the <a
href="http://cia.vc">CIA.vc</a> service.</p> <a
href="http://www.flickr.com/photos/micahdowty/5920580416/" title="Kiwi PCB (Rear view)" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6024/5920580416_b61db0513a_z.jpg" alt="Kiwi PCB (Rear view)" class="" title="" longdesc="" /></a><p>The Kiwi prototype was done with a hellish combination of a custom PCB, wire-wrapping, and dead-bug surface mount rework. The PCB acted mainly as an SMT prototyping adapter. All the real interconnection was done with wire-wrapping, as I didn&#8217;t trust my design enough to bake it into a PCB right away. Of course, the one thing the PCB was designed to do, it didn&#8217;t. So the DRAM chip and serial level-shifter ended up grotesquely blue-wired.</p> <a
href="http://www.flickr.com/photos/micahdowty/5920577826/" title="PCB Bottom Side" rel="" class="flickr-image"><img
src="http://farm7.static.flickr.com/6016/5920577826_d18fe97e14_z.jpg" alt="PCB Bottom Side" class="" title="" longdesc="" /></a><p>Despite the mess, this machine did boot Linux. I wrote my own bootloader for it, which I used for initial hardware bringup. It booted the uCLinux kernel from flash, and ran PicoGUI on the tiny LCD. Like most of my projects, it was never finished. PicoGUI took over as the focus of my attention, and I targeted my GUI at larger and less haphazard platforms.</p><ul><li><a
href="http://www.flickr.com/photos/micahdowty/sets/72157627032507669/">More photos, old and new</a></li><li><a
href="http://picogui.org/Wiki/FAQ.html">PicoGUI FAQ</a></li><li><a
href="http://cia.vc/doc/inside/">History of CIA.vc</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2011/07/kiwi/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>LEDboard/144</title><link>http://scanlime.org/2011/06/ledboard144/</link> <comments>http://scanlime.org/2011/06/ledboard144/#comments</comments> <pubDate>Thu, 02 Jun 2011 06:45:01 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[LED Lighting]]></category> <category><![CDATA[eulogy]]></category> <category><![CDATA[old-project]]></category> <category><![CDATA[video]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=2007</guid> <description><![CDATA[This is a 9&#215;16 LED matrix I made by hand back in 2004, with LEDs I had left over from another, even sillier project. It has a USB interface powered by a PIC16C765 microcontroller, one of the first to feature a built-in USB device interface. This video post is something of a eulogy for the [...]]]></description> <content:encoded><![CDATA[<p>This is a 9&#215;16 LED matrix I made by hand back in 2004, with LEDs I had left over from another, even sillier project. It has a USB interface powered by a PIC16C765 microcontroller, one of the first to feature a built-in USB device interface.</p><p><iframe
width="640" height="390" src="http://www.youtube.com/embed/f4E-jGZGej8?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe></p><p>This <a
href="http://www.youtube.com/watch?v=f4E-jGZGej8">video</a> post is something of a eulogy for the project. I have been trying to simplify and unclutter my life lately, and to that end I&#8217;ve been having to recycle, donate, or throw out a lot of things. This includes old projects of mine. This matrix was a fun way to spend a couple weekends seven years ago, but since then it&#8217;s just been taking up space in my apartment. So, before throwing it out, I thought I&#8217;d take a few pictures and make a silly video.</p><p>For what it&#8217;s worth, the <a
href="http://svn.navi.cx/misc/trunk/ledboard/usb144"/>firmware and PC source code</a> are still available in Subversion.</p><p><a
href="http://www.flickr.com/photos/micahdowty/5789124428/in/photostream"><img
src="http://scanlime.org/wp-content/uploads/2011/06/IMG_0834-640x480.jpg" alt="" title="IMG_0834" width="640" height="480" class="aligncenter size-large wp-image-2008" /></a></p><p><a
href="http://www.flickr.com/photos/micahdowty/5788571271/in/photostream"><img
src="http://scanlime.org/wp-content/uploads/2011/06/IMG_0839-640x480.jpg" alt="" title="IMG_0839" width="640" height="480" class="aligncenter size-large wp-image-2009" /></a></p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2011/06/ledboard144/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Duct tape RFID tag #1</title><link>http://scanlime.org/2011/05/duct-tape-rfid-tag-1/</link> <comments>http://scanlime.org/2011/05/duct-tape-rfid-tag-1/#comments</comments> <pubDate>Tue, 17 May 2011 05:48:39 +0000</pubDate> <dc:creator>Beth</dc:creator> <category><![CDATA[RFID]]></category> <category><![CDATA[duct-tape]]></category> <category><![CDATA[mini-project]]></category> <category><![CDATA[smt]]></category> <category><![CDATA[work-in-progress]]></category> <guid
isPermaLink="false">http://scanlime.org/?p=1780</guid> <description><![CDATA[This is just a messy first prototype, but I recently tried making an AVRFID tag on a substrate of duct tape. The first attempt involved: An upside-down strip of duct tape, as the base for everything else to stick atop 100 turns of AWG 40 magnet wire around a ~66mm diameter form, which I then [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://scanlime.org/wp-content/uploads/2011/05/duct-tape-avr-rfid1-e1305611495411.jpeg"><img
src="http://scanlime.org/wp-content/uploads/2011/05/duct-tape-avr-rfid1-e1305611495411-640x327.jpg" alt="" title="duct-tape-avr-rfid" width="640" height="327" class="aligncenter size-large wp-image-1782" /></a></p><p>This is just a messy first prototype, but I recently tried making an <a
href="http://scanlime.org/2008/09/using-an-avr-as-an-rfid-tag/">AVRFID</a> tag on a substrate of duct tape. The first attempt involved:</p><ul><li>An upside-down strip of duct tape, as the base for everything else to stick atop</li><li>100 turns of AWG 40 magnet wire around a ~66mm diameter form, which I then haphazardly squished against the tape</li><li>An ATtiny85 &micro;C in the SOIC-8 package, programmed with the <a
href="http://scanlime.org/2010/06/avrfid-1-1-firmware/">latest AVRFID firmware</a></li><li>SMT 0.1 &micro;F capacitor across the power pins</li><li>SMT 1 nF capacitor in parallel with the coil, for tuning it to approximately 125 kHz</li><li>Sealed with clear packing tape on the opposite side</li></ul><p>It&#8217;s ugly, and I really want to try this experiment over again with a smaller IC package, like TSSOP-8. But the card works very well, and the read range is practically indistinguishable from a mass-produced RFID card. I tested this one using an official HID ProxPoint reader.</p><p>I&#8217;ve been busy, but once I have time to perfect this technique I&#8217;m hoping to write some instructions, as it&#8217;s a pretty quick and easy way to make a DIY RFID tag that&#8217;s actually in a convenient form-factor.</p> ]]></content:encoded> <wfw:commentRss>http://scanlime.org/2011/05/duct-tape-rfid-tag-1/feed/</wfw:commentRss> <slash:comments>32</slash:comments> </item> </channel> </rss>
<!-- Dynamic page generated in 7.114 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-18 07:02:34 -->

<!-- Compression = gzip -->