So, after the sketch is uploaded, and I want to turn the Arduino off while it is running a sketch, all I have to do is unplug it. Should be safe as long as nothing is uploading. But I wonder, if I use serial communication between the Arduino and my Computer in a sketch, does it harm either if I simply unplug it?
3 Answers
if the sketch is uploaded, it wont hurt it to unplug. Just give it another source of power and it will run its sketch.
-
So, even if there is serial communication, it won't harm them? Because, if I unplug my external hard drive during communication with my Computer, it can be very harmful. I don't want to fry the little one...– MerlinOct 29, 2014 at 18:04
-
If you unplug the Arduino when it is running it will just shut off and no new data will be recieved or sent, the connection would just stop. So un plugging it wont do anything negative to the Arduino it's self but if the Arduino is using memory like an eeprom or flash, it may store corrupt data. Thats why it isn't advised that you disconnect things like hard drives when they are running. Although in reality just disconnecting the hard drive from usb wont damage anything because of safety features that are built in. Removing a built in hard drive while it was running would likely corrupt data. Oct 29, 2014 at 18:54
You can unplug it, it does not harm. If your arduino does not need power, eg. for writing EEPROM or FLASH, then no danger there. (in case it was writing EEPROM/FLASH it could write it faulty but usually even that is not a problem either)
Yes, you can unplug it directly whether if serial communication is active or not if you dont need power supply anu more using usb cable