Hi,
An Arduino UNO can be reset by just opening a serial connection to it and setting the DTR pin appropriately.
Windows code to achieve this looks like this:
See Serial::Serial(const char *portName) in the following link for details:
https://playground.arduino.cc/Interfacing/CPPWindows
This works even if the micro is not responding to other serial communication, is busy or in an endless loop.
I saw there is the hardware solution of pulling PROG to GND.
And solutions that work with code running on the Teensy itself:
https://forum.pjrc.com/threads/30567-Hardware-reset-on-Teensy-LC
https://forum.pjrc.com/threads/44857-How-to-Reset-Restart-Teensy-3-5-using-sotware
But is there something that can reset the Teensy when it is not responding (and therefore not able to process Serial messages), just by setting some Serial or USB connection options, such as the DTR pin for Arduino UNO?
An Arduino UNO can be reset by just opening a serial connection to it and setting the DTR pin appropriately.
Windows code to achieve this looks like this:
Code:
//Setting the DTR to Control_Enable ensures that the Arduino is properly
//reset upon establishing a connection
dcbSerialParams.fDtrControl = DTR_CONTROL_ENABLE;
https://playground.arduino.cc/Interfacing/CPPWindows
This works even if the micro is not responding to other serial communication, is busy or in an endless loop.
I saw there is the hardware solution of pulling PROG to GND.
And solutions that work with code running on the Teensy itself:
https://forum.pjrc.com/threads/30567-Hardware-reset-on-Teensy-LC
https://forum.pjrc.com/threads/44857-How-to-Reset-Restart-Teensy-3-5-using-sotware
But is there something that can reset the Teensy when it is not responding (and therefore not able to process Serial messages), just by setting some Serial or USB connection options, such as the DTR pin for Arduino UNO?