Arduino mega freeze when power on while there is RX signal using RS232 module

Hi I'm having a mental breakdown right now.
I don't know why.
Why does the Arduino stop if the communication is connected and recived data when the power is off?

Help. please.

  1. Normal operation
  1. Power off

  2. Power on

Cable : USB to RS232 ( NETmate USB2.0 to RS232)
RS232 module : Manufacturing: YwRobot ( RS232 - TTL Module [MCU030310])


LCD : 2004 LCD(I2C Control.)

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27 ,20,4);

void setup() { 
  delay(1000);
  lcd.init();                    
  lcd.backlight();
  Wire.begin();
  Serial.begin(9600);
  Serial.setTimeout(100); 
  Serial.println("ok");
       
}
void loop() {
  RS232_PC2(); 
  clcd_display();  
}
void clcd_display (){
    lcd.setCursor(0,0);          
    lcd.print("Running");
}
void RS232_PC2(){
  String inputStr = "a";
  if(Serial.available() > 0)
  {
    inputStr = Serial.readStringUntil('\r'); 
  }
  else {
    return;
  }
  if (inputStr == "A") {
   Serial.println("A");
  }
}

Thank you.

Please do not cross post. Continue the original thread, in which you failed to respond to post #11.

OK. I thought I'd organize the content and post it.

"Why does the Arduino stop if the communication is connected and recived data when the power is off?"

I have yet to find an Arduino that will receive data when its power is off.

While you are organizing the pictures include an annotated schematic showing exactly how you have wired it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.