Pages: [1]   Go Down
Author Topic: Side efects of launching the serial monitor  (Read 175 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
Please refer to the code below where digout is initialized as output and set high. When the code is loaded to the Uno, the pin does go hi but  and i press <shif><ctrl>M, the pin is pulsed low! before going high again. This would applies to whatever Uno's pins. The net effect is that launching the monitor my destroy a board's power on state set by the "Setup()" procedure!

Is this unavoidable?
Does launching the serial monitor forces a full reset an re-executes Setup()?
What is the suggested workaround?
Thanks in advance for your time
Guy


#define digout 4
void setup() {   
  pinMode(digout, OUTPUT);     
  digitalWrite(digout, HIGH);
  Serial.begin(9600);
}
void loop() {     
  Serial.println("press kb");
  while (Serial.available()<=0);
  Serial.read();
  Serial.println("starting");
}
Logged

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

Quote
The net effect is that launching the monitor my destroy a board's power on state set by the "Setup()" procedure" resets the Arduino board
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.

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks. board is indeed entirely reinitialized and it aint an issue
Logged

Pages: [1]   Go Up
Jump to: