Go Down

Topic: Should i somehow "reset" my Arduino when moving it from one project to another? (Read 628 times) previous topic - next topic

mace

Hi all. I have been wondering, would it be somehow a good idea or best practice to somehow reset my Arduino every time i move it from one project to another one? Point being, that for one project the Arduino might be outputting stuff on various pins, and this might lead to all sorts of trouble when electronic components of a new project are connected, and the Arduino starts running the old program?

Would it be a good habit to run

Code: [Select]
setup() {}
loop() {}


before connecting new components? Or am i being too careful?  :smiley-roll:

CrossRoads

That is a good habit, as you note having pins set to outputs while connecting up new hardware could be fatal to the chip.

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

retrolefty


Hi all. I have been wondering, would it be somehow a good idea or best practice to somehow reset my Arduino every time i move it from one project to another one? Point being, that for one project the Arduino might be outputting stuff on various pins, and this might lead to all sorts of trouble when electronic components of a new project are connected, and the Arduino starts running the old program?

Would it be a good habit to run

Code: [Select]
setup() {}
loop() {}


before connecting new components? Or am i being too careful?  :smiley-roll:


No it's a good idea, especially if you have a herd of arduino boards that you tend to grap one and try out something quick and dirty. If the arduino has some prior sketch in it that uses I/O pins then bad things can happen if you wire it up to new external circuitry and just power up before loading a new proper sketch into it.

What I do rather then when finished with a project is to just load the blink sketch so that the next time I power up the board I will know that it is using only pin 13 and most likely is running the example blink sketch.

Lefty

JimboZA

Good question, and one I have considered but never bothered doing.

I responded here just simply so I get the thread activity in my "replies".... sorry I've got nothing to add!
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

fungus

Seems like a good idea, yes, both for the Arduino and the attached components.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)


Nick Gammon


I responded here just simply so I get the thread activity in my "replies".... sorry I've got nothing to add!


Click the "Notify" button under the thread to be notified of replies. You don't have to reply just to see other replies.
http://www.gammon.com.au/electronics

JimboZA

Quote
Click the "Notify" button under the thread to be notified of replies.


I know but as far as I could make out when I tested that a month or two back, that notifies by email. I don't want emails, I want to see it in "replies" here in the Forum. Or did I get that wrong? (But I'll double check with an arbitrary thread.)

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Nick Gammon

http://www.gammon.com.au/electronics

gapan

That is a very good idea mace. Thanks for starting this thread, I'll try to make uploading this "reset" sketch a habbit of mine too before starting anything new.

Go Up