Pages: [1]   Go Down
Author Topic: Should i somehow "reset" my Arduino when moving it from one project to another?  (Read 577 times)
0 Members and 1 Guest are viewing this topic.
Helsinki
Offline Offline
Newbie
*
Karma: 0
Posts: 31
A librarydude
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
setup() {}
loop() {}

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26338
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

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.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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
Logged

Offline Offline
Faraday Member
**
Karma: 80
Posts: 3790
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 142
Posts: 5296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

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

Helsinki
Offline Offline
Newbie
*
Karma: 0
Posts: 31
A librarydude
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the input folks!
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Faraday Member
**
Karma: 80
Posts: 3790
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)



* replies.JPG (13.74 KB, 350x146 - viewed 7 times.)
Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, I thought you meant that. Yes that sends an email.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: