7

I am starting off with an Arduino Uno and am able to flash some sketches via the Arduino IDE.

Something confuses me though... When I press the reset button on the board I was under the impression that my currently flashed application is removed. That is not the case. It still executes the last flashed application. Is that supposed to happen?

Also when I flash the "bare minimum" sketch with no code instructions, the on board LED on pin 13 is constantly active. Is that the default behavior?

3 Answers 3

6

All that the reset does is restart your application you wrote in the arduino code IDE.

Sign up to request clarification or add additional context in comments.

6 Comments

basically everything runs in the loop() call. When you press the restart it will call setup() and then start the loop() call .... Does that help?
Thanks for the clarification. And the always on led on pin 13 (labeled L on the board) is also on by default?
I'm honestly not sure, I'm working on mine tonight. I'll let you know what I figure out. I have mine controlling 8 relays. I hooked up a bluetooth shield to it in hopes that I can control it via an android device aka HP Touchpad.
That sounds like a very interesting journey. Good luck with that. :) Did you try to use the android accessories api to control your setup?
I ended up taking some open source code and heavily modifying it so my android tablet could connect to the arduino and issue it commands. Here's the video of me using it. Finished the app yesterday it still needs to be polished and the buttons need some UI wrappers. youtube.com/watch?v=PQyrZb6NXS0
|
6

Actually, when you press the reset button, the controller is reset and starts execution at a specified address (the reset vector). In the case of Arduino, the address is in the upper end of the flash memory which contains the boot loader. If the boot loader does not see any traffic in the serial line (i.e. an incoming new program) it transfers execution to your program, i.e. setup(), loop() and the works. The program you load to Arduino is programmed in a flash memory, it does not go away that easily.

Comments

2

That button should be labeled REBOOT. That is what it does to the board.

I added this similar answer because I understand that it' conceptually different to re-run the sketch than reset and startup everything

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.