I'm using serial communication with Arduino and Matlab, and I need a way to reset Arduno from Matlab once a serial connection is made. I'm using Leonardo, and I understand that it uses a virtual serial interface unlike other boards. How can I achieve that?



Connect an IO pin to RESET pin via suitable resistor usually 1kR, then trigger IO pin to achieve reset in case you won't find any reset command in library

  • \$\begingroup\$ so, do I send a command to the IO pin or will it automatically restart when the serial connection is established? \$\endgroup\$ – Isra Feb 28 '17 at 5:39
  • \$\begingroup\$ I tried what you suggested and Arduino was stuck in a resetting loop, even though I put an if statement to check for the incoming command from the serial port and only set pin 7 to HIGH when a certain char is received. \$\endgroup\$ – Isra Feb 28 '17 at 6:20
  • \$\begingroup\$ This is that IO got latched, Try reversing polarity of reset IO or use external watchdog chip. \$\endgroup\$ – SACn Feb 28 '17 at 7:08
  • \$\begingroup\$ Yes, I've set it as the following pinMode(6, INPUT); digitalWrite(6, LOW); in void setup, then pinMode(6, OUTPUT); digitalWrite(6, LOW); in void loop and it works fine now. Thanks, \$\endgroup\$ – Isra Feb 28 '17 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.