Pages: [1] 2 3   Go Down
Author Topic: Serial Monitor not working on Due?  (Read 2488 times)
0 Members and 1 Guest are viewing this topic.
London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: June 28, 2014, 01:09:45 am by DROBNJAK » Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?  smiley-wink




Logged

z.p

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you re welcome  smiley-grin smiley-grin
Logged

z.p

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?

Logged

z.p

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 16
Posts: 495
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you post your code? Thanks.

p
Logged

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Venezuela
Offline Offline
Sr. Member
****
Karma: 16
Posts: 495
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin smiley-grin smiley-grin
Logged

z.p

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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?
« Last Edit: June 28, 2014, 02:41:46 pm by DROBNJAK » Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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 ?
Logged

z.p

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 268
Arduino has it all
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Greece
Offline Offline
Sr. Member
****
Karma: 12
Posts: 371
Arduino fan
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

z.p

Pages: [1] 2 3   Go Up
Jump to: