Hi,
how can I write text to the black error output section at the bottom of the Arduino IDE? is it possible?
I just want to be able to view the state of my variables etc.
I read about Serial.print etc but it doesn't explain much about where you can see the text.
Serial.print output will appere in the monitor window, click the rightmost icon on the window bar of the arduino window.
You can't get the arduino to write in that other place.
How incredibly thoughtful of you to point out that I made a mistake and to NOT give the correct method name. It would've been unfortunate for anyone to have learned an actual answer from this thread.
Fixed my mistake, sorry I wrote the wrong method name - Serial.writeln() vs Serial.println() is a small error in the grand scheme of what I was trying to do, which was give an actual answer where only snark had existed before.
stutteringp0et:
I ran into this topic because I had the same question. The vague sort-of answer at the end left me to explore the example code to find the answer.
Reply #1 had a complete answer to the original question which, as far as I can see, was different from yours.
Your code does not address the original question.
And I think Serial.print() and .println() are adequately covered in the Reference pages.
I think it is reasonable to expect people to read them before posting questions.
In the Arduino environment, choose: "Tools -> Serial Monitor" from the menu and a console window will open and your output should display there. It did not output to the black status area at the bottom of the sketch window.
void setup() {
// put your setup code here, to run once:
Serial.begin(SERIAL,9600);
Serial.println("Hello World");
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(" Hello World ");
delay(2000);
}
I fire up the serial monitor (already set to 9600) but don't see anything printed there. But I see the scroll tab move, so I guess something is happening.
frenzal_dude:
Hi,
how can I write text to the black error output section at the bottom of the Arduino IDE? is it possible?
I just want to be able to view the state of my variables etc.
I read about Serial.print etc but it doesn't explain much about where you can see the text.
Robin2: @tanzz, you need to check dates before you reply. Your Post is 5 years too late.
...R
Seeing as this is the very first Google result that appears when searching out how to write debug messages to the console, the last post previous to the one I quoted was perfect. It explained what code to write, and how to see it in the IDE. Thank you tanzz, BulldogLowell and stutteringp0et for helpful responses to get me going.
Unfortunately, it's a wonder I made it to the good stuff, because the first responses (from PaulS) were very off-putting and disheartening to read. Thought this all was supposed to be fun, but then there's some a*& giving a novice a hard time. I'm an experienced programmer in C#, C++, etc but new to the Arduino. I hope the community is a lot nicer in general than PaulS!
Oh, and btw I'm a engineer/software developer by career and no one reads the official documentation
Gunn317:
I hope the community is a lot nicer in general than PaulS!
I believe he is no longer contributing. But I think that if you can ignore his style you will find that his advice was accurate.
Oh, and btw I'm a engineer/software developer by career and no one reads the official documentation
I'm quite sure you have not become a professional developer without becoming a regular "looker-up" of technical details - whether in the official documentation or elsewhere. And I'm also quite sure that you would find it irritating for people to ask you routine questions about your products to which they could easily have got the answer by reading the documentation you wrote.