Guest User

Untitled

a guest
May 26th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. int addr = 128;
  2.  
  3. void eepThang() {
  4. eep_value = EEPROM.read(addr);
  5. if (eep_value == 1) {
  6. Serial.println("already reset. writing 0");
  7. EEPROM.write(addr, 0);
  8. }
  9. else {
  10. Serial.println("not reset.. writing 1, restarting");
  11. Serial.println(eep_value);
  12. EEPROM.write(addr, 1);
  13. Serial.println("done wrote... here we go");
  14. digitalWrite(relayPin, HIGH);
  15. delay(1000);
  16. }
  17. }
Add Comment
Please, Sign In to add comment