I am using a Leonardo and the Keyboard.H library to login into a Windows pc on boot. This works great from a cold boot but ive found that rebooting the pc doesn't power cycle the arduino to restart my program. Is there a way to detect when Windows restarts? One thing I noticed is that the RX lights activate twice on windows boot. Could that transmission be captured and used to restart the program? Any assistance or pointers to the right direction would be appreciated.
I think the first question I would ask myself is whether the Rx flashes are A) long high/low pulses, or B) data being transmitted.
A digital oscilloscope would be the obvious tool to use to answer that question, but not everyone has easy access to one.
Next best option would be to get a usb-serial adaptor to connect to the Leo's second serial ports. Connect the usb port to a second pc/laptop. Then write a short sketch to echo any data from the Leo's first serial port to the second and monitor the output of that on the second pc. You may have to try many different baud rates. But if nothing makes any "sense", perhaps they are just long pulses. In which case write a short script to measure them to see if they have a consistent pattern.
Not an easy problem. Good luck!
Hello,
If PC Has serial port (RS232), signal from one of the RS232 pins can be used as trigger if PC rebooted but if any application resets RS232 port, this can be read as reboot too !
Thank You