1
votes

I have a problem with my Arduino Uno. If I start my program, an application I've created, gets the data okey from my Arduino Uno, but if I unplug my Arduino Uno my serial port connection remains open. Even after I plug the device in again, the program can't write to my Arduino. It's like my connection becomes frozen.

With Arduino Duemilanove I don't remember having this problem. What I want is: when I disconnect my Arduino Uno, my serial Port connection should close. Is there a reset on setup() or something like that?

1
maybe showing some code as far as how you handle the serial communications may shed some light on what the problem iscurtisk

1 Answers

2
votes

Can you please post your c# code?

From what I can tell, it looks like you didn't close the connection in your code.

You can try the following:

portName.Close();