Serial Monitor stops working when using PinMode I'm having a lot of trouble with my recent Arduino sketch. I need to reset an IC by setting a pin high then low. I also am using the serial monitor for some testing but as soon as I try and do a Serial.print, nothing appears. My Arduino is also on a custom PCB, where D7 is connected to the IC's (MAX3421) reset pin, and also to the Arduino's reset pin.
To try and make my issue clearer, ill post some code and the serial monitor output below:
void setup() 
{
  Serial.begin(9600); 
  
  pinMode(7, OUTPUT);
}

void loop() 
{
  Serial.println(&quot;TEST&quot;);
}

[nothing in serial monitor]

void setup() 
{
  Serial.begin(9600); 
  
  //pinMode(7, OUTPUT);
}

void loop() 
{
  Serial.println(&quot;TEST&quot;);
}

[lots of TESTs]
Any help is appreciated,
Thomas
My issue was that pin 7 was connected to the reset pin on the Arduino, meaning every time it was set to output, the Arduino was reset.
You can see this here:
void setup() 
{
  Serial.begin(9600); 

  Serial.println(&quot;a&quot;);

  delay(100);
    
  pinMode(7, OUTPUT);
}

void loop() 
{
  Serial.println(&quot;test&quot;);
}

which outputs a stream of a's separated by 100ms (plus a bit)