Pages: [1]   Go Down
Author Topic: Serial monitor broken ?  (Read 604 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been using the serial monitor for trouble shooting and communicating with a 168p on a custom board with no problems whatsoever.  Suddenly now it will no longer talk to the chip !

If I communicate with the 168p via some test software I wrote (which includes a serial monitor) it works fine.
The sketch when running on a friends Windows PC and using the same board works fine
Sketches from weeks ago when it was still working work fine
The baud rate is set correctly
It RECEIVES data from the 168p and happily displays this correctly.

So basically if I enter text into the text box and press return or click send the 168p does not get it and if I do the same with my own serial monitor it does.

So it appears that a setting has gone astray or broken OR the IDE is damaged.

I've tried renaming the Arduino package within Applications (MAC) and reinstalling a fresh version which does the same.

It's just annoying that I can't use the built in monitor......


Any ideas?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26630
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried a terminal emulator?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the loopback test work? Can confirm the USB path is all working.
http://arduino.cc/forum/index.php/topic,73748.0.html
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried a terminal emulator?

Yes as stated in OP thanks.
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the loopback test work? Can confirm the USB path is all working.
http://arduino.cc/forum/index.php/topic,73748.0.html

No I've not done that but I have two identical boards here both of which are working perfectly using my own serial comms program in both directions.  Both also send data which the computer receives only issue is the serial monitor sending data which does not work.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26630
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes as stated in OP thanks.
which terminal emulator?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes as stated in OP thanks.
which terminal emulator?

Part of the desktop program which communicates with the board.......


However.....
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just quickly wrote this to test it:



Code:
char inputString[50];
int stringPos=0;

void setup() {
  Serial.begin(115200);
  Serial.println("Quick test");
}

void loop() {
  if (Serial.available()>0){
    digitalWrite(13, HIGH);
    Serial.println(Serial.available());
  } else {
    digitalWrite(13, LOW);
  }
  if (Serial.available()>0) {
    char inChar = (char)Serial.read();
    inputString[stringPos]= inChar;
    stringPos=min(stringPos+1,50);
    if (inChar == '\n') {
      digitalWrite(10, HIGH);
      delay(100);
      digitalWrite(10, LOW);
      Serial.println(inputString);
      stringPos = 0;
      for (byte i = 0; i < 50; i++) {inputString[i]=(char)0;}
    } else {
      Serial.print("Part = ");
      Serial.println(inputString);
    }
  }
}


And it works fine.....  BUT it still doesn't work in the original sketch or previous versions that WERE working fine.

Investigating......
Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PROBLEM SOLVED.....


The box [No line ending...New line...CR.....etc etc] had moved to "No line ending"

DOH!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't ya hate when that happens? smiley-cool
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: