user6250: I would like to know where I can see the output when I use the command printf. I am programming using the Arduino interface.
Update
I'll add a few lines of code for better understanding:
#include <stdio.h>

int main(void)
{
    printf("Hello World");

    return 0;
}


user6227: In setup(), start serial and choose your speed:
Serial.begin(9600);

Wherever you want to write to serial:
Serial.write("write this");

Wherever you want a newline:
Serial.println();

example
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.write("Hello World");

}

void loop() {
  // put your main code here, to run repeatedly:

}


user42: If you're working with the standard Arduino environment and libraries then printf() won't display anything anywhere. The reason is that microcontrollers could be connected to any number of different output/communication devices in any way. stdio would have no idea how or where to send the data.
The most common approach to outputting text from an Arduino (particularly during development) is to send it to the primary UART port using Serial.begin() and Serial.print(). If the Arduino is connected to your computer via USB then the Arduino IDE's serial monitor should display the result.
If you really want to use printf() though then it is possible to make it work (or implement similar functionality). A full explanation is on this page:

http://playground.arduino.cc/Main/Printf


6250: <p>I would like to know where I can see the output when I use the command <code>printf</code>. I am programming using the Arduino interface.</p>

<h2>Update</h2>

<p>I'll add a few lines of code for better understanding:</p>

<pre><code>#include &lt;stdio.h&gt;

int main(void)
{
    printf("Hello World");

    return 0;
}
</code></pre>
 6227: <p>In <code>setup()</code>, start serial and choose your speed:</p>

<pre><code>Serial.begin(9600);
</code></pre>

<p>Wherever you want to write to serial:</p>

<pre><code>Serial.write("write this");
</code></pre>

<p>Wherever you want a newline:</p>

<pre><code>Serial.println();
</code></pre>

<h2>example</h2>

<pre><code>void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.write("Hello World");

}

void loop() {
  // put your main code here, to run repeatedly:

}
</code></pre>
 42: <p>If you're working with the standard Arduino environment and libraries then <code>printf()</code> won't display anything anywhere. The reason is that microcontrollers could be connected to any number of different output/communication devices in any way. <code>stdio</code> would have no idea how or where to send the data.</p>

<p>The most common approach to outputting text from an Arduino (particularly during development) is to send it to the primary UART port using <a href="http://arduino.cc/en/Serial/Begin"><code>Serial.begin()</code></a> and <a href="http://arduino.cc/en/Serial/Print"><code>Serial.print()</code></a>. If the Arduino is connected to your computer via USB then the Arduino IDE's serial monitor should display the result.</p>

<p>If you <em>really</em> want to use <code>printf()</code> though then it is possible to make it work (or implement similar functionality). A full explanation is on this page:</p>

<ul>
<li><a href="http://playground.arduino.cc/Main/Printf">http://playground.arduino.cc/Main/Printf</a></li>
</ul>
