<?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: TouchShield Slide Two-way Communications</title>
	<atom:link href="http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html</link>
	<description>Interesting to me</description>
	<lastBuildDate>Fri, 23 Dec 2011 00:37:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-1731</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 07 Dec 2011 21:26:54 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-1731</guid>
		<description>Touchshield Slide is basically an Arduino that drives the display. So, you could use it standalone and talk serial to something else, without another Arduino. I don&#039;t have any specific examples, but it would work exactly like my tutorial and code above works.

I just followed some links and not sure where the Aardvark IDE is and see they may have made changes.</description>
		<content:encoded><![CDATA[<p>Touchshield Slide is basically an Arduino that drives the display. So, you could use it standalone and talk serial to something else, without another Arduino. I don&#8217;t have any specific examples, but it would work exactly like my tutorial and code above works.</p>
<p>I just followed some links and not sure where the Aardvark IDE is and see they may have made changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve smith</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-1730</link>
		<dc:creator>steve smith</dc:creator>
		<pubDate>Wed, 07 Dec 2011 21:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-1730</guid>
		<description>Is it possible to access the other hardware serial ports on the Touchshield slide...?  I would like to use them instead of using the arduino uno at all.  I only have need for serial input.  If it is possible, do I access them the same as on the arduino mega..?  Can you supply some examples...?  Thanks so much..!!</description>
		<content:encoded><![CDATA[<p>Is it possible to access the other hardware serial ports on the Touchshield slide&#8230;?  I would like to use them instead of using the arduino uno at all.  I only have need for serial input.  If it is possible, do I access them the same as on the arduino mega..?  Can you supply some examples&#8230;?  Thanks so much..!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-1138</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 21 Aug 2011 22:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-1138</guid>
		<description>[echo] Building TouchShield Slide libraries...
     [echo] Building TouchShield Slide board target...
     [echo] Building touchshiled for the TouchShield Slide core...
     [echo] Calculating touchshiled size...
     [echo] Binary Sketch (34364 of 250000 bytes, 13.7456%)

BUILD SUCCESSFUL
Total time: 8 seconds
     [echo] Uploading touchshiled to board...
     [exec] 
Hi, Hans,

Nice work on touchshield.

When running your code, I encounter problems like this on antipasto,  avrdude: ser_open(): can&#039;t set com-state for &quot;\\.\COM4&quot;

Any idea how to fix it? I double checked the port and board.

Thanks!



     [exec] avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
     [exec]          Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     [exec] 
     [exec]          System wide configuration file is &quot;../..//../../../tools/avr/etc/avrdude.conf&quot;
     [exec] 
     [exec]          Using Port            : \\.\COM4
     [exec]          Using Programmer      : butterfly
     [exec]          Overriding Baud Rate  : 57600
     [exec] avrdude: ser_open(): can&#039;t set com-state for &quot;\\.\COM4&quot;


BUILD FAILED
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\build.xml:151: The following error occurred while executing this line:
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\src\template\build.xml:179: The following error occurred while executing this line:
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\config\build.ccmacros.xml:45: exec returned: 1</description>
		<content:encoded><![CDATA[<p>[echo] Building TouchShield Slide libraries&#8230;<br />
     [echo] Building TouchShield Slide board target&#8230;<br />
     [echo] Building touchshiled for the TouchShield Slide core&#8230;<br />
     [echo] Calculating touchshiled size&#8230;<br />
     [echo] Binary Sketch (34364 of 250000 bytes, 13.7456%)</p>
<p>BUILD SUCCESSFUL<br />
Total time: 8 seconds<br />
     [echo] Uploading touchshiled to board&#8230;<br />
     [exec]<br />
Hi, Hans,</p>
<p>Nice work on touchshield.</p>
<p>When running your code, I encounter problems like this on antipasto,  avrdude: ser_open(): can&#8217;t set com-state for &#8220;\\.\COM4&#8243;</p>
<p>Any idea how to fix it? I double checked the port and board.</p>
<p>Thanks!</p>
<p>     [exec] avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32<br />
     [exec]          Copyright (c) 2000-2005 Brian Dean, <a href="http://www.bdmicro.com/" rel="nofollow">http://www.bdmicro.com/</a><br />
     [exec]<br />
     [exec]          System wide configuration file is &#8220;../..//../../../tools/avr/etc/avrdude.conf&#8221;<br />
     [exec]<br />
     [exec]          Using Port            : \\.\COM4<br />
     [exec]          Using Programmer      : butterfly<br />
     [exec]          Overriding Baud Rate  : 57600<br />
     [exec] avrdude: ser_open(): can&#8217;t set com-state for &#8220;\\.\COM4&#8243;</p>
<p>BUILD FAILED<br />
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\build.xml:151: The following error occurred while executing this line:<br />
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\src\template\build.xml:179: The following error occurred while executing this line:<br />
C:\Arduino_Antipasto_win32\Antipasto\hardware\arduino\cores\touchshield\config\build.ccmacros.xml:45: exec returned: 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ladbro</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-728</link>
		<dc:creator>ladbro</dc:creator>
		<pubDate>Tue, 25 Jan 2011 20:04:39 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-728</guid>
		<description>I messed with the LCD screen for hours, finally got it going with your article. Thanks!</description>
		<content:encoded><![CDATA[<p>I messed with the LCD screen for hours, finally got it going with your article. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-590</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Sun, 03 Oct 2010 14:42:33 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-590</guid>
		<description>I disconnected the slide (removed) from the Arduino and then re-uploded the code for the Arduio. This time it took. Put the shield back on top of the Arduino, powered it up, and nothing. Does this mean that when uploading to these boards, I must separate the slide from the Arduino in order to upload to the Arduino? I&#039;m using the USB to power these boards. Does this make any difference i.e., should I be using a different power supply when running these boards after programming? 

Again, thanks in advance.
Doug</description>
		<content:encoded><![CDATA[<p>I disconnected the slide (removed) from the Arduino and then re-uploded the code for the Arduio. This time it took. Put the shield back on top of the Arduino, powered it up, and nothing. Does this mean that when uploading to these boards, I must separate the slide from the Arduino in order to upload to the Arduino? I&#8217;m using the USB to power these boards. Does this make any difference i.e., should I be using a different power supply when running these boards after programming? </p>
<p>Again, thanks in advance.<br />
Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-586</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Sat, 02 Oct 2010 18:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-586</guid>
		<description>@Doug

Have you tried disconnecting the Slide from the Arduino, before you program the Arduino?</description>
		<content:encoded><![CDATA[<p>@Doug</p>
<p>Have you tried disconnecting the Slide from the Arduino, before you program the Arduino?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-585</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Sat, 02 Oct 2010 18:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-585</guid>
		<description>@alex

On the touch side, change this section to send (Serial.print...) &quot;mouseX&quot; to the Arduino.

&lt;code&gt;if ( mouseX != Xstore &#124;&#124; mouseY != Ystore ) 
  {
    Serial.print(&quot;A&quot;);
    delay(50);
  }
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@alex</p>
<p>On the touch side, change this section to send (Serial.print&#8230;) &#8220;mouseX&#8221; to the Arduino.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if ( mouseX != Xstore || mouseY != Ystore ) <br />
&nbsp; {<br />
&nbsp; &nbsp; Serial.print(&quot;A&quot;);<br />
&nbsp; &nbsp; delay(50);<br />
&nbsp; }</div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-584</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Sat, 02 Oct 2010 18:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-584</guid>
		<description>Downloaded the demo program and ran into a problem. The slide program compiled and loaded OK. The Aeduino program compiled OK, but, when loading the Arduino program I get the following error:

[exec] avrdude: stk500_2_ReceiveMessage(): timeout

I have no idea what the problem is. Any help would be appreciated. Thanks in advance.

Doug</description>
		<content:encoded><![CDATA[<p>Downloaded the demo program and ran into a problem. The slide program compiled and loaded OK. The Aeduino program compiled OK, but, when loading the Arduino program I get the following error:</p>
<p>[exec] avrdude: stk500_2_ReceiveMessage(): timeout</p>
<p>I have no idea what the problem is. Any help would be appreciated. Thanks in advance.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-561</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Wed, 29 Sep 2010 19:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-561</guid>
		<description>Hi Hans!

thanks for reading me
I&#039;m trying to modify your example to send mouseX to the arduino then back to the slide to be displayed as decimal. So far I get random numbers.

If you could kindly give me a hand with this I think I would be sorted for good.</description>
		<content:encoded><![CDATA[<p>Hi Hans!</p>
<p>thanks for reading me<br />
I&#8217;m trying to modify your example to send mouseX to the arduino then back to the slide to be displayed as decimal. So far I get random numbers.</p>
<p>If you could kindly give me a hand with this I think I would be sorted for good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-560</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 29 Sep 2010 18:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-560</guid>
		<description>Glad it&#039;s working now, was just about to reply...</description>
		<content:encoded><![CDATA[<p>Glad it&#8217;s working now, was just about to reply&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-559</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Wed, 29 Sep 2010 18:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-559</guid>
		<description>Hi
I think I solved the problem. I disconnected pins 0 and 1 of the arduino and it solved the problem.</description>
		<content:encoded><![CDATA[<p>Hi<br />
I think I solved the problem. I disconnected pins 0 and 1 of the arduino and it solved the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-558</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Wed, 29 Sep 2010 17:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-558</guid>
		<description>Hi
Thanks for the tutorial! I have a question. My arduino loses it&#039;s hardware serial communication when the slide is connected to it. I&#039;m working on a midi synth a was hoping to use hardware serial for handling midi and software serial for slide commands. The hardware serial data resumes when I lift off the slide. 
Any suggestions?
Thanks</description>
		<content:encoded><![CDATA[<p>Hi<br />
Thanks for the tutorial! I have a question. My arduino loses it&#8217;s hardware serial communication when the slide is connected to it. I&#8217;m working on a midi synth a was hoping to use hardware serial for handling midi and software serial for slide commands. The hardware serial data resumes when I lift off the slide.<br />
Any suggestions?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-220</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Fri, 02 Jul 2010 17:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-220</guid>
		<description>If the Arduino pauses between strings, the code will work as you expect.</description>
		<content:encoded><![CDATA[<p>If the Arduino pauses between strings, the code will work as you expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nav</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-218</link>
		<dc:creator>Nav</dc:creator>
		<pubDate>Fri, 02 Jul 2010 17:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-218</guid>
		<description>@hans - Thank you so much for your reply,
Quick question though, If I am continuously sending data from arduino to slide, wont the while statement keep seeing that serial.available is true and keep the while loop running?  Therefore, is it necessary to interrupt it each time?

Thanks!</description>
		<content:encoded><![CDATA[<p>@hans &#8211; Thank you so much for your reply,<br />
Quick question though, If I am continuously sending data from arduino to slide, wont the while statement keep seeing that serial.available is true and keep the while loop running?  Therefore, is it necessary to interrupt it each time?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-210</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Fri, 02 Jul 2010 00:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-210</guid>
		<description>Sounds like what is happening is that you are getting one Byte over the serial -  that would explain the 256 limitation.

You may need to you use a Byte Array. 



&lt;blockquote&gt;char charIn = 0;
byte i = 0;
char stringIn[32] = &quot;&quot;;

while(Serial.available()) {
    charIn = Serial.read();
    stringIn[i] = charIn;
    i += 1;
}&lt;/blockquote&gt;


You then can covert the byte array into an integer with the following line:

&lt;blockquote&gt;int newInt = atoi(stringIn);&lt;/blockquote&gt;

Let me know if that helps.</description>
		<content:encoded><![CDATA[<p>Sounds like what is happening is that you are getting one Byte over the serial &#8211;  that would explain the 256 limitation.</p>
<p>You may need to you use a Byte Array. </p>
<blockquote><p>char charIn = 0;<br />
byte i = 0;<br />
char stringIn[32] = &#8220;&#8221;;</p>
<p>while(Serial.available()) {<br />
    charIn = Serial.read();<br />
    stringIn[i] = charIn;<br />
    i += 1;<br />
}</p></blockquote>
<p>You then can covert the byte array into an integer with the following line:</p>
<blockquote><p>int newInt = atoi(stringIn);</p></blockquote>
<p>Let me know if that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nav</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-207</link>
		<dc:creator>Nav</dc:creator>
		<pubDate>Thu, 01 Jul 2010 23:24:46 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-207</guid>
		<description>I had a quick question for anyone who knows.  I am writing a program that pulls in analog data from the arduino (converts it using 14bits) and passes that value to the Slide.  Unfortunately, the data I receive goes up to a value of 1024, and I cannot pass anything greater than 256 through the software serial.  For some reason, I cant pass any integers greater than 256 through the softwareserial, and I can only pass them as a byte.  Anyone know a way around this?</description>
		<content:encoded><![CDATA[<p>I had a quick question for anyone who knows.  I am writing a program that pulls in analog data from the arduino (converts it using 14bits) and passes that value to the Slide.  Unfortunately, the data I receive goes up to a value of 1024, and I cannot pass anything greater than 256 through the software serial.  For some reason, I cant pass any integers greater than 256 through the softwareserial, and I can only pass them as a byte.  Anyone know a way around this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat Cullen</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-178</link>
		<dc:creator>Pat Cullen</dc:creator>
		<pubDate>Fri, 21 May 2010 19:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-178</guid>
		<description>hey, thanks for this tut. you probably saved me a couple hours by telling about that program button on the side,.. was battling for ages to get programs down onto the slide. cheers.</description>
		<content:encoded><![CDATA[<p>hey, thanks for this tut. you probably saved me a couple hours by telling about that program button on the side,.. was battling for ages to get programs down onto the slide. cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-161</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Sun, 02 May 2010 00:13:09 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-161</guid>
		<description>Checkout the NewSoftSerial by Mikal Hart at
http://arduiniana.org/libraries/newsoftserial/

It’s the direct descendant of ladyada’s AFSoftSerial but as yet does not support the MEGA</description>
		<content:encoded><![CDATA[<p>Checkout the NewSoftSerial by Mikal Hart at<br />
<a href="http://arduiniana.org/libraries/newsoftserial/" rel="nofollow">http://arduiniana.org/libraries/newsoftserial/</a></p>
<p>It’s the direct descendant of ladyada’s AFSoftSerial but as yet does not support the MEGA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-158</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Tue, 27 Apr 2010 02:20:04 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-158</guid>
		<description>Good to know about the MEGA. I tested it on the Duemilanove. I guess I have to get a MEGA and play with it.</description>
		<content:encoded><![CDATA[<p>Good to know about the MEGA. I tested it on the Duemilanove. I guess I have to get a MEGA and play with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-157</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Tue, 27 Apr 2010 02:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-157</guid>
		<description>Hi, 

Like Adam I could not get your demo to work.

The problem was that I used an Arduino MEGA.
When I used the Duemilanove it worked fine.

It seems AFSoftSerial doesn&#039;t work with a MEGA.

If I comment out the following IF tests: 
   if(touchSerial.available()) 
and 
   if (c == &#039;A&#039;)
along with their opening &amp; closing braces then it also works on the MEGA board.</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Like Adam I could not get your demo to work.</p>
<p>The problem was that I used an Arduino MEGA.<br />
When I used the Duemilanove it worked fine.</p>
<p>It seems AFSoftSerial doesn&#8217;t work with a MEGA.</p>
<p>If I comment out the following IF tests:<br />
   if(touchSerial.available())<br />
and<br />
   if (c == &#8216;A&#8217;)<br />
along with their opening &amp; closing braces then it also works on the MEGA board.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-156</link>
		<dc:creator>robert</dc:creator>
		<pubDate>Fri, 23 Apr 2010 20:06:27 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-156</guid>
		<description>Hi Hans! great job what you&#039;ve done so far with the Arduino and the TouchShield. I am also experimenting with the touch using serial transmission from the arduino. I got the comunication done, but it seems to work real slow in the touch, meaning the moment to display the data as lines (It&#039;s a simple oscilloscope). Looks like the time the touch takes to read serial, process data and print lines with the obtained points is too much, and so much of the data is lost during the process. I wonder if you got any ideas on how to speed up the touch.. I&#039;d appreciate any help, if possible.</description>
		<content:encoded><![CDATA[<p>Hi Hans! great job what you&#8217;ve done so far with the Arduino and the TouchShield. I am also experimenting with the touch using serial transmission from the arduino. I got the comunication done, but it seems to work real slow in the touch, meaning the moment to display the data as lines (It&#8217;s a simple oscilloscope). Looks like the time the touch takes to read serial, process data and print lines with the obtained points is too much, and so much of the data is lost during the process. I wonder if you got any ideas on how to speed up the touch.. I&#8217;d appreciate any help, if possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-155</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 22 Apr 2010 02:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-155</guid>
		<description>Curiously, the Serial monitor see no activity either.
Possibly the TouchShield cannot print to serial... though I find no such documentation to support this.</description>
		<content:encoded><![CDATA[<p>Curiously, the Serial monitor see no activity either.<br />
Possibly the TouchShield cannot print to serial&#8230; though I find no such documentation to support this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-154</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 22 Apr 2010 02:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-154</guid>
		<description>Yes I noticed that but that didn&#039;t change anything, so the problem must lie somewhere else. I&#039;m simply trying to control an RGB LED. This is my test code, any ideas?

//Arduino
#include 
#define RX_PIN 3
#define TX_PIN 2
AFSoftSerial touchSerial = AFSoftSerial(RX_PIN, TX_PIN);
int redPin = 10; 
int greenPin = 11; 
int bluePin = 9;
int light;

void setup(){
 touchSerial.begin(9600); 
}
void loop(){
 if(touchSerial.available()){
  light = touchSerial.read();
 }
 if(light == 1){
   analogWrite(redPin, 255);
   analogWrite(greenPin, 255);
   analogWrite(bluePin, 255);
 }
 else{
   analogWrite(redPin, 0);
   analogWrite(greenPin, 0);
   analogWrite(bluePin, 0);
}
}

//TouchShield
void setup(){
  background(255);
  Serial.begin(9600);
  mouseX = 0;
  mouseY = 0;
  fill(0);
  rect(160,0,160,240);
}

void loop(){
  gettouch();
  if(mouseX &gt;=160){
    Serial.print(1);
    delay(1000);
  }
  else{
    Serial.print(2);
    delay(1000);
  }
}</description>
		<content:encoded><![CDATA[<p>Yes I noticed that but that didn&#8217;t change anything, so the problem must lie somewhere else. I&#8217;m simply trying to control an RGB LED. This is my test code, any ideas?</p>
<p>//Arduino<br />
#include<br />
#define RX_PIN 3<br />
#define TX_PIN 2<br />
AFSoftSerial touchSerial = AFSoftSerial(RX_PIN, TX_PIN);<br />
int redPin = 10;<br />
int greenPin = 11;<br />
int bluePin = 9;<br />
int light;</p>
<p>void setup(){<br />
 touchSerial.begin(9600);<br />
}<br />
void loop(){<br />
 if(touchSerial.available()){<br />
  light = touchSerial.read();<br />
 }<br />
 if(light == 1){<br />
   analogWrite(redPin, 255);<br />
   analogWrite(greenPin, 255);<br />
   analogWrite(bluePin, 255);<br />
 }<br />
 else{<br />
   analogWrite(redPin, 0);<br />
   analogWrite(greenPin, 0);<br />
   analogWrite(bluePin, 0);<br />
}<br />
}</p>
<p>//TouchShield<br />
void setup(){<br />
  background(255);<br />
  Serial.begin(9600);<br />
  mouseX = 0;<br />
  mouseY = 0;<br />
  fill(0);<br />
  rect(160,0,160,240);<br />
}</p>
<p>void loop(){<br />
  gettouch();<br />
  if(mouseX &gt;=160){<br />
    Serial.print(1);<br />
    delay(1000);<br />
  }<br />
  else{<br />
    Serial.print(2);<br />
    delay(1000);<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-153</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 21 Apr 2010 21:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-153</guid>
		<description>The fix might be as simple as making the equal sign a double equal sign:

&lt;blockquote&gt;if(touchSerial.read() == 1){
do whatever
}&lt;/blockquote&gt;

RE: Arduino &quot;If&quot; Reference - http://arduino.cc/en/Reference/If</description>
		<content:encoded><![CDATA[<p>The fix might be as simple as making the equal sign a double equal sign:</p>
<blockquote><p>if(touchSerial.read() == 1){<br />
do whatever<br />
}</p></blockquote>
<p>RE: Arduino &#8220;If&#8221; Reference &#8211; <a href="http://arduino.cc/en/Reference/If" rel="nofollow">http://arduino.cc/en/Reference/If</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-152</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 21 Apr 2010 21:10:33 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-152</guid>
		<description>Hi, one more question...

Is the reverse true for sending data from the TouchShield to the Arduino?

I am trying to get the arduino to recieve serial data sent from the TouchShield. Like

TouchShield sends:

&lt;blockquote&gt;Serial.print(1);&lt;/blockquote&gt;

Arduino reads:

&lt;blockquote&gt;if(touchSerial.read() = 1){
do whatever
}&lt;/blockquote&gt;

These commands do not seem to be working.</description>
		<content:encoded><![CDATA[<p>Hi, one more question&#8230;</p>
<p>Is the reverse true for sending data from the TouchShield to the Arduino?</p>
<p>I am trying to get the arduino to recieve serial data sent from the TouchShield. Like</p>
<p>TouchShield sends:</p>
<blockquote><p>Serial.print(1);</p></blockquote>
<p>Arduino reads:</p>
<blockquote><p>if(touchSerial.read() = 1){<br />
do whatever<br />
}</p></blockquote>
<p>These commands do not seem to be working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-139</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 14 Apr 2010 18:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-139</guid>
		<description>On the TouchShield slide, you need a character array to hold strings.

Add this to the main loop:

&lt;blockquote&gt;char charIn = 0;
byte i = 0;
char stringIn[32] = &quot;&quot;;

while(Serial.available()) {
  charIn = Serial.read();
  stringIn[i] = charIn;
  i += 1;
}

if (stringIn[0])
{
 background(0,0,0); 
 text(stringIn, 75, 75);
}&lt;/blockquote&gt;

This will allow you to display strings up to 32 characters.</description>
		<content:encoded><![CDATA[<p>On the TouchShield slide, you need a character array to hold strings.</p>
<p>Add this to the main loop:</p>
<blockquote><p>char charIn = 0;<br />
byte i = 0;<br />
char stringIn[32] = &#8220;&#8221;;</p>
<p>while(Serial.available()) {<br />
  charIn = Serial.read();<br />
  stringIn[i] = charIn;<br />
  i += 1;<br />
}</p>
<p>if (stringIn[0])<br />
{<br />
 background(0,0,0);<br />
 text(stringIn, 75, 75);<br />
}</p></blockquote>
<p>This will allow you to display strings up to 32 characters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-138</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 14 Apr 2010 17:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-138</guid>
		<description>Yes, I did touch the screen, and no, it your code still for some reason does not work.

But after adding the software serial lines, my code is working! Thank you, I think I understand now. 

The only remaining problem is how do I display what I am literally sending and not the ASCII back conversion.

i.e. I send &quot;A&quot; and I get 65 displayed. So if I send &quot;Hello&quot; how do I display &quot;Hello&quot;?</description>
		<content:encoded><![CDATA[<p>Yes, I did touch the screen, and no, it your code still for some reason does not work.</p>
<p>But after adding the software serial lines, my code is working! Thank you, I think I understand now. </p>
<p>The only remaining problem is how do I display what I am literally sending and not the ASCII back conversion.</p>
<p>i.e. I send &#8220;A&#8221; and I get 65 displayed. So if I send &#8220;Hello&#8221; how do I display &#8220;Hello&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-137</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 14 Apr 2010 01:20:37 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-137</guid>
		<description>The code you posted in your comment does not work since the TouchShield is using Pins 2/3 of the Arduino to read and write serial.

On the Arduino, you need to use a software serial line that uses Pins 2/3.

&lt;strong&gt;Add to head:&lt;/strong&gt;

&lt;blockquote&gt;#include &lt;AFSoftSerial.h&gt;

#define RX_PIN  3 
#define TX_PIN  2 

AFSoftSerial touchSerial =  AFSoftSerial(RX_PIN, TX_PIN);&lt;/blockquote&gt;

&lt;strong&gt;Add to setup:&lt;/strong&gt;

&lt;blockquote&gt;touchSerial.begin(9600);&lt;/blockquote&gt;

&lt;strong&gt;Add to main loop:&lt;/strong&gt;

&lt;blockquote&gt;touchSerial.print(randNumber);
delay(100);&lt;/blockquote&gt;

</description>
		<content:encoded><![CDATA[<p>The code you posted in your comment does not work since the TouchShield is using Pins 2/3 of the Arduino to read and write serial.</p>
<p>On the Arduino, you need to use a software serial line that uses Pins 2/3.</p>
<p><strong>Add to head:</strong></p>
<blockquote><p>#include <afsoftserial .h></p>
<p>#define RX_PIN  3<br />
#define TX_PIN  2 </p>
<p>AFSoftSerial touchSerial =  AFSoftSerial(RX_PIN, TX_PIN);</afsoftserial></p></blockquote>
<p><strong>Add to setup:</strong></p>
<blockquote><p>touchSerial.begin(9600);</p></blockquote>
<p><strong>Add to main loop:</strong></p>
<blockquote><p>touchSerial.print(randNumber);<br />
delay(100);</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-136</link>
		<dc:creator>Hans</dc:creator>
		<pubDate>Wed, 14 Apr 2010 01:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-136</guid>
		<description>Did you touch the screen with my code? It only displays the random number when the screen gets touched.</description>
		<content:encoded><![CDATA[<p>Did you touch the screen with my code? It only displays the random number when the screen gets touched.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/comment-page-1#comment-135</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 14 Apr 2010 00:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://iamshadowlord.com/?p=118#comment-135</guid>
		<description>Hello,

May I ask how this is supposed to work? I downloaded your app and uploaded to the Arduino &amp; TouchShield and it&#039;s a blank screen. I checked the Serial Monitor and saw no numbers being sent. So I tried this basic code to see if serial is possible at a more basic level:



&lt;blockquote&gt;//Arduino
void setup(){  
  Serial.begin(9600);
} 

void loop(){   
  Serial.print(20);
  delay(1000);
}&lt;/blockquote&gt;





&lt;blockquote&gt;//TouchShield
void setup(){  
  Serial.begin(9600);
  background(0,0,0);
} 

void loop(){
  text(Serial.read(),80,80);
}&lt;/blockquote&gt;



The results of the above code are visible &#039;20s&#039; on the Serial Monitor, so I know the Arduino is pulling its weight, but the TouchShield is displaying a &#039;-1&#039; which I assume means that it&#039;s not seeing the serial. Something is not lining up.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>May I ask how this is supposed to work? I downloaded your app and uploaded to the Arduino &amp; TouchShield and it&#8217;s a blank screen. I checked the Serial Monitor and saw no numbers being sent. So I tried this basic code to see if serial is possible at a more basic level:</p>
<blockquote><p>//Arduino<br />
void setup(){<br />
  Serial.begin(9600);<br />
} </p>
<p>void loop(){<br />
  Serial.print(20);<br />
  delay(1000);<br />
}</p></blockquote>
<blockquote><p>//TouchShield<br />
void setup(){<br />
  Serial.begin(9600);<br />
  background(0,0,0);<br />
} </p>
<p>void loop(){<br />
  text(Serial.read(),80,80);<br />
}</p></blockquote>
<p>The results of the above code are visible &#8217;20s&#8217; on the Serial Monitor, so I know the Arduino is pulling its weight, but the TouchShield is displaying a &#8216;-1&#8242; which I assume means that it&#8217;s not seeing the serial. Something is not lining up.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

