The following line:
digitalRead(button)==LOW;
does nothing useful (it reads the pin, compares the value with LOW, and throws the result away).
How do you have the button connected to the Arduino?
The following line:
digitalRead(button)==LOW;
does nothing useful (it reads the pin, compares the value with LOW, and throws the result away).
How do you have the button connected to the Arduino?