Hi, guys
I would like to be able to reset my Arduino WiFi Shield when the connection is dropped. I am currently using an Arduino R3 board. I have used the below procedure this works in resetting to the beginning of code however the WiFi Shield does not want to connect again after this code is run and I must re-upload the sketch
I call the function softReset when connection fails, this restarts arduino to beginning of sketch
void softReset(){
asm volatile (" jmp 0");
}
then I use
http://arduino.cc/en/Tutorial/EEPROMClear , to clear memory (1024 because arduino has this much eeprom
http://arduino.cc/en/Main/arduinoBoardUnofor (int i = 0; i < 1024; i++)
EEPROM.write(i, 0);