Напиши в фунцию zero
stat=~stat;
digitalWrite(13, stat); // set the LED off