Programminng Arduino M0 Board

I am having Arduino M0 Board.

When I flashed the sketch it is uploading but, on serial monitor I am getting nothing.

All the respective fields are correct like :

  1. baud rate,
  2. PROGRAMMING PORT

Please give me urgent reply when anyone see this...!!!!!!!!

(deleted)

Are you getting errors when uploading? If you are getting errors while uploading, please post them.

Otherwise, it sounds like the problem would be with your code - so you should post that, as well as a description of what you're expecting it to do and what it's actually doing instead.

  1. I am using the Arduino M0 Board, USB Cable, computer with arduino IDE.
  2. When I flashed the Example sketch for ex: Any sketch in arduino IDE, I am not getting any thing on Serial Monitor.
  3. I am not using any new code. I am using only Example codes, but still I am not getting any thing on Serial Monitor.

POST YOUR CODE!!!
IS THAT TOO COMPLICATED?

Doc

Please post a code example that does not work.

The M0 is a board from arduino.org. Which brings the question which IDE (version) you are using? If that is an IDE from arduino.org, you might be better of asking on their forums.

Problem solved.

No need to give reply.

dutt060587:
Problem solved.

No need to give reply.

Maybe you might want to share the solution so others can benefit if they encounter the same issue.

Well , I have encountered the same problem ... so I am surely interested in your solution...
it must be something completely stupid...

KalleL

Doesn't the M0 communicate to PC via "native USB", so you have to use "SerialUSB.print()" instead of just "Serial"?
(you have to be careful about Zero vs M0 vs M0-pro, too...)
(Hmm. I checked the variants.h file, and it implies that "Serial" on the m0 exists, but is not actually connected to anything. So using SerialUSB is probably the fix.)

Hmm, wouldn't that also apply to e.g. a Leonardo with 32U4?

Some of the variants have "#define Serial SerialUSB", if they don't have a Serial port by default.
Hmm. But not Leonardo; it just happily defines the USB CDC port as "Serial" from the start. Perhaps it helps that there is not "UART0" on 32u4?

It's always bothered me a bit that "Serial" isn't really of known type, so you can't (?) do

HardwareSerial S = Serial;

and the like in a program. Seems like the "inheritance" is upside down, or something, but I can't quite put my finger on how it SHOULD work, given various different types of Serial things.