Display message in Serial Monitor? - Leonardo
Moderators: adafruit_support_bill, adafruit

Display message in Serial Monitor? - Leonardo

by savard on Sun Mar 03, 2013 9:58 pm

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
snapshot3.JPG
snapshot 3
snapshot3.JPG (239.53 KiB) Viewed 452 times
snapshot2.JPG
snapshot 2
snapshot2.JPG (54.41 KiB) Viewed 452 times
snapshot1.JPG
snapshot 1
snapshot1.JPG (154.94 KiB) Viewed 452 times
savard
 
Posts: 27
Joined: Mon Feb 11, 2013 12:46 pm

Re: Display message in Serial Monitor? - Leonardo

by franklin97355 on Sun Mar 03, 2013 11:23 pm

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
franklin97355
 
Posts: 5428
Joined: Mon Apr 21, 2008 2:33 pm

Re: Display message in Serial Monitor? - Leonardo

by savard on Mon Mar 04, 2013 12:55 pm

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!
savard
 
Posts: 27
Joined: Mon Feb 11, 2013 12:46 pm

Re: Display message in Serial Monitor? - Leonardo

by adafruit_support_mike on Mon Mar 04, 2013 2:47 pm

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 | TOGGLE FULL SIZE
void setup () {
    Serial.begin();
    Serial.println( "Hello, world!" );
}
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10076
Joined: Thu Feb 11, 2010 2:51 pm