I am a big noob I know that
but can this code be used to reset arduino board (instead of pressing the usual reset button on the board)
I want to reset the board as If am pressing the reset button using IR
int receiverpin = 2; // pin 1 of IR receiver to Arduino digital pin 2
#include <IRremote.h>
IRrecv irrecv(receiverpin); // create instance of irrecv
decode_results results;
void setup()
{
irrecv.enableIRIn(); // start the receiver
}
void(* resetFunc) (void) = 0; //declare reset function @ address 0
void loop()
{
if (irrecv.decode(&results)) // have we received an IR signal?
{
if(results.value == 0x2FD847B) //if the button press equals the hex
{
resetFunc();
}
{
irrecv.resume(); // receive the next value
}
}
}