Go Down

Topic: Serial Monitor not working on Due? (Read 2966 times) previous topic - next topic

DROBNJAK

Jun 27, 2014, 11:02 pm Last Edit: Jun 28, 2014, 08:09 am by DROBNJAK Reason: 1
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?

zaxarias


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 ?  ;)




z.p

DROBNJAK

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.

zaxarias

z.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?

zaxarias


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 ?

z.p

DROBNJAK

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.

Palliser

Could you post your code? Thanks.

p

DROBNJAK

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

Code: [Select]

/*
  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);
}

Palliser

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

Quote
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

zaxarias


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  :D :D :D
z.p

DROBNJAK

#11
Jun 28, 2014, 09:37 pm Last Edit: Jun 28, 2014, 09:41 pm by DROBNJAK Reason: 1
@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?

zaxarias


@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 ?
z.p

DROBNJAK

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

zaxarias

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
z.p

Go Up