Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int relayPin = 02;
- int addr = 128;
- void eepThang() {
- eep_value = EEPROM.read(addr);
- if (eep_value == 1) {
- Serial.println("already reset. writing 0");
- EEPROM.write(addr, 0);
- }
- else {
- Serial.println("not reset.. writing 1, restarting");
- Serial.println(eep_value);
- EEPROM.write(addr, 1);
- Serial.println("done wrote... here we go");
- digitalWrite(relayPin, HIGH);
- delay(1000);
- }
- }
Add Comment
Please, Sign In to add comment