Serial.print

Hello arduino fans

Sorry for the noob question about serial.print

Can someone confirm that i must comment out those lines of code when the arduino is not connected to a computer’s serial port?

Are you waiting for the Serial port to become available in the setup?

Which arduino do you have and are you worried just about print (and not begin etc)?

Ok a typical uno or similar that would not be a problem - would not hang your code

Can someone confirm that i must comment out those lines of code when the arduino is not connected to a computer's serial port?

No, Serial.print() does not make problems if there is no connection to the PC. If you get such problems the error is somewhere else in your code. Post your code if you need help with it.