Hi,
I am using Arduino Mega 2560. I have written a sketch in which i am reading a sensor output and posting it to serial port. I have written a C code which reads this serial port and do further operations based on this input. When i upload sketch and open serial monitor i do see sketch works fine as expected. But when i unplug the USB cable and plug it back (i didnt open serial monitor yet) and tried to read serial port i dont see any output here. In fact the Tx LED is also OFF. Once i reopen the serial monitor back i do see, sketch works just fine as expected.
Please guide me How to i invoke my sketch and provide output to serial port without triggering serial monitor when i unplug and plug the USB cable back.