Continue Code after Reboot

Okay so I've been trying to Google and find a solution but have yet to come up with anything,

I am using an Arduino Pro Micro for HID input, using it for mouse and keyboard, when the code is run on the computer the result would be that the computer itself will restart roughly 3 times during the course of the interaction, I am looking for a way to allow the Arduino to tell when the computer restarts so it knows where in the code to pickup where it left off. Is this even possible?

What computer?

Reboot usually implies reset, so previous state on a simple microcontroller is lost.

Hmm I was afraid of that, it's just a Windows computer that will get restarted at least 3 times during the whole ordeal of what I am needing to code for..

What’s the relationship with arduino?? Try reading the guide to using this forum at the top of every section and instead of drip feeding information provide some at the outset so that people can help you with your problem. What are you trying to achieve?

Something we are completely unaware of

That's it, I am needing to detect/determine when the computer has booted to run code, from what I can find on the forums some suggest using the mobo for power some say serial ports, there is a lot of random tid bits of information available but nothing concrete. Hence the reason I asked if it was possible to even do so.

Sorry, still no idea what you want to do or why. Is an arduino involved. Are you running this unknown code on a computer or a microcontroller. Is it the computer or microcontroller that is rebooting. Why is it rebooting. What is the mysterious code doing that it needs to keep doing after a reboot. If you can detect it is rebooting then certainly a microcontroller can also but there is literally so little information to go on

I have a car and can’t get it to start, can you tell me how to fix it???

  1. Depress brake pedal.
  2. Depress clutch.
  3. Turn key.
  4. Release key when engine ignites.

This is a forum for the Arduino ecosystem of microcontroller programming, hardware interfacing and the Arduino IDE. Questions dealing with PC programming are out of scope (off topic).

Perhaps you want to ask such questions on one of the Microsoft software developers forums.

I had a truck with a "Clutch Start Cancel" switch so you could start it in gear with the clutch out.
Gotcha! :smiling_imp:

And if it doesn't? What then?

Once.

If the key does not release, wiggle the steering wheel in both directions to disengage the antitheft steering lockout.

It’s a RC car!

I have a startup batch file that waits 2 minutes (Time needed for the server to fully boot), and sends a character through the com port to the arduino.

We still have no idea where an Arduino fits in your system. And what your system is doing.

I think your right on that, thinking on this now when the computer reboots so does the board so back to square one.

You can save the state of what the Arduono is doing in non-volatile memory (EEPROM, SD card, FRAM). If it involves a lot of saving, FRAM might be preferred.

After a reset of the Arduino, you can check the saved state and continue from there.

You can also externally power the ProMicro and it will keep on running; I doubt that that is what you want though.