So I have a sketch that using an array, digitally reads five pins connected to buttons then writes to the serial monitor whethor or not they are on or off. But when i turn the switch on or off it won't just write On/Off once it will write it alot of times because its part of a loop. Does any one know how to make the sketch below only print On/Off once or basically how to make something not loop in a loop? Maybe with a boolean? Sorry i ask so many questions, thanks!
