Serial Communication Arduino Uno

Hello,

I recently ran into a strange situation with my arduino code and serial monitor. I have the code telling a linear actuator to move back and forth (back and forth once being one cycle) for 20,000 cycles. However, the sketch window & serial monitor closed suddenly, but the linear actuator was still running. Is the linear actuator still running to 20,000 cycles with the code I put? Does it know to stop at 20,000 cycles even without the serial monitor?

Thanks.

Unless that reset the board (opening a serial connection resets an Arduino unless you clobber the autoreset), it would continue doing what it was doing. The Arduino can't tell if serial is connected, other than via the autoreset when serial connection is opened.

Awesome, thank you!