<?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: Arduino-serial: C code to talk to Arduino</title>
	<atom:link href="http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/</link>
	<description>Random experiments, circuits, code, rapid prototyping, sometimes things to buy, and the odd tune by Tod E. Kurt.</description>
	<lastBuildDate>Sun, 14 Mar 2010 04:13:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: joshua wojnas</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-59665</link>
		<dc:creator>joshua wojnas</dc:creator>
		<pubDate>Tue, 16 Feb 2010 21:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-59665</guid>
		<description>FTDI &amp; teensy++ are both much faster than the arduino usb interfaces the teensy site shows in its usb serial exaple a high speed serial interface that the virtual com port goes as fast as it can in the benchmark example. Has anyone documented virtual serial port speed?</description>
		<content:encoded><![CDATA[<p>FTDI &amp; teensy++ are both much faster than the arduino usb interfaces the teensy site shows in its usb serial exaple a high speed serial interface that the virtual com port goes as fast as it can in the benchmark example. Has anyone documented virtual serial port speed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FRANX</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-59088</link>
		<dc:creator>FRANX</dc:creator>
		<pubDate>Thu, 11 Feb 2010 19:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-59088</guid>
		<description>high duty of CPU is due to the reason that this program never close serial previously opened</description>
		<content:encoded><![CDATA[<p>high duty of CPU is due to the reason that this program never close serial previously opened</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jack</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-59085</link>
		<dc:creator>jack</dc:creator>
		<pubDate>Thu, 11 Feb 2010 18:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-59085</guid>
		<description>any way to set DTR to off (in order to avoid arduino autoreset?</description>
		<content:encoded><![CDATA[<p>any way to set DTR to off (in order to avoid arduino autoreset?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linux Ubuntu&#8230;serial things &#171; FABLAB adventures</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-58873</link>
		<dc:creator>Linux Ubuntu&#8230;serial things &#171; FABLAB adventures</dc:creator>
		<pubDate>Tue, 02 Feb 2010 19:30:23 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-58873</guid>
		<description>[...] http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/" rel="nofollow">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stealthcopter.com &#187; Python: interfacing with an arduino</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-58820</link>
		<dc:creator>stealthcopter.com &#187; Python: interfacing with an arduino</dc:creator>
		<pubDate>Mon, 18 Jan 2010 21:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-58820</guid>
		<description>[...] original arduino-serial.c &#8211; by Tod E. Kurt. [...]</description>
		<content:encoded><![CDATA[<p>[...] original arduino-serial.c &#8211; by Tod E. Kurt. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spiros Gezerlis (sgez) 's status on Thursday, 15-Oct-09 09:36:53 UTC - Identi.ca</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-56885</link>
		<dc:creator>Spiros Gezerlis (sgez) 's status on Thursday, 15-Oct-09 09:36:53 UTC - Identi.ca</dc:creator>
		<pubDate>Thu, 15 Oct 2009 09:36:59 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-56885</guid>
		<description>[...] Arduino-serial: C code to talk to Arduino -- http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Arduino-serial: C code to talk to Arduino &#8212; <a href="http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/" rel="nofollow">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-53002</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Tue, 23 Jun 2009 18:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-53002</guid>
		<description>Hi Tyler,
Try putting the delay before the send.  You need to wait for the Arduino to start up before sending it data.  Like this:
&lt;code&gt;
arduino-serial -b 9600 -p /dev/ttyUSB0 -d 5000 -s ra -r
&lt;/code&gt;
I increased the delay in case you have an older Arduino.

If that doesn&#039;t work, then I&#039;d need to know what the sketch is like you&#039;re running on the Arduino before being able to help more.  For instance, depending on how your sketch is set up, you might need to add a delay between sending and receiving because your PC is often faster with serial than the Arduino:
&lt;code&gt;
arduino-serial -b 9600 -p /dev/ttyUSB0 -d 5000 -s ra -d 200 -r
&lt;/code&gt;
That inserts a 200msec delay between sending and receiving.
</description>
		<content:encoded><![CDATA[<p>Hi Tyler,<br />
Try putting the delay before the send.  You need to wait for the Arduino to start up before sending it data.  Like this:<br />
<code><br />
arduino-serial -b 9600 -p /dev/ttyUSB0 -d 5000 -s ra -r<br />
</code><br />
I increased the delay in case you have an older Arduino.</p>
<p>If that doesn&#8217;t work, then I&#8217;d need to know what the sketch is like you&#8217;re running on the Arduino before being able to help more.  For instance, depending on how your sketch is set up, you might need to add a delay between sending and receiving because your PC is often faster with serial than the Arduino:<br />
<code><br />
arduino-serial -b 9600 -p /dev/ttyUSB0 -d 5000 -s ra -d 200 -r<br />
</code><br />
That inserts a 200msec delay between sending and receiving.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyler</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-6/#comment-53001</link>
		<dc:creator>Tyler</dc:creator>
		<pubDate>Tue, 23 Jun 2009 15:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-53001</guid>
		<description>Hi todbot,
I&#039;m using your code and everything seems to work fine except when reading back a response.  It seems to only echo back the input as a response.
I type-
$arduino-serial -b 9600 -p /dev/ttyUSB0  -s ra -d 2000 -r
where ra should read back a pin value and does through serial monitor and  cutecom.  I&#039;ve tried the delay in various places and no delay at all.  Any idea why it would only echo back the input?</description>
		<content:encoded><![CDATA[<p>Hi todbot,<br />
I&#8217;m using your code and everything seems to work fine except when reading back a response.  It seems to only echo back the input as a response.<br />
I type-<br />
$arduino-serial -b 9600 -p /dev/ttyUSB0  -s ra -d 2000 -r<br />
where ra should read back a pin value and does through serial monitor and  cutecom.  I&#8217;ve tried the delay in various places and no delay at all.  Any idea why it would only echo back the input?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51450</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Mon, 18 May 2009 13:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51450</guid>
		<description>Hi todbot,
Thx for your answer : put a 5000 ms delay is the solution !
++

Jack</description>
		<content:encoded><![CDATA[<p>Hi todbot,<br />
Thx for your answer : put a 5000 ms delay is the solution !<br />
++</p>
<p>Jack</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51430</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Tue, 12 May 2009 00:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51430</guid>
		<description>Logger?  I&#039;m not sure to what you&#039;re referring.  The &quot;arduino-serial&quot; program isn&#039;t a data logger.  It&#039;s not really designed to be run for long durations, just to quickly get a chunk of data from an Arduino and exit.

However, &quot;arduino-serial&quot; does emit its output on stdout, so it&#039;s output can be redirected to a file as you have done.

What is this &quot;logger&quot; program you&#039;re running?   It&#039;s very clearly not arduino-serial.</description>
		<content:encoded><![CDATA[<p>Logger?  I&#8217;m not sure to what you&#8217;re referring.  The &#8220;arduino-serial&#8221; program isn&#8217;t a data logger.  It&#8217;s not really designed to be run for long durations, just to quickly get a chunk of data from an Arduino and exit.</p>
<p>However, &#8220;arduino-serial&#8221; does emit its output on stdout, so it&#8217;s output can be redirected to a file as you have done.</p>
<p>What is this &#8220;logger&#8221; program you&#8217;re running?   It&#8217;s very clearly not arduino-serial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh w</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51429</link>
		<dc:creator>josh w</dc:creator>
		<pubDate>Tue, 12 May 2009 00:50:46 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51429</guid>
		<description>the serial logger  you have does not output to a text file using &gt;&gt;.
I have this in my command line logger is the binary output. ./logger&gt;&gt; test.csv is their any way I can make that work? I am using ubuntu.
Will I have to write more c to open a real file or create one and fprintf to it?

I have tried your program also it does not print help to the text file ether.</description>
		<content:encoded><![CDATA[<p>the serial logger  you have does not output to a text file using &gt;&gt;.<br />
I have this in my command line logger is the binary output. ./logger&gt;&gt; test.csv is their any way I can make that work? I am using ubuntu.<br />
Will I have to write more c to open a real file or create one and fprintf to it?</p>
<p>I have tried your program also it does not print help to the text file ether.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh w</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51409</link>
		<dc:creator>josh w</dc:creator>
		<pubDate>Fri, 08 May 2009 04:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51409</guid>
		<description>I have just gotten two arduino&#039;s not two pc&#039;s so maby i can make them talk at eatchother. ...</description>
		<content:encoded><![CDATA[<p>I have just gotten two arduino&#8217;s not two pc&#8217;s so maby i can make them talk at eatchother. &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh w</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51408</link>
		<dc:creator>josh w</dc:creator>
		<pubDate>Fri, 08 May 2009 03:59:59 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51408</guid>
		<description>I think their is a relationship with the arduino program being on using that com port.
Also I still have the 1 second light on 1 second light off delay. So I think as that decreses the buffer or lack of buffer in my c program causes problems. I herd somewhere the arduino has a print f buffer in its c code. If that fills up maby that is the problem.</description>
		<content:encoded><![CDATA[<p>I think their is a relationship with the arduino program being on using that com port.<br />
Also I still have the 1 second light on 1 second light off delay. So I think as that decreses the buffer or lack of buffer in my c program causes problems. I herd somewhere the arduino has a print f buffer in its c code. If that fills up maby that is the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51407</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Fri, 08 May 2009 03:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51407</guid>
		<description>What do you mean by this exactly?
Do you mean causes the /dev/ttyUSB0 device to disappear from the &quot;/dev/&quot; directory?
Or do you mean the device is still present, but it cannot be opened?
Or do you mean the serial port on the Arduino becomes unavailable to the running sketch?

I have a feeling you are running into buffering issues of either the FTDI chip on the Arduino or the Linux device driver.

Normally when you&#039;re transmitting so much data at such a high speed, you use the hardware flow control lines so you can pace your transmitting so as not to overflow any buffers.  I don&#039;t think the Arduino Serial class gives you access to those lines (or even runs them to the Arduino MCU)

One way to test if this is an Arduino or PC problem is to have two PCs or two Arduinos, and connect them together, sending data from one and receivin on the other.</description>
		<content:encoded><![CDATA[<p>What do you mean by this exactly?<br />
Do you mean causes the /dev/ttyUSB0 device to disappear from the &#8220;/dev/&#8221; directory?<br />
Or do you mean the device is still present, but it cannot be opened?<br />
Or do you mean the serial port on the Arduino becomes unavailable to the running sketch?</p>
<p>I have a feeling you are running into buffering issues of either the FTDI chip on the Arduino or the Linux device driver.</p>
<p>Normally when you&#8217;re transmitting so much data at such a high speed, you use the hardware flow control lines so you can pace your transmitting so as not to overflow any buffers.  I don&#8217;t think the Arduino Serial class gives you access to those lines (or even runs them to the Arduino MCU)</p>
<p>One way to test if this is an Arduino or PC problem is to have two PCs or two Arduinos, and connect them together, sending data from one and receivin on the other.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh w</title>
		<link>http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/comment-page-5/#comment-51406</link>
		<dc:creator>josh w</dc:creator>
		<pubDate>Fri, 08 May 2009 03:00:57 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/#comment-51406</guid>
		<description>things seem to run right 1 time then the port disappears could it not be closing?

void loop () {
  Serial.println(i++);

delayMicroseconds(1137);  
if (i &gt; 99){i=0;}
}

this runs in arduino ide but the c code causes the port to disapear after 1 run.</description>
		<content:encoded><![CDATA[<p>things seem to run right 1 time then the port disappears could it not be closing?</p>
<p>void loop () {<br />
  Serial.println(i++);</p>
<p>delayMicroseconds(1137);<br />
if (i &gt; 99){i=0;}<br />
}</p>
<p>this runs in arduino ide but the c code causes the port to disapear after 1 run.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
