store a sketch in arduino mega

Hi, I have a sketch. Every time I start the Arduino, I have to load it again so that I can open the serial monitor in order to take input from my pc. I am wondering how I can make the arduino to read serial data once it boot without the need to open the serial monitor? TIA

What are you reading serial input from if not the Serial Monitor?

Hi, I have a sketch.

Is it a secret sketch or could we see it ?

rich1812:
Hi, I have a sketch. Every time I start the Arduino, I have to load it again

I think this is unlikely to be necessary - you are probably confused about what is happening. You only need to upload a sketch once and then it will work every time the Arduino is powered up.

so that I can open the serial monitor in order to take input from my pc. I am wondering how I can make the arduino to read serial data once it boot without the need to open the serial monitor? TIA

You can easily write a PC program that can communicate with an Arduino without using the Arduino IDE. This demo shows how to do that using a Python program.

...R