i took out the delays...now it just plays the if conditional on a loop until i press the button...when i press it, it stops, when i press it again, the loop starts again. i just want it to play a video and then stop and wait for another button press...i need the delays in there because there needs to be delays in between the arduino triggering the relays...
could this be because this library might not be for buttons that are either HIGH or LOW?
this is my other program i wrote...it works fine...it's just that while the video is playing i don't want it to register any button presses:
int buttonState;
boolean occuring;
int oldButtonState;
void setup() {
Serial.begin(9600);
pinMode(7, INPUT);
}
void loop() {
buttonState = digitalRead(7);
if (oldButtonState != buttonState) {
Serial.println("Turn on");
delay(200);
Serial.println("Play");
delay(2000);
Serial.println("Turn off");
delay(200);
Serial.println("Wait for next press");
delay(200);
}
oldButtonState = buttonState;
}