<?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>JeremyBlum.com &#187; Assorted Hacks and Mods</title>
	<atom:link href="http://www.jeremyblum.com/category/assorted-hacks-and-mods/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeremyblum.com</link>
	<description>v3.0</description>
	<lastBuildDate>Fri, 03 Feb 2012 02:43:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Open Hardware Summit and Maker Faire Wrapup</title>
		<link>http://www.jeremyblum.com/2011/09/22/open-hardware-summit-and-maker-faire-wrapup/</link>
		<comments>http://www.jeremyblum.com/2011/09/22/open-hardware-summit-and-maker-faire-wrapup/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 23:22:49 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[External Blog Posts]]></category>
		<category><![CDATA[MakerBot Industries]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[Makerfaire]]></category>
		<category><![CDATA[NYC]]></category>
		<category><![CDATA[Open Hardware]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[
Yes, that's me with the Arduino Team at Makerfaire!

If you follow me on twitter, then you'll certainly know that I spent last weekend in New York City for the 2nd Annual Open Hardware Summit and the 2011 World Maker Faire.  ... <a href="http://www.jeremyblum.com/2011/09/22/open-hardware-summit-and-maker-faire-wrapup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Jeremy with the Arduino Team" href="http://jeremyblum.com/wp-content/uploads/2011/09/IMG_3863.jpg"><img class="aligncenter size-large wp-image-1773" title="Jeremy with the Arduino Team" src="http://jeremyblum.com/wp-content/uploads/2011/09/IMG_3863-500x333.jpg" alt="Jeremy with the Arduino Team" width="500" height="333" /></a></p>
<p>Yes, that&#8217;s me with the Arduino Team at Makerfaire!</p>
<p>If you <a title="Jeremy on Twitter" href="http://www.twitter.com/sciguy14" target="_blank">follow me on twitter</a>, then you&#8217;ll certainly know that I spent last weekend in New York City for the 2nd Annual <a title="Open Hardware Summit" href="http://www.openhardwaresummit.org" target="_blank">Open Hardware Summit</a> and the <a title="2011 NYC World Makerfaire" href="http://makerfaire.com/newyork/2011/" target="_blank">2011 World Maker Faire</a>. I covered the Open Hardware Summit for element14 Electronics (hence the copious tweeting). <span style="font-size: medium;"><strong>You can read all about my time at the open hardware summit <a title="Open Hardware Summit Coverage" href="http://www.element14.com/community/community/doittogetherblog/blog/2011/09/19/2011-open-hardware-summit" target="_blank">on my element14 blog</a>.</strong></span> Check it out! In addition to covering the summit, I was also there to enjoy all the amazing talks, and to demo my<a title="Sudoglove Info" href="http://www.sudoglove.com" target="_blank"> sudoglove controller</a>, which is naturally all open source.</p>
<p>Makerfaire took place the following weekend, and was equally amazing. I spent much of the time &#8220;geeking out&#8221; at all the booths, and trying to check out as much amazing technology as I could. I got the opportunity to meet several people in person with whom I had previously only communicated online. On Sunday, I worked at the <a title="Makerbot Website" href="http://www.makerbot.com" target="_blank">Makerbot</a> booth, demoing our exciting new <a title="MK7 Extruder" href="http://store.makerbot.com/stepstruder-mk7-complete-stepper.html" target="_blank">MK7 Extruders</a>. It was great to finally show these off, because I had been working with them for much of the summer. I could talk on and on about all the amazing things I did, but you&#8217;re probably better off just checking out the photos I took. A slideshow is embedded below, or you can <a title="Flickr Pics from OHS and Makerfaire" href="http://www.flickr.com/photos/jeremyblum/collections/72157627581685793/" target="_blank">view them on flickr</a>.</p>
<p>Wait&#8230; one more thing. <a title="Arc Attack Website" href="http://www.arcattack.com/" target="_blank">Arc Attack</a>, a group that makes music using lightning and <a title="Tesla Coils on Wikipedia" href="http://en.wikipedia.org/wiki/Tesla_Coil" target="_blank">tesla coils</a>, performed the <a title="Doctor Who on Wikipedia" href="http://en.wikipedia.org/wiki/Doctor_Who" target="_blank">Doctor Who</a> theme song. I filmed it and put it up on my <a title="JeremyEBlum on Youtube" href="http://www.youtube.com/jeremyeblum" target="_blank">secondary youtube channel</a>. You do subscribe to my secondary youtube channel, right? <a title="Arc Attack Video" href="http://www.youtube.com/watch?v=gHvVnGVbDFg&amp;feature=channel_video_title" target="_blank">Click Here to Watch the Video</a>.</p>
<p><iframe frameborder="0" height="600" src="http://www.flickr.com/slideShow/index.gne?group_id=&amp;user_id=55909675@N06&amp;set_id=72157627560471141&amp;text=" width="600"></iframe></p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1760&amp;md5=16a0c33351b51ab4ebb43e8fb4d3ec94" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/09/22/open-hardware-summit-and-maker-faire-wrapup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the SudoGlove as a Performance Piece</title>
		<link>http://www.jeremyblum.com/2011/06/19/using-the-sudoglove-as-a-performance-piece/</link>
		<comments>http://www.jeremyblum.com/2011/06/19/using-the-sudoglove-as-a-performance-piece/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 17:16:11 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[Cornell University]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[SudoGlove]]></category>
		<category><![CDATA[visualizer]]></category>

		<guid isPermaLink="false">http://I&#039;vealreadyshownhowtheSudoGloveControlSystemcanbeusedto</guid>
		<description><![CDATA[I've already shown how the SudoGlove Control System can be used to synthesize simple music.  However, I used my enrollment in a digital music class this past semester as an opportunity to further expand the capabilities of the SudoGlove ... <a href="http://www.jeremyblum.com/2011/06/19/using-the-sudoglove-as-a-performance-piece/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already shown how the <a title="Intro to the SudoGlove" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">SudoGlove Control System</a> can be used to <a title="SudoSynth" href="http://jeremyblum.com/2011/03/25/sudosynth/" target="_blank">synthesize simple music</a>. However, I used my enrollment in a digital music class this past semester as an opportunity to further expand the capabilities of the SudoGlove as a performance medium. In the video below, you can see some examples of how I interfaced the SudoGlove with live performances. In addition to using the sudoglove, I also employed RGB light wands that I created, as well as some advanced audio and video processing programs crafted in the &#8220;<a title="Pure Data's Website" href="http://puredata.info/" target="_blank">Pure Data</a>&#8221; programming language. All source files are available for download below.</p>
<p><iframe frameborder="0" height="371" src="http://www.youtube.com/embed/KWrQQEhjv7I?rel=0" width="600"></iframe></p>
<p><strong>Performance 1</strong> (<a title="Watch the whole Performance" href="http://www.youtube.com/watch?v=bqUMATkRuHk" target="_blank">watch the whole thing on my second youtube channel</a>)</p>
<ol>
<li>Margaret wears the SudoGlove, and uses it to trigger sound effects, including a gunshot sound.</li>
<li>After I wrestle it away, I utilize it to synthesize some of the background music on the fly.</li>
<li>RGB light wands cycle colors in a predetermined pattern for this performance.</li>
</ol>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank"><img class="alignleft" style="margin-left: 10px; margin-right: 10px; border-width: 0pt;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" alt="Creative Commons License" width="88" height="31" /></a><a href="http://jeremyblum.com/wp-content/uploads/2011/06/SudoGlove-PD-for-Performance-1.zip">Download Pure Data Patch for Performance 1</a><br />
<a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">Download the source files for the sudoglove controller</a></p>
<p><strong>Performance 2 </strong>(<a title="Watch the whole Performance" href="http://www.youtube.com/watch?v=XAHfiLminII" target="_blank">watch the whole thing on my second youtube channel</a>)</p>
<ol>
<li>Margaret is adding effects to her voice on-the-fly using the desktop computer.</li>
<li>A program written in &#8220;Pure Data&#8221; on my computer captures the live audio data and extracts key frequencies and partials that are used to determine a &#8220;mood&#8221; for the music.</li>
<li>The &#8220;mood&#8221; data is transmitted wirelessly to the RGB light wands where it changes the color and brightness of the LEDs accordingly.</li>
<li>That same data adjusts the hue of the visualizer shown on the projector screen.</li>
<li>The program also utilizes live volume information to modulate the size of the visualizer.</li>
<li>The visualizer is generated in real-time from a webcam feed of the dancer + light sticks. I wear the sudoglove, and flex my finger to adjust the intensity of the kaleidoscope effect shown on the screen.</li>
<li>Moving my hand around in 3D space corresponds directly to the movements of the visualizer on the projector screen. When I sweep my hand to the left, the visualizer moves to the left. I can move it up and down in the same fashion.</li>
</ol>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank"><img class="alignleft" style="margin-left: 10px; margin-right: 10px; border-width: 0pt;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" alt="Creative Commons License" width="88" height="31" /></a><a href="http://jeremyblum.com/wp-content/uploads/2011/06/SudoGlove-PD-for-Performance-2-and-Light-Wand-Code.zip">Download Pure Data Patch for Performance 2 and Light Wand Code</a><br />
<a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">Download the source files for the sudoglove controller</a></p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1602&amp;md5=5ffdf055f22b8992719e9d1116367114" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/06/19/using-the-sudoglove-as-a-performance-piece/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSP430 Wireless Weather Station</title>
		<link>http://www.jeremyblum.com/2011/05/14/msp430-wireless-weather-station/</link>
		<comments>http://www.jeremyblum.com/2011/05/14/msp430-wireless-weather-station/#comments</comments>
		<pubDate>Sun, 15 May 2011 00:28:29 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[Cornell University]]></category>
		<category><![CDATA[MSP430]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[weather station]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[
Contrary to popular belief, Arduino is not the only microcontroller I use for projects.  I often program Atmega 8-bit CPUs in C for my research, I've played with PICs at various jobs, and I've also worked with Parallax Basic ... <a href="http://www.jeremyblum.com/2011/05/14/msp430-wireless-weather-station/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Weather Station Display" href="http://jeremyblum.com/wp-content/uploads/2011/05/Display.png"><img class="aligncenter size-large wp-image-1535" title="Weather Station Display" src="http://jeremyblum.com/wp-content/uploads/2011/05/Display-500x310.png" alt="Weather Station Display" width="500" height="310" /></a></p>
<p>Contrary to popular belief, <a title="My Arduino Tutorials" href="http://jeremyblum.com/category/arduino-tutorials/" target="_blank">Arduino</a> is not the only microcontroller I use for projects. I often program Atmega 8-bit CPUs in C <a title="My Research Stuff" href="http://jeremyblum.com/2011/02/11/workbench-of-the-week/" target="_blank">for my research</a>, I&#8217;ve played with PICs at various jobs, and I&#8217;ve also worked with Parallax <a title="Prosthetics Research" href="http://jeremyblum.com/category/prosthetics_research/" target="_parent">Basic Stamp</a> and <a title="Propeller Projects" href="http://jeremyblum.com/?s=propeller" target="_blank">Propeller</a> chips. This semester, I added the TI MSP430 to my CPU repertoire, thanks to Cornell&#8217;s <a title="ECE3140 at Cornell" href="http://www.csl.cornell.edu/courses/ece3140/" target="_blank">Embedded Systems</a> course. I really enjoyed working with the MSP430, and got to implement some interesting, though very difficult, things on it, including parallel process execution and real time process schedulers. For our final project, my lab partner and I put together a wireless weather station using the MSP430 <a title="More info on the TI website" href="http://focus.ti.com/docs/toolsw/folders/print/ez430-rf2500.html" target="_blank">EZ430-RF2500</a> Demo Kit. I also developed a <a title="Processing Website" href="http://processing.org" target="_blank">Processing</a> application to gather the data via USB and display it graphically on a computer. The station gathers light, temperature, and humidity info and sends it wirelessly to a USB receiver where the data is displayed on a computer. Check out the video below and download the source code and schematics as well. Enjoy!</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img class="alignleft" style="border-width: 0;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" alt="Creative Commons License" width="88" height="31" /></a> Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.</p>
<p><a href="http://jeremyblum.com/wp-content/uploads/2011/05/MSP430-Weather-Station-Code.zip">Download the MSP430 Weather Station Code and Schematics</a></p>
<p>The folders contain all the driver files in the root. &#8221;receive_data.c&#8221; and &#8220;send_data.c&#8221; contain the main functionality. The code is intended to be compiled in Code Composer studio. To be sure it compiles, right-click on the project and go to &#8220;build properties&#8221;. On the &#8220;Tools Settings&#8221; page under &#8220;MSP430 Compiler &gt; Include Options&#8221;, change &#8220;CCE_INSTALL_ROOT&#8221; to &#8220;CCS_INSTALL_ROOT&#8221;. Under &#8220;MSP430 Linker &gt; File Search Path&#8221; change &#8220;CCE_INSTALL_ROOT&#8221; to &#8220;CCS_INSTALL_ROOT&#8221;. On the &#8220;Build Settings&#8221; page uncheck &#8220;Use Default Command&#8221; and change &#8220;CCE_INSTALL_ROOT&#8221; to &#8220;CCS_INSTALL_ROOT&#8221;.</p>
<p><iframe frameborder="0" height="371" src="http://www.youtube.com/embed/eQEDuQWeo64?rel=0" width="600"></iframe></p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1525&amp;md5=a8ba9cb401a0d2be54e442d116270468" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/05/14/msp430-wireless-weather-station/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>My TV Debut: SudoGlove on the Discovery Channel!</title>
		<link>http://www.jeremyblum.com/2011/04/15/sudoglove-on-discovery-channel/</link>
		<comments>http://www.jeremyblum.com/2011/04/15/sudoglove-on-discovery-channel/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 03:20:16 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[Cornell University]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Daily Planet]]></category>
		<category><![CDATA[Discovery Channel]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[SudoGlove]]></category>
		<category><![CDATA[TV]]></category>

		<guid isPermaLink="false">http://ThisprojectwasfeaturedontheAmpHourPodcaston4/18/2011</guid>
		<description><![CDATA[This project was featured on the Amp Hour Podcast on 4/18/2011



If you thought I could only use the SudoGlove to drive RC cars and make music (depending on your definition of music), then you're wrong!  It appears that I ... <a href="http://www.jeremyblum.com/2011/04/15/sudoglove-on-discovery-channel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><em>This project was <a title="The Amp Hour" href="http://www.theamphour.com/2011/04/18/the-amp-hour-39-mumble-mumbo-jumbo/" target="_blank">featured on the Amp Hour Podcast</a> on 4/18/2011<br />
</em></p>
<div align="center"><iframe frameborder="0" height="480" src="http://www.youtube.com/embed/GXIILV4WwBI?rel=0" width="640"></iframe></div>
<p>If you thought I could only use the SudoGlove to <a title="Original SudoGlove Demo" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">drive RC cars</a> and <a title="The SudoSynth" href="http://jeremyblum.com/2011/03/25/sudosynth/" target="_blank">make music</a> (depending on your definition of music), then you&#8217;re wrong! It appears that I can also use it to convince TV producers to put me on the discovery channel. Discovery Channel&#8217;s <a title="The Daily Planet Show" href="http://www.discoverychannel.ca/dailyplanet" target="_blank">Daily Planet</a> show reached out to me about the glove following the <a title="SudoGlove at BOOM 2011" href="http://jeremyblum.com/2011/03/25/sudoglove-goes-boom/" target="_blank">presentation I did at BOOM</a> a few weeks ago. Cornell sends out a press release about the projects, and Daily Planet seemed to like the idea.<br />
So, after about 7 hours of filming (no, that&#8217;s not a typo) with a crew at Cornell two weeks ago, a segment on the SudoGlove aired this past week! Check out the video here, or directly on <a href="http://watch.discoverychannel.ca/#clip449672">Discovery Channel&#8217;s website</a>. You won&#8217;t regret it!</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1495&amp;md5=8e5beec709bb64afb7809e4325616b13" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/04/15/sudoglove-on-discovery-channel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SudoSynth &#8211; Making &#8220;Music&#8221; with the SudoGlove</title>
		<link>http://www.jeremyblum.com/2011/03/25/sudosynth/</link>
		<comments>http://www.jeremyblum.com/2011/03/25/sudosynth/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 02:43:41 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[SudoGlove]]></category>
		<category><![CDATA[SudoSynth]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This project was featured on Hackaday.com on 3/26/2011
This project was featured on Synthtopia.com on 3/28/2011

I had to put "music" in quotation marks, since I'm using a pretty loose definition.  I do not consider myself to be a musical person, but I ... <a href="http://www.jeremyblum.com/2011/03/25/sudosynth/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><span style="font-size: small;"><em>This project was <a title="Hack-a-Day" href="http://hackaday.com/2011/03/26/sudoglove-gets-a-big-software-upgrade/" target="_blank">featured on Hackaday.com</a> on 3/26/2011<br />
This project was <a title="Synthtopia" href="http://www.synthtopia.com/content/2011/03/28/sudosynth-a-diy-synth-glove/" target="_blank">featured on Synthtopia.com</a> on 3/28/2011<br />
</em></span></p>
<p>I had to put &#8220;music&#8221; in quotation marks, since I&#8217;m using a pretty loose definition. I do not consider myself to be a musical person, but I do love music and I&#8217;ve always been extremely interested in what it takes to make music. So, I enrolled in a course this semester called &#8220;<a title="Digital Music at Cornell" href="http://digital.music.cornell.edu/" target="_blank">Performing with Computers</a>&#8220;. It sounded like a music class that I could actually take and have some idea of what was going on. The class has been really fun so far, and I&#8217;m learning all kinds of new things. The class is structured around giving live performances of the music you develop, and doing so in interesting and unique ways. My mind immediately went to the <a title="SudoGlove Control System" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">SudoGlove Control System</a>, since I had been trying to think of new applications for the platform. Once our professor introduced us to a programming language called <a title="PureData.info" href="http://www.puredata.info/" target="_blank">PureData</a>, I knew what I had to do&#8230;</p>
<p>The SudoSynth was born! Well kind of&#8230; I demonstrated the first version of the software (which I hastily wrote between 1 and 4AM the night prior) at <a title="SudoGlove at BOOM" href="http://jeremyblum.com/2011/03/25/sudoglove-goes-boom/" target="_blank">BOOM 2011</a>. It was well received, but clearly needed further work. So, over the last two weeks I&#8217;ve been rebuilding the software into a much more complex system capable of synthesizing piano, flute, guitar, electronic beats, bass rhythms, and percussion in just about any combination you can imagine. I also branched the original version of the software into an on-the-fly synthesizer that generates waveforms in real time based on hand movements (instead of using sound clips).</p>
<p>Check out the video below to see how the system works and sounds:<br />
<iframe frameborder="0" height="368" src="http://www.youtube.com/embed/4bXEzAOvSrc?rel=0" title="YouTube video player" width="600"></iframe></p>
<p>You can download the PureData Patches below. They are licensed via a Creative Commons Open-Source License.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank"><img class="alignleft" style="margin-left: 10px; margin-right: 10px; border-width: 0pt;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" alt="Creative Commons License" width="88" height="31" /></a><a href="http://jeremyblum.com/wp-content/uploads/2011/03/SudoSynth-On-The-Fly-Waveform-Synthesizer.zip">SudoSynth &#8211; On The Fly Waveform Synthesizer</a> (ZIP, 3KB)<br />
<a href="http://jeremyblum.com/wp-content/uploads/2011/03/SudoSynth-Multi-Instrument-Synthesizer.zip">SudoSynth &#8211; Multi Instrument Synthesizer</a> (ZIP, 64MB &#8211; Includes .wav audio samples)</p>
<p>You can download the arduino code, schematics, laser cutting files, etc for the glove controller <a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">here</a>.</p>
<p>The audio samples used in my patches are from <a title="Freesound.org" href="http://www.freesound.org/" target="_blank">freesound.org</a>, and all have creative commons licenses. Further information about the sound clips used can be found in the downloadable zip files above.</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1438&amp;md5=b9089cc539f10d489483356382488286" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/03/25/sudosynth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Processing-Based SudoGlove Visual Debugger</title>
		<link>http://www.jeremyblum.com/2011/03/25/processing-based-sudoglove-visual-debugger/</link>
		<comments>http://www.jeremyblum.com/2011/03/25/processing-based-sudoglove-visual-debugger/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 02:43:19 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[SudoGlove]]></category>
		<category><![CDATA[XBee]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[
SudoGlove Visual Debugging Software
As I mentioned in a previous post, I recently presented the SudoGlove Control System at Cornell's BOOM Competition.  I was concerned (rightly so) that I wouldn't be able to drive the RC car around much due ... <a href="http://www.jeremyblum.com/2011/03/25/processing-based-sudoglove-visual-debugger/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="SudoGlove Instrument Panel" href="http://jeremyblum.com/wp-content/uploads/2011/03/instrument-panel-screenshot.jpg"><img class="size-large wp-image-1432 aligncenter" title="SudoGlove Instrument Panel" src="http://jeremyblum.com/wp-content/uploads/2011/03/instrument-panel-screenshot-500x423.jpg" alt="SudoGlove Instrument Panel" width="420" height="355" /></a></p>
<p style="text-align: center;">SudoGlove Visual Debugging Software</p>
<p style="text-align: left;">As I mentioned in a <a title="SudoGlove at BOOM" href="http://jeremyblum.com/2011/03/25/sudoglove-goes-boom/" target="_blank">previous post</a>, I recently presented the <a title="SudoGlove Posts" href="http://jeremyblum.com/tag/sudoglove/" target="_blank">SudoGlove Control System</a> at Cornell&#8217;s BOOM Competition. I was concerned (rightly so) that I wouldn&#8217;t be able to drive the RC car around much due to the large amount of foot traffic for the event. So, I put together the simple &#8220;Instrument Panel&#8221; that you can see in the picture above. It&#8217;s written in <a title="Processing.org" href="http://www.processing.org" target="_blank">processing</a>, a programming language that I&#8217;ve <a title="Processing Posts" href="http://jeremyblum.com/?s=processing+arduino" target="_blank">demonstrated in several</a> of my Arduino Tutorial Videos. By hooking up an XBee wireless module to the computer (the same wireless receiver present in the RC Car that is usually controlled by the SudoGlove), I can interpret commands from the glove and display them on the computer interface, in a fashion similar to how the RC car would interpret them. Whats more, I can even have the glove communicate with the computer and the car simultaneously by setting the ATID values for the two receiving XBees to the same value. If you have no idea what I&#8217;m talking about, watch <a title="XBee Arduino Tutorial" href="http://www.youtube.com/watch?v=vKVNmA8C6m8" target="_blank">this video</a> about XBee communication.</p>
<p style="text-align: left;">As usual, you can download the processing source code for this project below. It&#8217;s licensed via Creative Commons.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/" target="_blank"><img class="alignleft" style="margin-left: 10px; margin-right: 10px; border-width: 0pt;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png" alt="Creative Commons License" width="88" height="31" /></a><a href="http://jeremyblum.com/wp-content/uploads/2011/03/instrument_panel.zip">Download Processing SudoGlove Debugging Display</a></p>
<p>You can download the arduino code, schematics, laser cutting files, etc for the glove controller <a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">here</a>.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/03/25/processing-based-sudoglove-visual-debugger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SudoGlove Original Driving Trial &#8211; Uncut Footage</title>
		<link>http://www.jeremyblum.com/2011/03/25/sudoglove-original-driving-trial-uncut-footage/</link>
		<comments>http://www.jeremyblum.com/2011/03/25/sudoglove-original-driving-trial-uncut-footage/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 02:42:49 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[SudoGlove]]></category>
		<category><![CDATA[Uncut]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This one is coming out of the archives!  Below is a video of one of the first full length trial runs we did with the SudoGlove Control System.  I put it up on my secondary youtube channel, which I'm ... <a href="http://www.jeremyblum.com/2011/03/25/sudoglove-original-driving-trial-uncut-footage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This one is coming out of the archives! Below is a video of one of the first full length trial runs we did with the <a title="SudoGlove Control System Original Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">SudoGlove Control System</a>. I put it up on my <a title="Secondary Youtube Channel" href="http://www.youtube.com/jeremyeblum" target="_blank">secondary youtube channel</a>, which I&#8217;m planning to start using more as a place for bonus content that doesn&#8217;t quite fit on my main channel. Go <a title="Subscribe to my Secondary Youtube Channel!" href="http://www.youtube.com/subscription_center?add_user=jeremyeblum" target="_blank">subscribe</a>! Stay tuned for more info about the new stuff I&#8217;ve done with the SudoGlove.</p>
<p><iframe frameborder="0" height="368" src="http://www.youtube.com/embed/v0QJkbFEeqc?rel=0" title="YouTube video player" width="600"></iframe></p>
<p>You can download the arduino code, schematics, laser cutting files, etc for the glove controller <a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">here</a>.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/03/25/sudoglove-original-driving-trial-uncut-footage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SudoGlove goes BOOM!</title>
		<link>http://www.jeremyblum.com/2011/03/25/sudoglove-goes-boom/</link>
		<comments>http://www.jeremyblum.com/2011/03/25/sudoglove-goes-boom/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 00:54:42 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[BOOM]]></category>
		<category><![CDATA[CNET]]></category>
		<category><![CDATA[Cornell]]></category>
		<category><![CDATA[SudoGlove]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Our Exhibit at BOOM 2011
BOOM = Bits on our Minds.  It's an annual event hosted at Cornell University by the faculty of Computing and Information Science.  It's a really awesome event, and every year I look forward to attending ... <a href="http://www.jeremyblum.com/2011/03/25/sudoglove-goes-boom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Our Exhibit at Boom" href="http://jeremyblum.com/wp-content/uploads/2011/03/P1020321_small.jpg"><img class="size-large wp-image-1417 aligncenter" title="Our Exhibit at Boom" src="http://jeremyblum.com/wp-content/uploads/2011/03/P1020321_small-500x293.jpg" alt="Our Exhibit at Boom" width="500" height="293" /></a>Our Exhibit at BOOM 2011</p>
<p>BOOM = <a title="BOOM Website" href="http://www.cis.cornell.edu/boom/2011sp/" target="_blank">Bits on our Minds</a>. It&#8217;s an annual event hosted at Cornell University by the faculty of Computing and Information Science. It&#8217;s a really awesome event, and every year I look forward to attending and checking out the dozens of amazing projects that students have developed. This year, I was encouraged by a previous professor to submit the <a title="My Original Post on the SudoGlove Controller" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">SudoGlove Control System</a> to BOOM, a project that I had developed with three fellow students in his class last Spring. As usual, I got overly excited about submitting the project, so I turned in the materials very early. Lucky me, Cornell sent out a press release, and before I knew it, the SudoGlove was <a title="CNET Article" href="http://news.cnet.com/8301-17938_105-20032087-1.html" target="_blank">featured on CNET News</a>! I also took the opportunity to revisit the system we had developed a year ago, and add new features like a music synthesizer and visual display (I&#8217;ll post about those soon).</p>
<p>We also won the Bank of America Award at BOOM. I&#8217;m pretty sure the only requirements for winning the award were that they reps from Bank of America happened to think our project was cool. My favorite part of the whole experience was getting to talk to the kids from local schools who came visit the showcase &#8211; they all seemed genuinely interested in the technology.</p>
<p><a href="http://jeremyblum.com/wp-content/uploads/2011/03/Poster.pdf">Download the SudoGlove BOOM poster shown in the picture above</a> (4.1MB PDF)<br />
<a title="Cornell Chronicle" href="http://www.news.cornell.edu/stories/March11/BOOMCover.html" target="_blank">Read more about BOOM in the Cornell Chronicle</a></p>
<p>You can download the arduino code, schematics, laser cutting files, etc for the glove controller <a title="Original SudoGlove Post" href="http://jeremyblum.com/2010/05/09/sudoglove/" target="_blank">here</a>.</p>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=1415&amp;md5=07f2c3a9c8c2bd6b209837713f8ec0fd" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2011/03/25/sudoglove-goes-boom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Driving 5 Speakers Simultaneously with an Arduino</title>
		<link>http://www.jeremyblum.com/2010/09/05/driving-5-speakers-simultaneously-with-an-arduino/</link>
		<comments>http://www.jeremyblum.com/2010/09/05/driving-5-speakers-simultaneously-with-an-arduino/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 22:42:10 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[frequency]]></category>
		<category><![CDATA[hackaday]]></category>
		<category><![CDATA[reacXion]]></category>
		<category><![CDATA[speakers]]></category>
		<category><![CDATA[timers]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[
This post was featured on the Hack-a-Day Blog on 9/14/10
You can download a C-code rewrite of this code, here.
Mimi Yin has a neat implementation of this code for an interactive sculpture.



For the ReacXion Audio/Visual Project I've been working on, ... <a href="http://www.jeremyblum.com/2010/09/05/driving-5-speakers-simultaneously-with-an-arduino/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><span style="font-size: small;"><em><br />
This post was <a title="Hack a Day" href="http://hackaday.com/2010/09/14/5-tones-1-arduino/" target="_blank">featured on the Hack-a-Day Blog</a> on 9/14/10<br />
You can download a C-code rewrite of this code, <a title="C-code" href="http://jeremyblum.com/2010/09/16/this-is-why-i-love-open-source/" target="_blank">here</a>.<br />
Mimi Yin has a neat implementation of this code for an <a title="Mimi's Blog" href="http://itp.nyu.edu/~yy600/blog/2010/10/06/zarathustra/" target="_blank">interactive sculpture</a>.<br />
</em></span></p>
<p><img class="size-medium wp-image-825 alignright" title="speaker" src="http://jeremyblum.com/wp-content/uploads/2010/09/speaker-300x209.png" alt="speaker" width="200" height="140" /></p>
<p>For the <a title="reacXion Posts" href="http://jeremyblum.com/tag/reacXion/" target="_blank">ReacXion Audio/Visual Project</a> I&#8217;ve been working on, it&#8217;s necessary to drive 5 speakers independently &#8211; each with a variable volume and set frequency (though the frequency of each speaker is different). I examined several methods for generating the 5 square waves in hardware &#8211; using a 555 timer, oscillating RC with schmitt trigger, and a bunch of opamp circuits. Unfortunately, none of these generated tones as nice as the ones I got when simply using the <a title="Arduino Tone Function Reference" href="http://arduino.cc/en/Reference/Tone" target="_blank">arduino tone library</a>. The built-in tone() function allows you to generate a squarewave with 50% duty cycle of your selected frequency on any pin on the arduino. It relies on one of the arduino&#8217;s 3 timers to work in the background. Specifically, it uses timer2, which is also responsible for <a title="Learn more about PWM" href="http://jeremyblum.com/2010/06/20/lets-get-digital-or-analog/" target="_blank">controlling PWM</a> on pins 3 and 11. So you naturally loose that ability when using the tone() function. But I wanted to make 5 tones simultaneously! How to do it?</p>
<p><span id="more-803"></span>While the tone() function can only be run one instance at a time, I discovered (after much research), that I could hijack one of the timers (again, I chose timer2), and use some clever math and <a title="Interrupt Service Routine on Wikipedia" href="http://en.wikipedia.org/wiki/Interrupt_service_routine" target="_blank">software interrupts</a> to generate 5 tones simultaneously! I wanted to generate 5 tones of the following frequencies:</p>
<ol>
<li>C = 131 Hz</li>
<li>D = 147 Hz</li>
<li>E = 165 Hz</li>
<li>G = 196 Hz</li>
<li>A = 220 Hz</li>
</ol>
<p>Any music lovers out there will surely recognize this as the <a title="Pentatonic Scale on Wikipedia" href="http://en.wikipedia.org/wiki/Pentatonic_scale" target="_blank">pentatonic scale</a> (5 notes that nearly always sound good together). Now, think back to physics, and recall that period = 1/frequency. In other words, each frequency pin will have to cycle from 0V to 5V and back again in the time dictated by the period for that note. See the following picture:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-805" title="Square Wave" src="http://jeremyblum.com/wp-content/uploads/2010/09/Square_Wave.jpg" alt="Square Wave" width="410" height="211" /></p>
<p style="text-align: left;">The red portion of the square wave represents one cycle. From the formula above, we can determine the following periods required to generate each note:</p>
<ol>
<li>C = 1/131 Hz = 7.6ms</li>
<li>D = 1/147 Hz = 6.8ms</li>
<li>E = 1/165 Hz = 6.0ms</li>
<li>G = 1/196 Hz = 5.1ms</li>
<li>A = 1/220 Hz = 4.5ms</li>
</ol>
<p>But, remember that we are dealing with a microcontroller, so we need to flip the value twice every period. If you take a look at the green portions on the image above you&#8217;ll see what I&#8217;m talking about. In one red portion of the wave, the value needs to change twice. So in reality, we actually need to be able to flip bits twice as fast as the times outlined above. Dividing those values by two, we get the following:</p>
<ol>
<li>C = 7.6ms/2 = 3.80ms</li>
<li>D = 6.8ms/2 = 3.40ms</li>
<li>E = 6.0ms/2 = 3.00ms</li>
<li>G = 5.1ms/2 = 2.55ms</li>
<li>A = 4.5ms/2 = 2.25ms</li>
</ol>
<p>So, if we want to generate all these tones at the same time, we&#8217;re going to need to have an interrupt service that can activate at a <a title="Greatest Common Factor on Wikipedia" href="http://en.wikipedia.org/wiki/Greatest_common_factor" target="_blank">Greatest Common Factor</a> for all these values. This interrupt request will toggle the appropriate pin every prescribed number of milliseconds, and we&#8217;ll get the tones we need! So, the least common multiple for the variables above would be: .05ms, or 50μs. If we use this ideal value, we can construct an interrupt service request that will initiate every 50μs during our program. Using some counters, we can flip the bits after the appropriate intervals! Let&#8217;s calculate those counters now:</p>
<ol>
<li>C = 3.80ms/50μs = 76 counts</li>
<li>D = 3.40ms/50μs = 68 counts</li>
<li>E = 3.00ms/50μs = 60 counts</li>
<li>G = 2.55ms/50μs = 51 counts</li>
<li>A = 2.25ms/50μs = 45 counts</li>
</ol>
<p>In an ideal world, we would simply have a software interrupt trigger every 50μs, increment 5 separate counters each time, and toggle the associated pin when we reached the right value. For example, every time counter1 reached 76, we would reset it to 0, and toggle the value of that pin. If the only thing you were doing with your CPU was making noises, then this would work quite well. But the whole reason for doing this in an interrupt routine is so that we can do other things simultaneously. For this project, <a title="ReacXion Project" href="http://jeremyblum.com/2010/08/27/reacxion-build-progress/" target="_blank">I&#8217;m simultaneously controlling a large LED matrix</a>. If the matrix isn&#8217;t refreshed often enough, the display looks choppy. Unfortunately, cutting away to an interrupt routine every 50μs was too often, and the display started to look funny. So, I had no choice but to trade off some frequency accuracy for a reduction in how often I activated the interrupt. After some trial and error, I deemed the golden value to be 64μs. It&#8217;s a little more than the ideal lowest common denominator, but still close enough that the notes sound good. Using this new value, I calculated new counts, and implemented them in my interrupt routine:</p>
<ol>
<li>C = 3.80ms/64μs ≈ 60 counts</li>
<li>D = 3.40ms/64μs ≈ 53 counts</li>
<li>E = 3.00ms/64μs ≈ 47 counts</li>
<li>G = 2.55ms/64μs ≈ 40 counts</li>
<li>A = 2.25ms/64μs ≈ 35 counts</li>
</ol>
<p>And that&#8217;s it! Using these values, I can simultaneously generate all five notes, while maintaining enough time to quickly update my LED Matrix. Below is the final arduino code for making this work. Thanks to <a title="Sebastian's Blog Post" href="http://popdevelop.com/2010/04/mastering-timer-interrupts-on-the-arduino/" target="_blank">Sebastian Wallin</a> for some awesome information on interfacing with arduino timer interrupts.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img style="border-width: 0;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" alt="Creative Commons License" /></a> <span style="font-size: x-small;">Licensed via <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a></span></p>
<p><span style="font-size: x-small;"><br />
</span></p>
<pre>
<div class="codecolorer-container c blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br /></div></td><td><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//** ReacXion Source Code **//</span><br />
<span style="color: #666666; font-style: italic;">//** www.jeremyblum.com **//</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Timer reload value, globally available */</span><br />
<span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> tcnt2<span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Toggle HIGH or LOW digital write */</span><br />
<span style="color: #993333;">int</span> toggle1 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> toggle2 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> toggle3 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> toggle4 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> toggle5 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Keep track of when each note needs to be switched */</span><br />
<span style="color: #993333;">int</span> count1 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> count2 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> count3 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> count4 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">int</span> count5 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Frequency Output Pins */</span><br />
<span style="color: #339933;">#define FREQ1 9</span><br />
<span style="color: #339933;">#define FREQ2 10</span><br />
<span style="color: #339933;">#define FREQ3 11</span><br />
<span style="color: #339933;">#define FREQ4 12</span><br />
<span style="color: #339933;">#define FREQ5 13</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Setup Function will run once at initialization</span><br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* First disable the timer overflow interrupt*/</span><br />
TIMSK2 <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>TOIE2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Configure timer2 in normal mode (no PWM) */</span><br />
TCCR2A <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>WGM21<span style="color: #009900;">&#41;</span> <span style="color: #339933;">|</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>WGM20<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
TCCR2B <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>WGM22<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Select clock source: internal I/O clock */</span><br />
ASSR <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>AS2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Disable Compare Match A interrupt (only overflow) */</span><br />
TIMSK2 <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>OCIE2A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Configure the prescaler to CPU clock divided by 128 */</span><br />
TCCR2B <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>CS22<span style="color: #009900;">&#41;</span>  <span style="color: #339933;">|</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>CS20<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Set bits</span><br />
TCCR2B <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>CS21<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>             <span style="color: #666666; font-style: italic;">// Clear bit</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* We need to calculate a proper value to load the counter.<br />
* The following loads the value 248 into the Timer 2 counter<br />
* The math behind this is:<br />
* (Desired period) = 64us.<br />
* (CPU frequency) / (prescaler value) = 125000 Hz -&gt; 8us.<br />
* (desired period) / 8us = 8.<br />
* MAX(uint8) - 8 = 248;<br />
*/</span><br />
<span style="color: #808080; font-style: italic;">/* Save value globally for later reload in ISR */</span><br />
tcnt2 <span style="color: #339933;">=</span> <span style="color: #0000dd;">248</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Finally load end enable the timer */</span><br />
TCNT2 <span style="color: #339933;">=</span> tcnt2<span style="color: #339933;">;</span><br />
TIMSK2 <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">&lt;&lt;</span>TOIE2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Configure I/O Pin Directions</span><br />
pinMode<span style="color: #009900;">&#40;</span>FREQ1<span style="color: #339933;">,</span> &nbsp; &nbsp;OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
pinMode<span style="color: #009900;">&#40;</span>FREQ2<span style="color: #339933;">,</span> &nbsp; &nbsp;OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
pinMode<span style="color: #009900;">&#40;</span>FREQ3<span style="color: #339933;">,</span> &nbsp; &nbsp;OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
pinMode<span style="color: #009900;">&#40;</span>FREQ4<span style="color: #339933;">,</span> &nbsp; &nbsp;OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
pinMode<span style="color: #009900;">&#40;</span>FREQ5<span style="color: #339933;">,</span> &nbsp; &nbsp;OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/* Install the Interrupt Service Routine (ISR) for Timer2.  */</span><br />
ISR<span style="color: #009900;">&#40;</span>TIMER2_OVF_vect<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/* Reload the timer */</span><br />
TCNT2 <span style="color: #339933;">=</span> tcnt2<span style="color: #339933;">;</span><br />
<br />
count1<span style="color: #339933;">++;</span> count2<span style="color: #339933;">++;</span> count3<span style="color: #339933;">++;</span> count4<span style="color: #339933;">++;</span> count5<span style="color: #339933;">++;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>count1 <span style="color: #339933;">==</span> <span style="color: #0000dd;">60</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
digitalWrite<span style="color: #009900;">&#40;</span>FREQ1<span style="color: #339933;">,</span> toggle1 <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">?</span> HIGH <span style="color: #339933;">:</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
toggle1 <span style="color: #339933;">=</span> ~toggle1<span style="color: #339933;">;</span><br />
count1 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>count2 <span style="color: #339933;">==</span> <span style="color: #0000dd;">53</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
digitalWrite<span style="color: #009900;">&#40;</span>FREQ2<span style="color: #339933;">,</span> toggle2 <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">?</span> HIGH <span style="color: #339933;">:</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
toggle2 <span style="color: #339933;">=</span> ~toggle2<span style="color: #339933;">;</span><br />
count2 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>count3 <span style="color: #339933;">==</span> <span style="color: #0000dd;">47</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
digitalWrite<span style="color: #009900;">&#40;</span>FREQ3<span style="color: #339933;">,</span> toggle3 <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">?</span> HIGH <span style="color: #339933;">:</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
toggle3 <span style="color: #339933;">=</span> ~toggle3<span style="color: #339933;">;</span><br />
count3 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>count4 <span style="color: #339933;">==</span> <span style="color: #0000dd;">40</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
digitalWrite<span style="color: #009900;">&#40;</span>FREQ4<span style="color: #339933;">,</span> toggle4 <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">?</span> HIGH <span style="color: #339933;">:</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
toggle4 <span style="color: #339933;">=</span> ~toggle4<span style="color: #339933;">;</span><br />
count4 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>count5 <span style="color: #339933;">==</span> <span style="color: #0000dd;">35</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
digitalWrite<span style="color: #009900;">&#40;</span>FREQ5<span style="color: #339933;">,</span> toggle5 <span style="color: #339933;">==</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">?</span> HIGH <span style="color: #339933;">:</span> LOW<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
toggle5 <span style="color: #339933;">=</span> ~toggle5<span style="color: #339933;">;</span><br />
count5 <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #666666; font-style: italic;">//Do whatever else you want to do with your arduino!</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
</pre>
<p class="wp-flattr-button"></p> <p><a href="http://www.jeremyblum.com/?flattrss_redirect&amp;id=803&amp;md5=9a05a7ac9c5a2893e83d002457b05a57" title="Flattr" target="_blank"><img src="http://www.jeremyblum.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2010/09/05/driving-5-speakers-simultaneously-with-an-arduino/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>reacXion Build Progress</title>
		<link>http://www.jeremyblum.com/2010/08/27/reacxion-build-progress/</link>
		<comments>http://www.jeremyblum.com/2010/08/27/reacxion-build-progress/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 21:41:27 +0000</pubDate>
		<dc:creator>Jeremy Blum</dc:creator>
				<category><![CDATA[Assorted Hacks and Mods]]></category>
		<category><![CDATA[breadboard]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[reacXion]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[If you subscribe to my youtube channel, you might know that I've been working on a project called reacXion.  Last week, we finished a working breadboard prototype of the project, with a simple sample program running.  Check it out ... <a href="http://www.jeremyblum.com/2010/08/27/reacxion-build-progress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you subscribe to my youtube channel, you might know that I&#8217;ve been <a title="ReacXion Parts 1-3" href="http://jeremyblum.com/2010/08/15/reacxion-art-meets-technology/" target="_blank">working on a project called reacXion</a>. Last week, we finished a working breadboard prototype of the project, with a simple sample program running. Check it out in the video below! I had initially hoped to get this finished before heading back to college for the semester, but that obviously didn&#8217;t happen. I&#8217;ll probably finish it up over winter break. The final version will be on a printed circuited board, have a nice enclosure, and several modes to choose from.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="475" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/TeZ_gcoRLFM?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="475" src="http://www.youtube.com/v/TeZ_gcoRLFM?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.jeremyblum.com/2010/08/27/reacxion-build-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

