<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: (English) Arduino Flash communication AS3 &#8211; Messenger</title>
	<atom:link href="http://www.kasperkamperman.com/blog/arduino-flash-communication-as3-messenger/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/</link>
	<description>Kasper Kamperman designs and creates interactive and responsive media applications for exhibitions, interior and events. He works as a teacher in the field of Art and Technology</description>
	<lastBuildDate>Sat, 28 Jan 2012 09:05:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ellie harrison</title>
		<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/comment-page-1/#comment-175</link>
		<dc:creator>ellie harrison</dc:creator>
		<pubDate>Sat, 26 Mar 2011 18:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857#comment-175</guid>
		<description>Hi Kasper, Thanks so much for your help. Yes, sorry I posted on the wrong page - I was mainly following the Firmata example and attempting to my code in Actionscript 3.0 (though I do not really know what I am doing)!

At the moment I am importing the following libraries in the 1st frame of the animation, where I also have your &#039;Flash - Arduino Example script&#039; pasted:

import flash.utils.getTimer;
import flash.display.Sprite;

Then on the frame in the animation where I am sending the signal to the Arduino I currently have this:

// Set Arduino outputs
a.writeDigitalPin(6,1);

var myTimer:Timer = new Timer(1000, 1); // 1 second
myTimer.addEventListener(TimerEvent.TIMER, runOnce);
myTimer.start();

function runOnce(event:TimerEvent):void {
trace(&quot;runOnce() called @ &quot; + getTimer() + &quot; ms&quot;);
}

// Set Arduino outputs
a.writeDigitalPin(6,0);

I copied this code from another example I found online of the Timer function. At the moment this is not returning any errors, but it also not causing any delay between the output pin being on and off - it flashes momentarily and not for the 1 second delay I thought I had set above. 

If you have any suggestions about what I&#039;m going wrong, that would be helpful! Does the frame rate of the movie affect this at all?

Thanks again for your help, Ellie</description>
		<content:encoded><![CDATA[<p>Hi Kasper, Thanks so much for your help. Yes, sorry I posted on the wrong page &#8211; I was mainly following the Firmata example and attempting to my code in Actionscript 3.0 (though I do not really know what I am doing)!</p>
<p>At the moment I am importing the following libraries in the 1st frame of the animation, where I also have your &#8216;Flash &#8211; Arduino Example script&#8217; pasted:</p>
<p>import flash.utils.getTimer;<br />
import flash.display.Sprite;</p>
<p>Then on the frame in the animation where I am sending the signal to the Arduino I currently have this:</p>
<p>// Set Arduino outputs<br />
a.writeDigitalPin(6,1);</p>
<p>var myTimer:Timer = new Timer(1000, 1); // 1 second<br />
myTimer.addEventListener(TimerEvent.TIMER, runOnce);<br />
myTimer.start();</p>
<p>function runOnce(event:TimerEvent):void {<br />
trace(&#8220;runOnce() called @ &#8221; + getTimer() + &#8221; ms&#8221;);<br />
}</p>
<p>// Set Arduino outputs<br />
a.writeDigitalPin(6,0);</p>
<p>I copied this code from another example I found online of the Timer function. At the moment this is not returning any errors, but it also not causing any delay between the output pin being on and off &#8211; it flashes momentarily and not for the 1 second delay I thought I had set above. </p>
<p>If you have any suggestions about what I&#8217;m going wrong, that would be helpful! Does the frame rate of the movie affect this at all?</p>
<p>Thanks again for your help, Ellie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kasperkamperman</title>
		<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/comment-page-1/#comment-174</link>
		<dc:creator>kasperkamperman</dc:creator>
		<pubDate>Fri, 25 Mar 2011 16:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857#comment-174</guid>
		<description>Hi Ellie,

I thinks you used the Firmata example in &lt;a href=&quot;http://www.kasperkamperman.com/blog/arduino/arduino-flash-communication-as3/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt; or not? 

In Actionscript 3 you could use the&lt;a href=&quot;http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/utils/package.html#setTimeout%28%29&quot; rel=&quot;nofollow&quot;&gt;setTimeOut&lt;/a&gt; function or a &lt;a href=&quot;http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html&quot; rel=&quot;nofollow&quot;&gt;Timer &lt;/a&gt; that runs one time (I&#039;ve linked to the actionscript language reference). 

If you used the messenger script you could also program it in Arduino code with an interval: See &lt;a href=&quot;http://www.kasperkamperman.com/blog/arduino/arduino-programming-interval/&quot; rel=&quot;nofollow&quot;&gt;programming interval&lt;/a&gt; or the blink without delay example in the Arduino IDE.</description>
		<content:encoded><![CDATA[<p>Hi Ellie,</p>
<p>I thinks you used the Firmata example in <a href="http://www.kasperkamperman.com/blog/arduino/arduino-flash-communication-as3/" rel="nofollow">this post</a> or not? </p>
<p>In Actionscript 3 you could use the<a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/utils/package.html#setTimeout%28%29" rel="nofollow">setTimeOut</a> function or a <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html" rel="nofollow">Timer </a> that runs one time (I&#8217;ve linked to the actionscript language reference). </p>
<p>If you used the messenger script you could also program it in Arduino code with an interval: See <a href="http://www.kasperkamperman.com/blog/arduino/arduino-programming-interval/" rel="nofollow">programming interval</a> or the blink without delay example in the Arduino IDE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ellie harrison</title>
		<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/comment-page-1/#comment-173</link>
		<dc:creator>ellie harrison</dc:creator>
		<pubDate>Fri, 25 Mar 2011 16:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857#comment-173</guid>
		<description>Hi Kasper,

Thanks so much for this tutorial, it&#039;s helped me so much with my project, which you can view here, if you&#039;re interested:
www.vimeo.com/ellieharrison/privatisation

I need to re-write my code very slightly and I&#039;m not an expert on this - actionscript or arduino - so I was hoping you could help?!

In one of the frames in my Flash animation, I use the actionscript code to send a signal to the arduino output:

a.writeDigitalPin(6,1);

This works fine, but what I would like is for this to then delay for 1/12 second and then to switch off again. At the moment I am trying this code below, but it doesn&#039;t like the &#039;Delay&#039; command. Do you have any suggestions as to what I should write instead? Many thanks, Ellie Harrison

a.writeDigitalPin(6,1);
delay(83);              // wait for 1/12 second
a.writeDigitalPin(6,0);</description>
		<content:encoded><![CDATA[<p>Hi Kasper,</p>
<p>Thanks so much for this tutorial, it&#8217;s helped me so much with my project, which you can view here, if you&#8217;re interested:<br />
<a href="http://www.vimeo.com/ellieharrison/privatisation" rel="nofollow">http://www.vimeo.com/ellieharrison/privatisation</a></p>
<p>I need to re-write my code very slightly and I&#8217;m not an expert on this &#8211; actionscript or arduino &#8211; so I was hoping you could help?!</p>
<p>In one of the frames in my Flash animation, I use the actionscript code to send a signal to the arduino output:</p>
<p>a.writeDigitalPin(6,1);</p>
<p>This works fine, but what I would like is for this to then delay for 1/12 second and then to switch off again. At the moment I am trying this code below, but it doesn&#8217;t like the &#8216;Delay&#8217; command. Do you have any suggestions as to what I should write instead? Many thanks, Ellie Harrison</p>
<p>a.writeDigitalPin(6,1);<br />
delay(83);              // wait for 1/12 second<br />
a.writeDigitalPin(6,0);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kasperkamperman</title>
		<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/comment-page-1/#comment-78</link>
		<dc:creator>kasperkamperman</dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857#comment-78</guid>
		<description>I don&#039;t know if the Messenger library works good on the Mega. Try to find an Arduino duemilanove board, to see if that works. I don&#039;t have a Mega to test it now.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know if the Messenger library works good on the Mega. Try to find an Arduino duemilanove board, to see if that works. I don&#8217;t have a Mega to test it now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Said</title>
		<link>http://www.kasperkamperman.com/nl/blog/arduino-flash-communication-as3-messenger/comment-page-1/#comment-76</link>
		<dc:creator>Said</dc:creator>
		<pubDate>Mon, 23 Aug 2010 17:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.kasperkamperman.com/?p=857#comment-76</guid>
		<description>Hi dear friend. I did exactly what you wrote on here and my arduino mega board didnt give me any response, no blinking no moving balls. Actually everythings are OK that serproxy.exe is working correctly as well as flash CS4.
 Thanks you will reply...</description>
		<content:encoded><![CDATA[<p>Hi dear friend. I did exactly what you wrote on here and my arduino mega board didnt give me any response, no blinking no moving balls. Actually everythings are OK that serproxy.exe is working correctly as well as flash CS4.<br />
 Thanks you will reply&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

