#include <EEPROM.h>
int buttonState = 0;
int buttonPin = 7;
void setup() {
Serial.begin(9600);
}
void loop() {
for (int i=0; i < 13; i++){
pinMode(buttonPin,INPUT);
buttonState = digitalRead(buttonPin);
if(buttonState==0){
Serial.println("Button is pressed");
}
else{
Serial.println("Button is not pressed");
}
EEPROM.write(i, buttonState);
}
while(1){}
}
No comments:
Post a Comment