Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- pinMode(10, INPUT_PULLUP);
- }
- void loop() {
- int btn_state = digitalRead(10);
- if(btn_state == LOW){
- SystemReset();
- }
- }
- void(* resetFunc) (void) = 0; //declare reset function at address 0
- void SystemReset() {
- resetFunc();
- }
Advertisement
Add Comment
Please, Sign In to add comment