Blogroll

Powered by Blogger.

Wednesday 19 March 2014

Reset Arduino using Program - Program code to reset Arduino

by realfinetime  |  in Microcontroller at  10:09

Sometimes we will want to reset our Arduino using program. Resetting arduino using code is simple. A function is used for resetting Arduino. Function is given below.

void(*resetFunc) (void) = 0; 

To reset arduino, call the function using following code.

resetFunc();

Sample Program.

void setup(){
}

void(*resetFunc) (void) = 0; 


void loop() {

  resetFunc();
  delay(1000); 
}

Above program will reset arduino each and every second.


4 comments:

  1. Replies
    1. i usualy using this function in setup area for start reset

      Delete
  2. Hi, my name is marlin. Good article, this is very interesting and can increase my knowledge. thank you for sharing. always success

    Arduino Tutorial For Begginers


    Arduino Uno Project For Beginners


    How To Reset Arduino Uno

    ReplyDelete
  3. unfortunately nothing happens .

    ReplyDelete

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips



Proudly Powered by Blogger.