Display message in Serial Monitor? - Leonardo

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
savard
 
Posts: 34
Joined: Mon Feb 11, 2013 12:46 pm

Display message in Serial Monitor? - Leonardo

Post by savard »

Hello tech support,

My objective is to upload and execute the code to display messages in the Serial Monitor.
Please offer advice to figure out what is wrong with the current setup:

1) Is the sketch incorrect for serial communication, coding issues. Though within the code we are able to toggle the LEDs (snapshot 1);
2) Do we have any configuration issues, attaching snapshots for the application setting (snapshot 3);
3) Is something else incorrect occurring which we are overlooking?


After installing Arduino IDE, we pursued the following steps:

Step 1: Blink Program
a) Uploaded Blink (File->Examples->Basic->Blink) program which worked. I was able to view blinking LEDs
b) Able to change the duration of delay and it responded as expected

Step 2: Modified DigitalReadSerial Program with "Hello World" (File->Examples->Basic->DigitalReadSerial)
a) Uploaded the modified DigitalReadSerial program
b) I opened the "Serial Monitor" and no messages were displayed in the serial Monitor (snapshot 2)

Step 3: Blink + DigitalReadSerial program
a) Merged the two programs to assess if "Hello World" is correctly displayed within the serial Monitor
b) Uploaded the Blink + DigitalReadSerial program (snapshot 1) and the following was observed:
i) LEDs blinking but no messages were displayed in the serial Monitor
ii) When changing the delay duration for LEDs, it responded as expected when the serial Monitor was not opened. But once the serial Monitor opened – the LEDs blinked but at a slower rate.


Attachments:
1) snapshot 1: New program (Blink+DigitalReadSerial) which we uploaded to test the serial Monitor.
2) snapshot 2: Serial Monitor display screen after uploaded program
3) snapshot 3: Confirming Aurdino Leonardo board use

System Settings: Microsoft Windows XP
Arduino IDE version: 1.0.3
Comm Port: COM5
Board: Arduino Leonardo
Attachments
snapshot 3
snapshot 3
snapshot3.JPG (239.53 KiB) Viewed 648 times
snapshot 2
snapshot 2
snapshot2.JPG (54.41 KiB) Viewed 648 times
snapshot 1
snapshot 1
snapshot1.JPG (154.94 KiB) Viewed 648 times

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Display message in Serial Monitor? - Leonardo

Post by Franklin97355 »

It looks like it should work, make sure you understand this...
The Arduino Leonardo board uses Serial1 to communicate via TTL (5V) serial on pins 0 (RX) and 1 (TX). Serial is reserved for USB CDC communication. For more information, refer to the Leonardo getting started page and hardware page.

User avatar
savard
 
Posts: 34
Joined: Mon Feb 11, 2013 12:46 pm

Re: Display message in Serial Monitor? - Leonardo

Post by savard »

Thank you for the quick reply Franklin - unfortunately it is not correctly working.

So the question I am trying to answer is how:

"Based on the code, and on the screen shots, what do I have to do to see the "hello world" in the serial monitor?"

Please offer advice and support!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Display message in Serial Monitor? - Leonardo

Post by adafruit_support_mike »

savard wrote:"Based on the code, and on the screen shots, what do I have to do to see the "hello world" in the serial monitor?"
This should work:

Code: Select all

void setup () {
    Serial.begin();
    Serial.println( "Hello, world!" );
}

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”