Serial Monitor not working on Due?

I am on Win 7, Arduino IDE 1.5.6-r2, all installed and working correctly. I downloades Blink successfuly and Blink works. Due is recognized on PC each time, on COM30 etc.

When I run example sketch, AnalogReadSerial, that is using Serial.println(), nothing comes up in Serial Monitor. As a matter of fact no Serial.print() commands work at all. Actually Serial Monitor looks completely dead, even if I put delay(8000); which is quite long, still nothing.

Any clues? Where should I look?

DROBNJAK:
I am on Win 7, Arduino IDE 1.5.6-r2, all installed and working correctly. I downloades Blink successfuly and Blink works. Due is recognized on PC each time, on COM30 etc.

When I run example sketch, AnalogReadSerial, that is using Serial.println(), nothing comes up in Serial Monitor. As a matter of fact no Serial.print() commands work at all. Actually Serial Monitor looks completely dead, even if I put delay(8000); which is quite long, still nothing.

Any clues? Where should I look?

--version 1.5.6 may cause problems with the serial monitor, the problem is fixed in version 1.5.6-r2 that can be downloaded below.
--This software is a beta version(1.5.6-r2), you may encounter bugs or unexpected behaviours. Please discuss any issues

According to http://arduino.cc/en/main/software 1.5.6-r2 has no serial monitor issues , however why don't you download 1.5.5 and give it a try to see how it goes ? :wink:

OK, found 1.5.5-r2 and installed. Now Serial Monitor works.

So for me 1.5.6-r2, that was released to fix problem with S.M. doesn't work.

Thanks for the tip.

you re welcome :smiley: :smiley:

He, He, just when I thought I was out, I went back to square #1.

This worked on one PC, but when I took it to the other it didn't work. I tried both 1.5.5-r2 and 1.5.6-r2. They both use USB2.0, not much difference. What could it be?

DROBNJAK:
He, He, just when I thought I was out, I went back to square #1.

This worked on one PC, but when I took it to the other it didn't work. I tried both 1.5.5-r2 and 1.5.6-r2. They both use USB2.0, not much difference. What could it be?

Is arduino recognized? Can you see it on Device manager?
Is Board selected on the IDE ? tools-.Board->Due ?
Have you checked the right port on tools->Ports ?

Yep, done all the standard stuff, many times. Ehhh, "... mystery wrapped into enigma". PC that doesn't work is about 1-2 years older, but drivers are all up to date.

Could you post your code? Thanks.

p

Its just AnalogInOutSerial from Examples / Basic / ... Here it is for a quick reference:

/*
  Analog input, analog output, serial output

 Reads an analog input pin, maps the result to a range from 0 to 255
 and uses the result to set the pulsewidth modulation (PWM) of an output pin.
 Also prints the results to the serial monitor.

 The circuit:
 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 * LED connected from digital pin 9 to ground

 created 29 Dec. 2008
 modified 9 Apr 2012
 by Tom Igoe

 This example code is in the public domain.

 */

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255);
  // change the analog out value:
  analogWrite(analogOutPin, outputValue);

  // print the results to the serial monitor:
  Serial.print("sensor = " );
  Serial.print(sensorValue);
  Serial.print("\t output = ");
  Serial.println(outputValue);

  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(2);
}

I did run your code in my Due with IDE 1.5.6-r2 and it runs OK (nothing connected to the Due).

sensor = 276 output = 68
sensor = 266 output = 66
sensor = 269 output = 67
sensor = 277 output = 69
sensor = 267 output = 66
sensor = 268 output = 66
sensor = 277 output = 69
sensor = 268 output = 66
sensor = 267 output = 66
sensor = 275 output = 68
sensor = 272 output = 67
sensor = 264 output = 65
sensor = 275 output = 68
sensor = 274 output = 68
sensor = 264 output = 65

p

DROBNJAK:
He, He, just when I thought I was out, I went back to square #1.

This worked on one PC, but when I took it to the other it didn't work. I tried both 1.5.5-r2 and 1.5.6-r2. They both use USB2.0, not much difference. What could it be?

Don't use the other pc :smiley: :smiley: :smiley:

@Palliser: Many thanks

That is a standard code from Examples Sketch library. There was never an issue about the code. Code was written by Arduino, Inc. in the first place.

Issue is that Due is emulating emaulation of USB emulation. Which in my case means, I can't get Serial Montior to work.

@zaxarias: Thanks, I don't have access to that PC all the time.

What should I do? Is there something I change on the USB driver?

DROBNJAK:
@Palliser: Many thanks

@zaxarias: Thanks, I don't have access to that PC all the time.

What should I do? Is there something I change on the USB driver?

OK , what is the problem with that PC?
It won't detect your Due ? You can't upload?
Serial monitor problem ?

It detects Due OK, each time.

Problem is it won't print anything to Serial Monitor. I tried:

  • checked that driver is 64-bit on Win7
  • pulled out all other USB devices, so nothing can interfere with Due,
  • puting delay(8000); in front of Serial.begin(9600);
  • dropping the Serial rate to 1200
  • reinstalling the driver
  • same code works on Leonardo

What versions of IDE did you try ?
I would suggest you try all three of them , 1.5.5 , 1.5.6 , 1.5.6-r2
Make sure each time you have the right port selected, tools -ports-COMx

yeah, thx, I was 1.5.5, reinstalling 1.5.6-r2 right now.

This is how my Due drivers look like. Can somebody please compare with his and tell me if there is any difference?

DROBNJAK:
This is how my Due drivers look like. Can somebody please compare with his and tell me if there is any difference?

http://i78.photobucket.com/albums/j111/COROVICD/DP08_Due-Driver_1_zps0dcd9b12.jpg

Nothing looks wrong , i would suggest you completely uninstall your DUE from device manager and then install drivers again..
Make sure you follow this guide step by step http://arduino.cc/en/guide/windows
Reinstall IDE 1.5.5..

There is possibility that cable is the problem. I got my cable from Adafruit and it works well on Leonardo (and on the other PC).

This cable is not just normal mini-USB Type B. Normal Type-B cables can't fit into Leonardo or Due?

DROBNJAK:
There is possibility that cable is the problem. I got my cable from Adafruit and it works well on Leonardo (and on the other PC).

This cable is not just normal mini-USB Type B. Normal Type-B cables can't fit into Leonardo or Due?

No , DUE uses a micro Usb cable ..