<?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>Major Callisto</title>
	<atom:link href="http://www.majorcallisto.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.majorcallisto.com</link>
	<description>Flash experiments</description>
	<lastBuildDate>Tue, 11 Jun 2013 14:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Slurpy Ford Wii Nunchuk Puppet</title>
		<link>http://www.majorcallisto.com/projects/slurpy-ford-wii-nunchuk-puppet/</link>
		<comments>http://www.majorcallisto.com/projects/slurpy-ford-wii-nunchuk-puppet/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 16:52:49 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Spotlight: Hardware]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=320</guid>
		<description><![CDATA[Use, spacebar, &#8220;c&#8221;, &#8220;s&#8221;, left, right, up and down arrows to control Slurpy: 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_fpuppet_03_1172266207"
			class="flashmovie"
			width="640"
			height="500">
	<param name="movie" value="http://www.majorcallisto.com/wp-content/uploads/fpuppet_03.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.majorcallisto.com/wp-content/uploads/fpuppet_03.swf"
			name="fm_fpuppet_03_1172266207"
			width="640"
			height="500">
	<!--<![endif]-->
		 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object> I&#8217;ve thought for a long time about how a Wii Nunchuk would be perfect for controlling a puppet. It &#8230; <a href="http://www.majorcallisto.com/projects/slurpy-ford-wii-nunchuk-puppet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Use, spacebar, &#8220;c&#8221;, &#8220;s&#8221;, left, right, up and down arrows to control Slurpy:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_fpuppet_03_385737353"
			class="flashmovie"
			width="640"
			height="500">
	<param name="movie" value="http://www.majorcallisto.com/wp-content/uploads/fpuppet_03.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.majorcallisto.com/wp-content/uploads/fpuppet_03.swf"
			name="fm_fpuppet_03_385737353"
			width="640"
			height="500">
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a><br />

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>I&#8217;ve thought for a long time about how a Wii Nunchuk would be perfect for controlling a puppet. It has an accelerometer, a joystick and two buttons.</p>
<p><iframe src="http://player.vimeo.com/video/68063218" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/20130603_121914.jpg" alt="" title="20130603_121914" width="800" height="600" class="alignnone size-full wp-image-321" /></p>
<p>Accelerometers are sensors that measure proper acceleration &#8211; the orientation of an object relative to the Earth&#8217;s gravity. You can use an accelerometer to determine the direction that an object is facing. Probably the least expensive accelerometer is the Wii Nunchuk &#8211; off brand versions can be bought for $10 at big box stores. Additionally, they can be bought as chipsets that plug into arduinos &#8211; chips are usually start around $12 in physical stores and cheaper online, but you miss out on the benefits of the extra buttons/ joystick. Also, you can buy a Wii Nunchuk at a bigbox pharmacy at midnight on a whim.</p>
<p>Cut the end off the nunchuk and plug it into your arduino. Plug your arduino into a computer.<br />
I&#8217;m using the <a href="https://github.com/todbot/wiichuck_adapter/tree/master/firmware">wiichuck adapter from Todbot</a></p>
<p>It spits out serial data to whatever software you want to use. Sadly, you do need some scripting/ programming knowledge here. Fortunately, you can use all kinds of things, including node.</p>
<p>Here&#8217;s what the data looks like:<br />
{&#8220;accx&#8221;:180, &#8220;accy&#8221;:125, &#8220;zbut&#8221;:0, &#8220;cbut&#8221;:0, &#8220;joyx&#8221;:122, &#8220;joyy&#8221;:130}</p>
<p>There was some interest in the assets and how they work. Here are the cutup pieces that I used:<br />
<a href="http://www.majorcallisto.com/wp-content/uploads/slurpyFord.png"><img src="http://www.majorcallisto.com/wp-content/uploads/slurpyFord-1024x320.png" alt="" title="slurpyFord" width="640" height="200" class="alignnone size-large wp-image-322" /></a></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/SlurpyFord.jpg" alt="" title="SlurpyFord" width="640" height="495" class="alignnone size-full wp-image-326" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/slurpy-ford-wii-nunchuk-puppet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Etch-a-Sketch Turntables</title>
		<link>http://www.majorcallisto.com/uncategorized/etch-a-sketch-turntables/</link>
		<comments>http://www.majorcallisto.com/uncategorized/etch-a-sketch-turntables/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 15:50:27 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Spotlight: Hardware]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=307</guid>
		<description><![CDATA[Arduino Sketch For an upcoming project with CTT, we decided to make a giant etch-a-sketch out of a quadcopter, a UV laser, a giant glow in the dark wall and two turntables. As part of a bonus project I made &#8230; <a href="http://www.majorcallisto.com/uncategorized/etch-a-sketch-turntables/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/68060420" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p><a href="www.majorcallisto.com/wp-content/uploads/EtchAGearBoxMotorWorking.zip">Arduino Sketch</a></p>
<p>For an upcoming project with <a href="http://cttoronto.com/category/project/3-nxne-etch-a-sketch/">CTT</a>, we decided to make a giant etch-a-sketch out of a quadcopter, a UV laser, a giant glow in the dark wall and two turntables. As part of a bonus project I made a real etch-a-sketch that is controlled by 2 turntables. The turntables replace the knobs by controlling two gearmotors that spin forward or reverse in very tiny increments. In addition, this approach allows for computer controlled illustrations and perhaps doing things like uploading an image and having it draw on screen &#8211; I&#8217;m almost done this. Automated Etch-A-Sketches have been done before, but I&#8217;m using my own approach.</p>
<p><iframe src="http://player.vimeo.com/video/68053499" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>This works by using Time Coded Vinyl. TCV is a vinyl record album that has a timecode pressed into it instead of a &#8220;traditional&#8221; audio track. The TCV is interpreted by a hardware controller and sent to a computer via USB connection.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/turntables.jpg" alt="" title="turntables" width="800" height="600" class="alignnone size-full wp-image-308" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/etchasketch_03.jpg" alt="" title="etchasketch_03" width="800" height="600" class="alignnone size-full wp-image-310" /></p>
<p>The Traktor 2 Scratch Pro software interprets the position of the playhead using the data received from the hardware controller. There is a 1 second track that loops based on the record input for each of the two turntables and it&#8217;s the playhead position on this track that is used for the midi out. This is then sent from Traktor 2 to a virtual midi device (<a href="http://www.nerds.de/en/loopbe1.html">LoopBe1</a>) which is software that&#8217;s designed to behave as though it were a piece of midi hardware. This is specified in Traktor 2 Scratch Pro under Preferences > Controller Manager.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/traktor2ScratchPro1.jpg" alt="" title="traktor2ScratchPro" width="640" height="722" class="alignnone size-full wp-image-312" /><sup>NO YOU CHECK YOUR OUTPUT ROUTING, BITCH! btw, this is a s&#8217;up tag, so, you know, s&#8217;up?</sup></p>
<p>I&#8217;m using Node.js to receive the data and send to the arduino. The Node.js application uses <a href="https://github.com/justinlatimer/node-midi">Justin Latimer&#8217;s node-midi</a> to receive the midi in data and <a href="https://github.com/voodootikigod/node-serialport">Voodoo Tiki God&#8217;s node-Serialport</a> to send serial messages to the arduino.</p>
<p>The <a href="www.majorcallisto.com/wp-content/uploads/EtchAGearBoxMotorWorking.zip">arduino sketch</a> receives the messages via serial and uses a <a href="http://www.pololu.com/catalog/product/2503">Pololu MC33926</a> to send messages to the two gearbox motors.</p>
<p>I&#8217;m not going to include my whole node.js application because I&#8217;m a bit crap at node and embarassed, but here&#8217;s the whole server.js sketch. It should be all you need after you install the dependencies mentioned above:</p>
<div class="codesnip-container" >(function() {</p>
<p>  var midi;<br />
  midi = require(&#8220;midi&#8221;);<br />
  var SerialPort = require(&#8220;serialport&#8221;).SerialPort<br />
  var serialPort = new SerialPort(&#8220;COM13&#8243;, {<br />
    baudrate: 115200<br />
  });<br />
	serialPort.on(&#8220;open&#8221;, function () {<br />
		console.log(&#8216;open&#8217;);<br />
		serialPort.on(&#8216;data&#8217;, function(data) {<br />
			console.log(&#8216;data received: &#8216; + data);<br />
		});<br />
	});<br />
	var port = 0;<br />
	var input = new midi.input();</p>
<p>  	console.log(&#8216;port count: &#8216;+input.getPortCount());<br />
	console.log(&#8216;port name: &#8216;+input.getPortName(port));<br />
	var last_position = {a:0, b:0}<br />
	var seek_position = 1;<br />
	var max_speed = 0.1;<br />
	var max_range = 20;<br />
	var moving = {x:false, y:false}<br />
	input.on(&#8216;message&#8217;, function(deltaTime, message) {</p>
<p>		//console.log(message);<br />
		if (message[0] == 190){<br />
			//deck a<br />
			seek_position = message[2]/127*100;<br />
			diff = (seek_position &#8211; last_position.a);<br />
			last_position.a = seek_position;</p>
<p>			if (Math.abs(diff) > 90){<br />
				return;<br />
			}else{<br />
				if (diff < 0){<br />
					//console.log("A right:" + diff);<br />
					moveDrone("right", (Math.min(Math.abs(diff)/max_range)*max_speed, max_speed));<br />
				}else if (diff >0){<br />
					//console.log(&#8220;A left:&#8221; + diff);<br />
					moveDrone(&#8220;left&#8221;, (Math.min(Math.abs(diff)/max_range)*max_speed, max_speed));<br />
				}else{<br />
					//should never happen<br />
					//console.log(&#8220;stop&#8221;);<br />
					moveDrone(&#8220;stop&#8221;, 0);<br />
				}<br />
			}</p>
<p>		}else if(message[0] == 191){<br />
			//deck b<br />
			seek_position = message[2]/127*100;<br />
			diff = (seek_position &#8211; last_position.b);<br />
			last_position.b = seek_position;<br />
			if (Math.abs(diff) > 90){<br />
				return;<br />
			}else{<br />
				if (diff < 0){<br />
					//console.log("B up:" + diff);<br />
					moveDrone("back", (Math.min(Math.abs(diff)/max_range)*max_speed, max_speed));<br />
				}else if (diff >0){<br />
					//console.log(&#8220;B down:&#8221; + diff);<br />
					moveDrone(&#8220;front&#8221;, (Math.min(Math.abs(diff)/max_range)*max_speed, max_speed));<br />
				}else{<br />
					//should never happen<br />
					moveDrone(&#8220;stop&#8221;, 0);<br />
				}<br />
			}<br />
		}<br />
  });<br />
	function moveDrone($dir, $speed){<br />
		switch ($dir){<br />
			case &#8220;front&#8221;:<br />
			serialPort.write(&#8220;u\n&#8221;);<br />
			break;<br />
			case &#8220;back&#8221;:<br />
			serialPort.write(&#8220;d\n&#8221;);<br />
			break;<br />
			case &#8220;left&#8221;:<br />
			serialPort.write(&#8220;l\n&#8221;);<br />
			break;<br />
			case &#8220;right&#8221;:<br />
			serialPort.write(&#8220;r\n&#8221;);<br />
			break;<br />
		}<br />
		return;<br />
	}</p>
<p>	input.openPort(port);<br />
}).call(this);</p></div>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/etchasketch_01.jpg" alt="" title="etchasketch_01" width="640" height="397" class="alignnone size-full wp-image-313" /></p>
<p>The motors either advance or reverse in 10ms increments, hammering the motor shield with constant, tiny instructions. Because of the short increments, it appears to be continuous and fairly responsive to the record movements.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/etchasketch_02.jpg" alt="" title="etchasketch_02" width="640" height="480" class="alignnone size-full wp-image-314" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/uncategorized/etch-a-sketch-turntables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dragon Pumpkin Spring</title>
		<link>http://www.majorcallisto.com/projects/dragon-pumpkin-spring/</link>
		<comments>http://www.majorcallisto.com/projects/dragon-pumpkin-spring/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 04:10:32 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Spotlight: Hardware]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=293</guid>
		<description><![CDATA[For my recent talk at FITC&#8217;s Spotlight: Hardware, I decided to revisit my Halloween project the Dragon Pumpkin. Pumpkins are hard to find this time of year so I improvised with a watermelon. Everytime you say the words &#8220;trick or &#8230; <a href="http://www.majorcallisto.com/projects/dragon-pumpkin-spring/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For my recent talk at FITC&#8217;s <a href="http://fitc.ca/event/hardware/">Spotlight: Hardware</a>, I decided to revisit my Halloween project the Dragon Pumpkin. Pumpkins are hard to find this time of year so I improvised with a watermelon. Everytime you say the words &#8220;trick or treat&#8221; a fireball is shot out of it&#8217;s mouth. <a href="http://www.majorcallisto.com/projects/dragon-pumpkin/">How to make a dragon pumpkin.</a></p>
<p><iframe src="http://player.vimeo.com/video/68022171" width="640" height="480" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/68022171">Dragon Pumpkin Spring</a> from <a href="http://vimeo.com/blacksanta69">Christopher Lewis</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>The Microsoft Kinect has a lot of powerful motion technology, but it also has an under appreciated microphone array which is great at localising audio, reducing background noise and text recognition.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_00.jpg" alt="" title="pumpkin_00" width="800" height="600" class="alignnone size-full wp-image-297" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_05.jpg" alt="" title="pumpkin_05" width="399" height="600" class="alignnone size-full wp-image-298" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_04.jpg" alt="" title="pumpkin_04" width="399" height="600" class="alignnone size-full wp-image-299" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_03.jpg" alt="" title="pumpkin_03" width="399" height="600" class="alignnone size-full wp-image-300" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_02.jpg" alt="" title="pumpkin_02" width="800" height="600" class="alignnone size-full wp-image-301" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/pumpkin_01.jpg" alt="" title="pumpkin_01" width="800" height="600" class="alignnone size-full wp-image-302" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/dragon-pumpkin-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mouse Hacks</title>
		<link>http://www.majorcallisto.com/projects/spotlight-hardware-beyond-the-mouse/</link>
		<comments>http://www.majorcallisto.com/projects/spotlight-hardware-beyond-the-mouse/#comments</comments>
		<pubDate>Mon, 10 Jun 2013 03:59:11 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Spotlight: Hardware]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=267</guid>
		<description><![CDATA[On June 8, 2013, I gave a presentation at FITC&#8217;s Spotlight: Hardware. It was a great event that covered many topics related to hardware and physical computing. As silly as it is, I presented what I think is one of &#8230; <a href="http://www.majorcallisto.com/projects/spotlight-hardware-beyond-the-mouse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_011.jpg" alt="" title="mouse_01" width="640" height="426" class="alignnone size-full wp-image-273" /></p>
<p>On June 8, 2013, I gave a presentation at FITC&#8217;s Spotlight: Hardware. It was a great event that covered many topics related to hardware and physical computing. As silly as it is, I presented what I think is one of the best ways to get into making physical interactive installations is by doing &#8220;mouse hack&#8221;.</p>
<p>A mouse is the quickest and easiest way to include digital interaction in real objects with the added bonus that mice are fairly inexpensive and people often have a few kicking around. The goal is to add a couple of wires that will be another way to perform a click. Because a mouse click is an &#8220;OS&#8221; level interaction, no or few programming skills required. Also, using a wireless mouse means you can create a wireless digitally enabled interactive object. If you do need to buy a mouse, $5.99 is the most inexpensive price I could find in the real world &#8211; I&#8217;m sure you can find cheaper online. The important thing to remember is that mice are inexpensive, so you shouldn&#8217;t be afraid of opening them and maybe screwing up.</p>
<p>Tools:<br />
Mouse<br />
Wire &#8211; anything will do, but hookup wire is the best<br />
Wire Strippers &#8211; an exacto works &#8211; &#8220;automatic&#8221; wire strippers are the best<br />
Screw Driver<br />
Pliers (optional)<br />
Solder (optional)<br />
Solder Gun (optional, but highliy recommended<br />
Electrical tape &#8211; so helpful</p>
<p>Soldering scares a lot of people, but it&#8217;s a great technique and will make the whole thing easier. I think this is the best video I&#8217;ve seen about how to solder:</p>
<p><iframe width="640" height="480" src="http://www.youtube.com/embed/I_NU2ruzyc4" frameborder="0" allowfullscreen></iframe></p>
<p>Insert the battery into the mouse to make sure it works. If the mouse has one of those annoying on/off switches, turn the mouse on and then remove battery. These switches pop out and get lost, so you want to make sure that the mouse is on in case you can&#8217;t get the switch back in position.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_03.jpg" alt="" title="mouse_03" width="640" height="426" class="alignnone size-full wp-image-274" /></p>
<p>Often the screws are hidden under LRF. (little rubber feet) Pull off the LRFs to reveal the screws, and set them aside. Unscrew the case and open up the mouse.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_04.jpg" alt="" title="mouse_04" width="640" height="426" class="alignnone size-full wp-image-275" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_05.jpg" alt="" title="mouse_05" width="640" height="426" class="alignnone size-full wp-image-276" /></p>
<p>Take a photo to remember where things go. Sometimes it&#8217;s good to tape parts that look loose &#8211; the battery housing and mouse wheel, in my case. Look for the thing that might be a button &#8211; it&#8217;s marked SW1 on this particular mouse &#8211; presumably for &#8220;Switch 1&#8243;.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_06.jpg" alt="" title="mouse_06" width="640" height="426" class="alignnone size-full wp-image-277" /></p>
<p>Put your hand over the mouse to make sure it&#8217;s the correct button &#8211; nothing bad will happen if you press the button.</p>
<p>Pull the circuit out. Things might pop out. Oh well.</p>
<p>There are two little nubs directly under the button. Touching these nubs together is the same as clicking the mouse button &#8211; nice!</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_07.jpg" alt="" title="mouse_07" width="640" height="426" class="alignnone size-full wp-image-278" /></p>
<p>Strip the wires. I like to tie a knot in them so they stay close together and are easy to work with.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_08.jpg" alt="" title="mouse_08" width="640" height="426" class="alignnone size-full wp-image-279" /></p>
<p>Put the wire through the stripper and align it to the correct guage. If you don&#8217;t know, then eyeball it.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_11.jpg" alt="" title="mouse_11" width="640" height="426" class="alignnone size-full wp-image-280" /></p>
<p>Use some pliers to wrap the stripped wire around the nub. Solder it into position. If you&#8217;re afraid of soldering, you can use electrical tape, but it won&#8217;t be as reliable.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_12.jpg" alt="" title="mouse_12" width="640" height="426" class="alignnone size-full wp-image-281" /></p>
<p>By this point the on/off switch has probably fallen out. Worry about it later or throw it away. Good thing you made sure the mouse was turned on earlier.</p>
<p>Try your best to put some tape between the two wires &#8211; if they touch by themselves it will count as a click, so you want to avoid that. You can use hot glue if you have trouble &#8211; it&#8217;s not the best approach, but it&#8217;s the easiest.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_13.jpg" alt="" title="mouse_13" width="640" height="426" class="alignnone size-full wp-image-282" /></p>
<p>Put your finger over the mouse to make sure you got the correct button &#8211; I&#8217;ve screwed this up a few times.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_14.jpg" alt="" title="mouse_14" width="640" height="426" class="alignnone size-full wp-image-283" /></p>
<p>Shove everything back together</p>
<p>Cut a notch in the front so the wires have a place to come out of the housing.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_15.jpg" alt="" title="mouse_15" width="640" height="426" class="alignnone size-full wp-image-284" /></p>
<p>Close the mouse, turn it on, plug it in and touch the wires together &#8211; that&#8217;s it.</p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_16.jpg" alt="" title="mouse_16" width="640" height="425" class="alignnone size-full wp-image-286" /></p>
<p><img src="http://www.majorcallisto.com/wp-content/uploads/mouse_171.jpg" alt="" title="mouse_17" width="640" height="426" class="alignnone size-full wp-image-285" /></p>
<p>You could embed these mice in:<br />
Footplates, switches, fridges, cookie jars, medicine cabinets, pill bottles, exercise equipment, etc.</p>
<h3>Counters</h3>
<p>You can now use the mouse to count things. This can be done easily by creating a simple html page with a button. Positioning the mouse over the button and touching the two wires together counts as a click. This requires very little HTML:</p>
<div class="codesnip-container" >
<p lang="en">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var countTotal = 0;<br />
function countClick()<br />
{<br />
countTotal ++;<br />
document.getElementById(&#8220;countOutput&#8221;).innerHTML = &#8220;&lt;h2&gt;Count Output: &#8220;+countTotal+&#8221;&lt;/h2&gt;&#8221;;<br />
}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;countOutput&#8221;&gt;&lt;h2&gt;Count Output&lt;/h2&gt;&lt;/div&gt;<br />
&lt;button type=&#8221;button&#8221; onClick=&#8221;countClick()&#8221;&gt;COUNT&lt;/button&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
</div>
<p><a href="http://www.majorcallisto.com/wp-content/uploads/mouseClickCount.html" target="_blank">Click Count Demo</a></p>
<p>Tying the button click to something like a <a href="https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide" target="_blank">google analytics event</a> would hypothetically allow you to permanently store your results online. </p>
<p>Why is this approach better than a physical count clicker? Storing data digitally, not requiring mechanical activation and being able to add this to almost any object are definite benefits.</p>
<h3>Trigger</h3>
<p>Audio or video can be easily triggered by a mouse click if the media player is in full screen mode. Quicktime, Youtube, Flash and VLC can all be setup to do this.</p>
<p>Still images can be triggered using Keynote/ Powerpoint or a picture viewing app. like irFanView</p>
<p>You can even make an html based presentation by using Javascript to hide the mouse and advancing a background image. In <a href="http://www.majorcallisto.com/wp-content/uploads/mouseClickCount.html" target="_blank">The Evolution of Type Demo</a> with graphic by Mikaela Couch, the background advances with each mouse click. If the mouse wires were embedded in a physical object, such as a printing press, you could make pulling a lever the trigger action to advance the timeline display.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/spotlight-hardware-beyond-the-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get to know me on FITC.ca</title>
		<link>http://www.majorcallisto.com/uncategorized/member-interview-on-fitc/</link>
		<comments>http://www.majorcallisto.com/uncategorized/member-interview-on-fitc/#comments</comments>
		<pubDate>Thu, 30 May 2013 23:48:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=256</guid>
		<description><![CDATA[Here&#8217;s an interview I just did with Caroline at FITC. In it, I discuss some of the work I&#8217;ve been doing with the group Creative Technologists of Toronto, some of my reasoning for being a maker and what I&#8217;m going &#8230; <a href="http://www.majorcallisto.com/uncategorized/member-interview-on-fitc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interview I just did with Caroline at FITC. In it, I discuss some of the work I&#8217;ve been doing with the group <a href="http://www.cttoronto.com">Creative Technologists of Toronto</a>, some of my reasoning for being a maker and what I&#8217;m going to be discussing at the upcoming Spotlight: Hardware event: <a href="http://fitc.ca/article/get-to-know-christopher-lewis/">Get to know Christopher Lewis</a></p>
<p>Come meet me and members of <a href="http://www.cttoronto.com">Creative Technologists of Toronto</a> when I present at <a href="http://fitc.ca/event/hardware/">Spotlight: Hardware</a> on June 8. Use the discount code &#8216;cttoronto&#8217; for 10% off.</p>
<p><a href="http://www.fitc.ca/hardware"><img src="http://www.majorcallisto.com/wp-content/uploads/Spotlight_BigBox_300x250.jpg" alt="" title="Spotlight_BigBox_300x250" width="300" height="250" class="alignnone size-full wp-image-258" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/uncategorized/member-interview-on-fitc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dragon Pumpkin</title>
		<link>http://www.majorcallisto.com/projects/dragon-pumpkin/</link>
		<comments>http://www.majorcallisto.com/projects/dragon-pumpkin/#comments</comments>
		<pubDate>Fri, 02 Nov 2012 18:31:28 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=206</guid>
		<description><![CDATA[Dragon Pumpkin &#8211; Halloween 2012 from Christopher Lewis on Vimeo. I decided to add a bit of &#8220;Trick&#8221; back into Halloween. The Dragon Pumpkin is a voice activated fire breathing pumpkin; saying the words &#8220;Trick or Treat&#8221; triggers a fireball. &#8230; <a href="http://www.majorcallisto.com/projects/dragon-pumpkin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/52648057?badge=0" width="640" height="361" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/52648057">Dragon Pumpkin &#8211; Halloween 2012</a> from <a href="http://vimeo.com/blacksanta69">Christopher Lewis</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>I decided to add a bit of &#8220;Trick&#8221; back into Halloween. The Dragon Pumpkin is a voice activated fire breathing pumpkin; saying the words &#8220;Trick or Treat&#8221; triggers a fireball. What&#8217;s more awesome than fireballs?</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145736871/" title="DSC_3961 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8190/8145736871_9ba80b5298_z.jpg" width="640" height="425" alt="DSC_3961"></a></p>
<p>The Windows Kinect has a 4 microphone array and amazing speech recognition capabilities. Using the Speech Basics example that is packaged with the <a title="Kinect for Windows" href="http://kinectforwindows.com" target="_blank">Kinect SDK</a>, a C++ application recognizes the phrase &#8220;Trick or Treat&#8221; and sends a serial message to the Arduino. A simple sketch on the Arduino receives the serial message and turns on pin 13 &#8211; fairly standard &#8211; which fires a <a title="Controlling Solenoids" href="http://www.instructables.com/id/Controlling-solenoids-with-arduino/">solenoid</a> circuit triggering the fireball.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145768204/" title="DSC_3951 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8327/8145768204_4619bf6eff_z.jpg" width="640" height="425" alt="DSC_3951"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145770548/" title="DSC_3949 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8186/8145770548_16d262acbc_z.jpg" width="640" height="425" alt="DSC_3949"></a></p>
<p>This whole project is extremely dangerous, so I officially discourage anyone from attempting to make a fireball. I&#8217;m skipping that step of my build intentionally. However, I would recommend getting in touch with your nearest Hacker Space if you&#8217;re interested in learning how to make a &#8220;poofer&#8221;. I wouldn&#8217;t advocate anyone else playing with fire, but what I learned about controlling an arduino via Kinect voice commands is quite useful.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145743823/" title="DSC_3944 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8192/8145743823_87b0fe3b4a_z.jpg" width="640" height="425" alt="DSC_3944"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145748789/" title="DSC_3935 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8196/8145748789_fd5799bcc2_z.jpg" width="640" height="425" alt="DSC_3935"></a></p>
<p>The most difficult part of the whole project was getting Visual Studio installed and running.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145753135/" title="DSC_3933 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8331/8145753135_cd91fbc599_z.jpg" width="640" height="425" alt="DSC_3933"></a></p>
<p>For those interested in getting a Kinect for Windows talking to arduino, here&#8217;s a light overview of what I did:</p>
<h2>Kinect Voice Recognition</h2>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8148461345/" title="Kinect for Windows by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8326/8148461345_a9ed62ec1d_z.jpg" width="640" height="425" alt="Kinect for Windows"></a></p>
<p>I&#8217;m not sure if I&#8217;m allowed to redistribute the Microsoft Kinect examples, so instead of supplying a file, here are the steps I took:</p>
<ol>
<li>Download and install <a title="Visual Studio 2012" href="http://www.microsoft.com/visualstudio/eng/downloads">Visual Studio 2012</a></li>
<li>Download and install <a title="Microsoft Kinect SDK" href="http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx">Microsoft Kinect SDK, Toolkit and Microsoft Speech Platform</a></li>
<li>Open the Microsoft Kinect Toolkit Browser</li>
<li>Go to the Samples: C++ tab</li>
<li>Scroll down to the Speech Basics D2D and Install</li>
<li>Open the Speech Basics D2D in Microsoft Visual Studio 2012</li>
<li>Edit the SpeechBasics-D2D.grxml file. This is where you add the words. My file looks like this:
<div class="codesnip-container" >
<div class="xml codesnip" style="font-family:monospace;"><span class="sc3"><span class="re1">&lt;grammar</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">xml:lang</span>=<span class="st0">&quot;en-US&quot;</span> <span class="re0">root</span>=<span class="st0">&quot;rootRule&quot;</span> <span class="re0">tag-format</span>=<span class="st0">&quot;semantics/1.0-literals&quot;</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://www.w3.org/2001/06/grammar&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;rule</span> <span class="re0">id</span>=<span class="st0">&quot;rootRule&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;one-of<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;item<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;tag<span class="re2">&gt;</span></span></span>TRICK OR TREAT<span class="sc3"><span class="re1">&lt;/tag<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;one-of<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;item<span class="re2">&gt;</span></span></span> trick or treat <span class="sc3"><span class="re1">&lt;/item<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/one-of<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/item<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/one-of<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/rule<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/grammar<span class="re2">&gt;</span></span></span></div>
</div>
</li>
<li>In SpeechBasics.cpp add your Trick or Treat action. For example:
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="kw4">const</span> SpeechTagToAction Map<span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy1">=</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>L<span class="st0">&quot;TRICK OR TREAT&quot;</span>, TurtleActionTrickOrTreat<span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><span class="sy4">;</span></div>
</div>
</li>
<li>In TurtleController.cpp I added the following at the top of the file:
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="co2">#include&lt;stdio.h&gt;</span><br />
<span class="co2">#include&lt;stdlib.h&gt;</span></div>
</div>
</li>
<li><b>Here&#8217;s where the Kinect messages the arduino via serial.</b> In TurtleController.cpp add a case for your Trick or Treat action to the switch statement in the &#8220;void TurtleController::DoAction(TurtleAction action)&#8221; code block. I got rid of the cases for all the other directions:
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="kw1">case</span> TurtleActionTrickOrTreat<span class="sy4">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; m_CurrentDirection <span class="sy1">=</span> NextDirection<span class="br0">&#40;</span>m_CurrentDirection, <span class="kw2">false</span><span class="br0">&#41;</span><span class="sy4">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// We take a left turn to mean a counter-clockwise right angle rotation for the displayed turtle.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; m_CurrentRotationAngle <span class="sy2">-</span><span class="sy1">=</span> <span class="nu0">47</span><span class="sy4">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">FILE</span><span class="sy2">*</span> port<span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">system</span><span class="br0">&#40;</span> <span class="st0">&quot;MODE COM4: BAUD=9600 PARITY=n DATA=8 STOP=1&quot;</span> <span class="br0">&#41;</span> <span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; port <span class="sy1">=</span> <span class="kw3">fopen</span><span class="br0">&#40;</span> <span class="st0">&quot;COM4:&quot;</span>, <span class="st0">&quot;wb&quot;</span> <span class="br0">&#41;</span> <span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">printf</span><span class="br0">&#40;</span><span class="st0">&quot;1&quot;</span><span class="br0">&#41;</span><span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">fprintf</span><span class="br0">&#40;</span> port, <span class="st0">&quot;1&quot;</span> <span class="br0">&#41;</span> <span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">fclose</span><span class="br0">&#40;</span> port <span class="br0">&#41;</span> <span class="sy4">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">break</span><span class="sy4">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</div>
</li>
<li>Edit SpeechBasics.cpp and replace the SpeechTagToAction method with the following
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="kw4">const</span> SpeechTagToAction Map<span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="sy1">=</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span>L<span class="st0">&quot;TRICK OR TREAT&quot;</span>, TurtleActionTrickOrTreat<span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</div>
</li>
<li>In TurtleController.h replace the &#8220;enum TurtleAction&#8221; block with the following:
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="kw2">enum</span> TurtleAction<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; TurtleActionTrickOrTreat,<br />
&nbsp; &nbsp; TurtleActionNone<br />
<span class="br0">&#125;</span><span class="sy4">;</span></div>
</div>
</li>
<li>That should be it &#8211; I think&#8230; Compile and you should have something that recognizes your Kinect and sends a serial message to your arduino. If the modifications work, the Turtle should turn 45 degrees everytime you say &#8220;Trick or Treat&#8221;.<br />
<a href="http://www.flickr.com/photos/blacksanta_69/8148490416/" title="Kinect Application by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8187/8148490416_1f77f80456.jpg" width="640" height="425" alt="Kinect Application"></a>
</li>
</ol>
<h2>The Arduino Sketch</h2>
<ol>
<li>I&#8217;m using a pretty simple sketch, modified from the blink sketch and <a href="http://webhole.net/2010/05/01/arduino-visual-c-plus-plus-tutorial/" target="_blank">Arduino Serial Communication</a>:
<div class="codesnip-container" >
<div class="c codesnip" style="font-family:monospace;"><span class="kw4">int</span> firePin <span class="sy0">=</span> <span class="nu0">13</span><span class="sy0">;</span><br />
<span class="kw4">int</span> state<span class="sy0">=</span><span class="nu0">0</span><span class="sy0">;</span><br />
<span class="kw4">void</span> setup<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; pinMode<span class="br0">&#40;</span>firePin<span class="sy0">,</span> OUTPUT<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// pin will be used to for output</span><br />
&nbsp; &nbsp; Serial.<span class="me1">begin</span><span class="br0">&#40;</span>9600<span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// same as in your c++ script</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw4">void</span> loop<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>Serial.<span class="me1">available</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">&gt;</span> 0<span class="br0">&#41;</span><br />
&nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; state <span class="sy0">=</span> Serial.<span class="me1">read</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// used to read incoming data</span></p>
<p>&nbsp; &nbsp; <span class="kw1">switch</span><span class="br0">&#40;</span>state<span class="br0">&#41;</span><span class="co1">// see what was sent to the board</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">case</span> <span class="st0">&#8217;1&#8242;</span><span class="sy0">:</span> <span class="co1">// if the the one was sent</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; flameOn<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; delay<span class="br0">&#40;</span>750<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; flameOff<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">break</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">case</span> <span class="st0">&#8217;0&#8242;</span><span class="sy0">:</span> <span class="co1">// if 0 was sent</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; flameOff<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">break</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">default</span><span class="sy0">:</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">break</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw4">void</span> flameOn<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; digitalWrite<span class="br0">&#40;</span>firePin<span class="sy0">,</span>HIGH<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw4">void</span> flameOff<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; digitalWrite<span class="br0">&#40;</span>firePin<span class="sy0">,</span>LOW<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
</li>
<li>Run the sketch. When the Serial message &#8220;1&#8243; is sent to the arduino, the on-board led or whatever is on Pin 13 will light up.</li>
</ol>
<p><a href="http://www.majorcallisto.com/wp-content/uploads/serialFlameControl.ino">serialFlameControl.ino</a></p>
<p>The solenoid circuit is attached the Pin 13 on the arduino. It allows for a Transistor to activate a 12v solenoid without frying the arduino board. The circuit was taken from <a title="Controlling Solenoids" href="http://www.instructables.com/id/Controlling-solenoids-with-arduino/">Controlling Solenoids with Arduino</a>.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8148496936/" title="Arduino and custom Solenoid Circuit by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8192/8148496936_d5fba17cb0_z.jpg" width="640" height="425" alt="Arduino and custom Solenoid Circuit"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8145798772/" title="DSC_3913 by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8463/8145798772_23c0b44ddb_z.jpg" width="640" height="425" alt="DSC_3913"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/sets/72157631905588280/with/8145798772/">More photos</a></p>
<p>Special Thanks to Demi at <a href="http://www.splitelement.com">SplitElement Inc.</a> for the use of the Kinect for Windows and to <a href="http://www.newedist.com">LB</a> for the voice talent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/dragon-pumpkin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Digital Opera Backdrops &#8211; Cavalleria Rusticana and Pagliacci</title>
		<link>http://www.majorcallisto.com/projects/digital-opera-backdrops-cavalleria-rusticana-and-pagliacci/</link>
		<comments>http://www.majorcallisto.com/projects/digital-opera-backdrops-cavalleria-rusticana-and-pagliacci/#comments</comments>
		<pubDate>Mon, 22 Oct 2012 17:00:43 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=248</guid>
		<description><![CDATA[In October 2011, I was Art Director for performances of Cavalleria Rusticana and Pagliacci, directed by Jessie Fraser and performed by Opera Belcanto. The two operas are often performed together as a double bill since they&#8217;re both fairly short and &#8230; <a href="http://www.majorcallisto.com/projects/digital-opera-backdrops-cavalleria-rusticana-and-pagliacci/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe width="640" height="360" src="http://www.youtube.com/embed/ooUvSMhpbHw?list=UU-3u18YOm5rFJMblFimkwVA" frameborder="0" allowfullscreen></iframe></p>
<p>In October 2011, I was Art Director for performances of Cavalleria Rusticana and Pagliacci, directed by Jessie Fraser and performed by Opera Belcanto. The two operas are often performed together as a double bill since they&#8217;re both fairly short and are thematic and stylistically similar.</p>
<p>I created a digital backdrop in the form of a fullscreen Flash application that could be controlled by the theatre staff. Hitting different shortcut keys would initiate different sequences of the backdrop which were timed to match the performance.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270841704/" title="Cavalleria Rusticana - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6036/6270841704_7fd814f663_z.jpg" width="640" height="425" alt="Cavalleria Rusticana - Day 2"></a></p>
<p>Both operas featured a timelapse video of the sky, captured from my balconey, to evoke the passage of time.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270844742/" title="Cavalleria Rusticana - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6037/6270844742_5d03887859_z.jpg" width="640" height="425" alt="Cavalleria Rusticana - Day 2"></a></p>
<p>During the introduction of Cavalleria Rusticana, elements of the small Sicilian town, Vizzini, fade in to establish the location. The town was created by Photoshopping elements from a variety of sources. Some of the elements were taken from rights-cleared photos of the real town Vizzini. Additional details were taken from my own photography, such as a stone fence photographed at Riverdale Farm; it&#8217;s a Toronto/ Vizzini mashup.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270848028/" title="Cavalleria Rusticana - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6042/6270848028_fb60a29918_z.jpg" width="640" height="425" alt="Cavalleria Rusticana - Day 2"></a></p>
<p>At one point during the Cavalleria Rusticana, there is an Easter procession. To fill out the number of performers, I created a sequence featuring silhouettes of procession participants, triggered by shortcut key.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270324189/" title="Cavalleria Rusticana - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6239/6270324189_f86b9ee085_z.jpg" width="640" height="425" alt="Cavalleria Rusticana - Day 2"></a></p>
<p>To match the content of the opera, a wine shop and church were included as prominent elements in the backdrop. Additionally, a British style vardo (gypsy wagon) is parked behind the wine shop; I added the vardo to connect the two operas. It&#8217;s implied that the performers were performing in Vizzini before appearing in Pagliacci. At the risk of spoilers, both operas feature murder following affairs; I was amused with the idea that murderous rage was like a disease that the Pagliacci characters brought with them from Vizzini. I included the original poster for Pagliacci on the wine shop wall in my depiction of Vizzini and again in Pagliacci.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270298709/" title="Cavalleria Rusticana - Day 1 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6038/6270298709_bb20c15175_z.jpg" width="640" height="425" alt="Cavalleria Rusticana - Day 1"></a></p>
<p>To transition between the two operas, I gradually faded out elements of Vizzini and played the sky timelapse quickly in reverse to return to day.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270343211/" title="Pagliacci - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6096/6270343211_80165d6183_z.jpg" width="640" height="425" alt="Pagliacci - Day 2"></a></p>
<p>Pagliacci was set in the small town of Taormina where travelling performers arrive to entertain the town. I decided that the performers would set camp and perform in a secluded or less travelled area on the outskirts of town, similar to the locations that circuses always seem to be located. The covered area on the left and brick wall are both from the pig pen at Riverdale Farm.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270879056/" title="Pagliacci - Day 2 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6225/6270879056_f3c92eac4e_z.jpg" width="640" height="425" alt="Pagliacci - Day 2"></a></p>
<p>A shortcut key was added to darken the backdrop to create a more intimate scene.</p>
<p>http://www.flickr.com/photos/blacksanta_69/6270895286/in/set-72157627830034153/</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/6270371161/in/set-72157627830034153/"><img src="http://farm7.staticflickr.com/6044/6270371161_fb08a80525_z.jpg" alt="Pagliacci - Day 2" width="640" height="425" /></a></p>
<p>During the curtain call, the backdrop fades out to bring the audience back to reality. I&#8217;m proudly receiving my adulation on the very far left.</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/8JwhDT_W8sY?list=UU-3u18YOm5rFJMblFimkwVA" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/digital-opera-backdrops-cavalleria-rusticana-and-pagliacci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Twitter Follow Button for AS3 Flash</title>
		<link>http://www.majorcallisto.com/uncategorized/a-twitter-follow-button-for-as3-flash/</link>
		<comments>http://www.majorcallisto.com/uncategorized/a-twitter-follow-button-for-as3-flash/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 03:52:18 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=181</guid>
		<description><![CDATA[// Earlier this year, Twitter introduced Web Intents as an easy way to Tweet, Reply, Retweet, Favorite, and Follow. Web Intents are meant to be used with popups, which means I can easily adapt from my previous Tweet Button for &#8230; <a href="http://www.majorcallisto.com/uncategorized/a-twitter-follow-button-for-as3-flash/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
    function openTweetWin (url) { 		window.open(url, "tweetThis", "width=550,height=450,toolbar=no,scrollbars=no");     }
// ]]&gt;</script></p>
<p><a href="http://www.majorcallisto.com/wp-content/uploads/miniProfileScreen.jpg"><img src="http://www.majorcallisto.com/wp-content/uploads/miniProfileScreen.jpg" alt="Follow and Mini-profile" title="Follow and Mini-profile" width="558" height="541" class="alignnone size-full wp-image-185" /></a></p>
<p>Earlier this year, Twitter introduced <a href="https://dev.twitter.com/docs/intents" target="_blank">Web Intents</a> as an easy way to Tweet, Reply, Retweet, Favorite, and Follow. Web Intents are meant to be used with popups, which means I can easily adapt from my previous <a href="http://www.majorcallisto.com/projects/a-tweet-button-for-flash/">Tweet Button for Flash</a> technique: add a javascript popup to the page, set some variables and call the popup from Flash.</p>
<p>Twitter introduced a <a href="https://dev.twitter.com/docs/follow-button" target="_blank">Follow Button</a> that behaves similarly to the <a href="https://dev.twitter.com/docs/tweet-button" target="_blank">Tweet Button</a>, but their claims that it, &#8220;uses the same implementation model&#8221;, is the tiniest bit bullshit. The Follow Button relies on Javascript in ways that we can&#8217;t easily use with Flash.</p>
<p>Our Web Intent Follow Button opens a popup window with a Mini-profile page, as pictured above. The Web Intent Follow Button uses either one of the following two values:</p>
<ul>
<li><strong>screen_name</strong> is the name of the twitter user you&#8217;d like to follow.  <em>e.g. @blacksanta_69</em></li>
<li><strong>user_id</strong> is the id of the twitter user you&#8217;d like to follow. I had a hard time finding my twitter id so I&#8217;m using screen_name instead.</li>
</ul>
<p>Like before, you drop the &#8216;www&#8217; when using Web Intents.</p>
<p>1. The Popup Javascript function needs to be added to your html page in the &lt;head&gt; part of the page. The width and height are hardcoded in the javascript to reflect the Twitter recommended dimensions of a Tweet window. However, this can easily be passed as a parameter from Flash if you want.</p>
<div class="codesnip-container" >
<div class="javascript codesnip" style="font-family:monospace;"><span class="kw2">function</span> openTweetWin <span class="br0">&#40;</span>url<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
window.<span class="kw3">open</span><span class="br0">&#40;</span>url<span class="sy0">,</span> <span class="st0">&quot;tweetThis&quot;</span><span class="sy0">,</span> <span class="st0">&quot;width=550,height=450,toolbar=no,scrollbars=no&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>2. Create a button in flash with the instance name btn_follow and add the following code. It&#8217;s worth noting that this works everywhere except within the Flash IDE, so test it on the html page</p>
<div class="codesnip-container" >
<div class="actionscript codesnip" style="font-family:monospace;"><span class="co1">//Add an Event Listener for the button</span><br />
btn_follow.<span class="me1">addEventListener</span><span class="br0">&#40;</span>MouseEvent.<span class="me1">CLICK</span>, clickFollow<span class="br0">&#41;</span>;<br />
btn_follow.<span class="me1">buttonMode</span> = <span class="kw2">true</span>;</p>
<p><span class="kw2">function</span> clickFollow<span class="br0">&#40;</span><span class="kw3">e</span>:Event<span class="br0">&#41;</span>:<span class="kw3">void</span><span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//The path to the follow &quot;intent&quot; page</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> path:URLRequest = <span class="kw2">new</span> URLRequest<span class="br0">&#40;</span><span class="st0">&quot;https://twitter.com/intent/user&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//using the GET method means you will use a QueryString to send the variables</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//twitter likes this. This is used as an alternate method if we don’t use</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//a javascript popup</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; path.<span class="me1">method</span> = URLRequestMethod.<span class="kw3">GET</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//The URLVariables class is a nice way to keep everything organised. There is the added bonus</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//that we can use these values if we GET instead of using the Javascript popup.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> tweetVars = <span class="kw2">new</span> URLVariables<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; tweetVars.<span class="me1">screen_name</span> = <span class="st0">&quot;blacksanta_69&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//tweetVars.user_id = &quot;&quot;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Set the URLRequest to include the URLVariables</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; path.<span class="kw3">data</span> = tweetVars;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//If Flash is okay with us using ExternalInterface</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>ExternalInterface.<span class="me1">available</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">try</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//We’re going to pass this as a string to javascript, so we have to</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//&quot;stringify&quot; it instead of using the URLVariable + URLRequest approach</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//I’m putting a dummy placeholder in the first position of the</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//QueryString so that I can shuffle my variables around without</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//worrying about who gets a ‘?’ instead of a ‘&amp;’. It’s faster than</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//writing a quick if statement, but commenting about it takes far more time ; )</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path.<span class="kw3">url</span> +=<span class="st0">&quot;?d=0&quot;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> <span class="kw1">each</span> <span class="kw1">in</span> tweetVars<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path.<span class="kw3">url</span> += <span class="st0">&quot;&amp;&quot;</span>+<span class="kw1">each</span>+<span class="st0">&quot;=&quot;</span>+tweetVars<span class="br0">&#91;</span><span class="kw1">each</span><span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Make a call to the openTweetWin Javascript function</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//and pass it the ‘stringified’ version of the QueryString</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ExternalInterface.<span class="kw3">call</span><span class="br0">&#40;</span><span class="st0">&quot;openTweetWin&quot;</span>, path.<span class="kw3">url</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw3">catch</span> <span class="br0">&#40;</span><span class="kw3">error</span>:SecurityError<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//If it doesn’t work just open a damn window.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navigateToURL<span class="br0">&#40;</span>path, <span class="st0">&quot;_blank&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw3">catch</span> <span class="br0">&#40;</span><span class="kw3">error</span>:<span class="kw3">Error</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//If it doesn’t work just open a damn window.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navigateToURL<span class="br0">&#40;</span>path, <span class="st0">&quot;_blank&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//If it doesn’t work just open a damn window.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; navigateToURL<span class="br0">&#40;</span>path, <span class="st0">&quot;_blank&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>Gives you:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_followButtonFlash_1269891518"
			class="flashmovie"
			width="120"
			height="42">
	<param name="movie" value="/flash/followButton_01/followButtonFlash.swf" />
	<param name="bgcolor" value="#EEEEEE" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/followButton_01/followButtonFlash.swf"
			name="fm_followButtonFlash_1269891518"
			width="120"
			height="42">
		<param name="bgcolor" value="#EEEEEE" />
	<!--<![endif]-->
		<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a> 
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<a title="Tweet Button" href="/flash/followButton_01/followButtonFlash.fla">Source FLA Here</a></p>
<p><strong>In HTML</strong></p>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc-1">&lt;!&#8211; Simply take the link to twitter and add a querystring (denoted by the &#8216;?&#8217;) at the end with your text Use the &#8216;+&#8217; symbol instead of spaces so browsers can understand (this is called escaping and can be done with javascript) &#8211;&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;https://twitter.com/intent/user?d=0&amp;screen_name=blacksanta_69&quot;</span> <span class="kw3">target</span><span class="sy0">=</span><span class="st0">&quot;_blank&quot;</span>&gt;</span>Follow<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span></div>
</div>
<p>Gives you:<br />
<em><!-- Simply take the link to twitter and add a querystring (denoted by the '?') at the end with your text Use the '+' symbol instead of spaces so browsers can understand (this is called escaping and can be done with javascript) --><a href="https://twitter.com/intent/user?d=0&#038;screen_name=blacksanta_69" target="_blank">Follow</a></em></p>
<p>Because there are so many easy to use features with Web Intents, the logical next step would be to build AS3 classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/uncategorized/a-twitter-follow-button-for-as3-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Camera-B-On TV-B-Gone</title>
		<link>http://www.majorcallisto.com/projects/camera-b-on/</link>
		<comments>http://www.majorcallisto.com/projects/camera-b-on/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 05:55:46 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=142</guid>
		<description><![CDATA[I have created a Camera-B-On TV-B-Gone. This fairly simple mod allows me to use my TV-B-Gone as a camera remote for my Nikon D90. In fact, this will work as a shutter remote for a lot of Nikon cameras. If &#8230; <a href="http://www.majorcallisto.com/projects/camera-b-on/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.majorcallisto.com/wp-content/uploads/DSC_7950.jpg"><img class="alignnone size-full wp-image-146" title="Camera-B-On Switch" src="http://www.majorcallisto.com/wp-content/uploads/DSC_7950.jpg" alt="Camera-B-On Switch" width="1024" height="872" /></a></p>
<p>I have created a Camera-B-On TV-B-Gone. This fairly simple mod allows me to use my TV-B-Gone as a camera remote for my Nikon D90. In fact, this will work as a shutter remote for a lot of Nikon cameras.</p>
<p>If you have a <a href="http://www.adafruit.com/products/46" target="_blank">USBTinyISP</a> you can easily make a Camera-B-On by upgrading your <a href="http://www.adafruit.com/products/73" target="_blank">TV-B-Gone</a>.</p>
<p><a href="http://www.majorcallisto.com/wp-content/uploads/CameraBOn.zip">Download Source CameraBOn.zip</a></p>
<p><iframe src="http://player.vimeo.com/video/31527148?title=0&amp;byline=0&amp;portrait=0&amp;autoplay=0" width="640" height="480" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></p>
<h3>Why make a Camera-B-On out of a TV-B-Gone?</h3>
<p>I&#8217;ve made camera remotes before using an arduino board and an IR LED, but there are issues with getting a good range and the form factor is a little bulky.</p>
<p>The Tv-B-Gone is compact, effective and comes built with the ability to have 2 states making it an attractive option. The Tv-B-Gone is about $10 cheaper than a brand name wireless release with the added bonus that you can fuck up TVs. Plus, the Tv-B-Gone was built to be a universal remote and it would be fairly easy to extend it to trigger many cameras. <strong>Right now my model only triggers Nikon cameras</strong> but it would be really easy to add others.</p>
<p>Unfortunately, most cameras need to be set to &#8220;remote&#8221; mode for this to work, so it&#8217;s not like you&#8217;re going to be triggering other people&#8217;s cameras &#8211; at least not to my knowledge. A guerrilla camera tool would be fantastic, but I don&#8217;t think it&#8217;s feasible.</p>
<h3>1. Adding the Nikon code</h3>
<p>The first step was determining the IR Code that would trigger my camera. When I built the arduino version of the shutter release, I used <a href="http://luckylarry.co.uk/arduino-projects/arduino-ir-remote-intervalometer-for-nikon-d80-that-means-timelapse-photography-yarrr/" target="_blank">Lucky Larry&#8217;s arduino intervalometer</a> code, which includes the timing I needed.</p>
<p>Armed with the timing information, I <a href="http://www.ladyada.net/make/tvbgone/design.html" target="_blank">downloaded the source code and read Lady Ada&#8217;s notes on the TV-B-Gone.</a></p>
<p>The program on the TV-B-Gone microcontroller cycles through about 115 known TV &#8220;power&#8221; codes. Each signal code is a series of very fast flashes of infrared light generated by an IR LED on a remote. These patterns of on and off times are chosen to try to avoid triggering the wrong devices. A camera&#8217;s wireless shutter release remote operates the same way.</p>
<p>For the Nikon wireless shutter the times look like this, in microseconds:<br />
2000 on, 27850 off,<br />
390 on, 1580 off,<br />
410 on, 3580 off,<br />
400 on, 63200 off</p>
<p>This signal is sent twice every time the shutter is meant to be &#8220;released&#8221;.</p>
<p>With the TV-B-Gone, the TV codes have been compressed to fit as many as possible on the ATTINY85V chip. Fortunately, <a href="http://www.ladyada.net/make/tvbgone/design.html" target="_blank">Lady Ada describes how this happens</a> well enough for me to do the same conversion by hand:</p>
<ol>
<li>I converted Lucky Larry&#8217;s times from microseconds to the appropriate unit by dividing by ten &#8211; I don&#8217;t think there is a name for that unit, but it&#8217;s the value used in the source code.
<div class="codesnip-container" >
<div class="c codesnip" style="font-family:monospace;"><span class="kw4">const</span> uint16_t code_nikonD90Times<span class="br0">&#91;</span><span class="br0">&#93;</span> PROGMEM <span class="sy0">=</span> <span class="br0">&#123;</span><br />
200<span class="sy0">,</span> 2785<span class="sy0">,</span><br />
39<span class="sy0">,</span> 158<span class="sy0">,</span><br />
41<span class="sy0">,</span> 358<span class="sy0">,</span><br />
40<span class="sy0">,</span> 6320<span class="sy0">,</span><br />
<span class="br0">&#125;</span><span class="sy0">;</span></div>
</div>
</li>
<li>I described the new value as an index in an array of on/off pairs. e.g. [0, 1, 2, 3]</li>
<li> and converted that index value to binary: [00, 01, 10, 11]</li>
<li>I converted those binary values to bytes and then to hex and doubled them to send the signal twice: 0x1b</li>
<li>
<div class="codesnip-container" >
<div class="c codesnip" style="font-family:monospace;"><span class="kw4">const</span> uint16_t code_nikonD90Times<span class="br0">&#91;</span><span class="br0">&#93;</span> PROGMEM <span class="sy0">=</span> <span class="br0">&#123;</span><br />
200<span class="sy0">,</span> 2785<span class="sy0">,</span><br />
39<span class="sy0">,</span> 158<span class="sy0">,</span><br />
41<span class="sy0">,</span> 358<span class="sy0">,</span><br />
40<span class="sy0">,</span> 6320<span class="sy0">,</span><br />
<span class="br0">&#125;</span><span class="sy0">;</span><br />
<span class="kw4">const</span> <span class="kw4">struct</span> IrCode code_nikonD90Code PROGMEM <span class="sy0">=</span> <span class="br0">&#123;</span><br />
freq_to_timerval<span class="br0">&#40;</span><span class="nu0">38400</span><span class="br0">&#41;</span><span class="sy0">,</span><br />
<span class="nu0">8</span><span class="sy0">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// # of pairs</span><br />
<span class="nu0">2</span><span class="sy0">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">// # of bits per index</span><br />
code_nikonD90Times<span class="sy0">,</span><br />
<span class="br0">&#123;</span><br />
0x1B<span class="sy0">,</span><br />
0x1B<span class="sy0">,</span><br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><span class="sy0">;</span></div>
</div>
</li>
</ol>
<p>I then created a .hex file with the new code added.</p>
<h3>2. Programming the TV-B-Gone with a USBTinyISP</h3>
<p>The next step was to program the chip with the new .hex file. This process should involve plugging the TV-B-Gone into my laptop using a <a href="http://www.ladyada.net/make/usbtinyisp/" target="_blank">USB Tiny ISP programmer</a> and software like <a href="http://www.bsdhome.com/avrdude/">AVRDUDE</a>. (<a href="http://www.ladyada.net/learn/avr/avrdude.html" target="_blank">Tutorial here</a>) Unfortunately, AVRDUDE wouldn&#8217;t recognise my TV-B-Gone.</p>
<p>A quick search (<a href="http://forums.adafruit.com/viewtopic.php?f=20&#038;t=4438" target="_blank">here</a>) seemed to suggest that the LEDs draw too much power and might interfere with the chip being recognised. The only suggestion was to disable the resistors or LEDs to program the board. I decided to continue testing and in the process accidentally blew out all four LEDs by using the USBTinyISP power and battery power at the same time. Luckily, this allowed the board to be recognised!</p>
<p>I made a quick trip to <a href="http://creatroninc.com/">Creatron</a> and picked up new IR LEDs and started again. I got the board programmed and the TV-B-Gone worked for both my camera and TV! Hooray!</p>
<h3>3. Camera or TV/Camera mode</h3>
<p>I decided to make one more mod to the TV-B-Gone.</p>
<p>The board allows you to solder a jumper to control whether it uses North America or European codes. I ditched the European codes and opted to add a camera only mode by soldering a tiny &#8220;ON&#8221; switch (or is it &#8220;NO&#8221;?) in place of the jumper. The switch sandwiched nicely between the existing switch and a capacitor. I figured it would be easy to remember &#8220;On&#8221; is for the camera mode since it&#8217;s called a Camera-B-<b>On</b>.</p>
<p><a href="http://www.majorcallisto.com/wp-content/uploads/DSC_7949.jpg"><img src="http://www.majorcallisto.com/wp-content/uploads/DSC_7949.jpg" alt="" title="On Switch" width="1024" height="680" class="alignnone size-full wp-image-168" /></a></p>
<p>Unfortunately, I had reinstalled the working LEDs. This meant that I wouldn&#8217;t be able to program the TV-B-Gone anymore. To deal with this, but not wanting to solder another switch to the board, I created a &#8220;detachable joint&#8221; jumper>resistor connection as pictured below to purposefully break the board when needed and allow me to reprogram:<br />
<a href="http://www.majorcallisto.com/wp-content/uploads/DSC_7947.jpg"><img class="alignnone size-full wp-image-145" title="Camera-B-On detachable joint" src="http://www.majorcallisto.com/wp-content/uploads/DSC_7947.jpg" alt="Camera-B-On detachable joint" width="1024" height="680" /></a></p>
<p>Here&#8217;s a self portrait from the above video; I guess autofocus doesn&#8217;t work:<br />
<a href="http://www.majorcallisto.com/wp-content/uploads/DSC_7902.jpg"><img src="http://www.majorcallisto.com/wp-content/uploads/DSC_7902.jpg" alt="Self Portrait" title="Self Portrait" width="1024" height="680" class="alignnone size-full wp-image-167" /></a></p>
<h3>Future Revisions</h3>
<p>The obvious next steps for the Camera-B-On is to add intervalometer functionality and support more camera brands. Intervalometers allow photographers to do time lapse. The fact that cameras don&#8217;t come with Intervalometer functionality built in baffles me &#8211; it would be so easy to add.</p>
<p>Here&#8217;s the arduino version I built a while ago:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="267" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.flickr.com/apps/video/stewart.swf?v=109786" /><param name="flashvars" value="intl_lang=en-us&amp;photo_secret=ee0ec76199&amp;photo_id=5569319197" /><param name="bgcolor" value="#000000" /><param name="allowFullScreen" value="true" /><param name="src" value="http://www.flickr.com/apps/video/stewart.swf?v=109786" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="400" height="267" src="http://www.flickr.com/apps/video/stewart.swf?v=109786" allowfullscreen="true" bgcolor="#000000" flashvars="intl_lang=en-us&amp;photo_secret=ee0ec76199&amp;photo_id=5569319197" data="http://www.flickr.com/apps/video/stewart.swf?v=109786"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/camera-b-on/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Paper Dolls Boutonnière</title>
		<link>http://www.majorcallisto.com/projects/paper-dolls-boutonniere/</link>
		<comments>http://www.majorcallisto.com/projects/paper-dolls-boutonniere/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 16:33:05 +0000</pubDate>
		<dc:creator>Major Callisto</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.majorcallisto.com/?p=238</guid>
		<description><![CDATA[In the Summer of 2011, The Grumpy Owl, a fantastic writer and patron of the bespoke, commissioned Breeyn and I to create paper, colour change boutonnières. The boutonnières were an extension of the successful paper dolls project we created for &#8230; <a href="http://www.majorcallisto.com/projects/paper-dolls-boutonniere/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/blacksanta_69/5971896354/" title="DSC_3622 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6124/5971896354_f95a07c55d_z.jpg" width="640" height="425" alt="DSC_3622"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971913122/" title="DSC_3638 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6011/5971913122_c8e356115d_z.jpg" width="640" height="425" alt="DSC_3638"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971329777/" title="DSC_3600 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6002/5971329777_cda910082a_z.jpg" width="640" height="425" alt="DSC_3600"></a></p>
<p>In the Summer of 2011, <a href="http://thegrumpyowl.com/">The Grumpy Owl</a>, a <a href="http://www.amazon.com/gp/product/1894063546/ref=as_li_tf_il?ie=UTF8&#038;tag=ryaoak0d-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399373&#038;creativeASIN=1894063546">fantastic writer</a> and patron of the bespoke, commissioned Breeyn and I to create paper, colour change boutonnières. The boutonnières were an extension of the successful paper dolls project we created for F.A.T. 2011. The Grumpy Owl beat me to the punch (by, like, 2 years) and <a href="http://thegrumpyowl.com/2011/11/10/glowing-boutonniere-by-breeyn-mccarney-and-christopher-lewis/">blogged</a> it previously.</p>
<p><iframe src="http://player.vimeo.com/video/57942146" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/57942146">Paper Dolls Boutonnière</a> from <a href="http://vimeo.com/blacksanta69">Christopher Lewis</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971323649/" title="DSC_3593 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6010/5971323649_9bbef04e37_z.jpg" width="640" height="425" alt="DSC_3593"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971324929/" title="DSC_3594 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6018/5971324929_0280dc1053_z.jpg" width="640" height="425" alt="DSC_3594"></a></p>
<p>The boutonnières consist of a simple electronic circuit: watch batteries power an RGB LED and each colour is individually controlled using 3 pot switches, allowing for an immeasurable number of variations in colour. Each switch basically increases resistance to each colour, RGB. Hot glue dimples (or nipples, as I prefer), were glued to the outside of the RGB LED allowing for the colour to spread in more directions.</p>
<p><iframe src="http://player.vimeo.com/video/57942147" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/57942147">Paper Dolls Boutonnière Electronics</a> from <a href="http://vimeo.com/blacksanta69">Christopher Lewis</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971330925/" title="DSC_3603 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6150/5971330925_37e69afd70_z.jpg" width="640" height="425" alt="DSC_3603"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971894210/" title="DSC_3613 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6150/5971894210_0076a494e4_z.jpg" width="640" height="425" alt="DSC_3613"></a></p>
<p>The electronics sat inside absolutely beautiful paper roses and carnations that Breeyn crafted. The paper flowers are detailed with stems constructed of silver wire.</p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971428231/" title="DSC_3671 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6143/5971428231_5ca6acb49b_z.jpg" width="640" height="425" alt="DSC_3671"></a></p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/8405993538/" title="Boutonniere electrical works by blacksanta_69, on Flickr"><img src="http://farm9.staticflickr.com/8517/8405993538_8a8f9dcce0_z.jpg" width="640" height="425" alt="Boutonniere electrical works"></a></p>
<p>Perhaps my favourite thing about this project, beyond the beauty of the end product, is the potential to change the significance of the boutonnière for different occasions. For example, Blue or purple carnations are considered a funerary flower. </p>
<p><a href="http://www.flickr.com/photos/blacksanta_69/5971326237/" title="DSC_3596 by blacksanta_69, on Flickr"><img src="http://farm7.staticflickr.com/6030/5971326237_5ae0cc7983_z.jpg" width="640" height="425" alt="DSC_3596"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.majorcallisto.com/projects/paper-dolls-boutonniere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
