How to make functions which in loop run only once?
Forums
hey guys, i am doing a project on arduino. and i am using arduino UNO. i needed a help in coding. basically the arduino default loop runs forever. but i want some task to be run only once in the loop.
so examle is like this, if my one push button is pressed then it starts reading and if it high then it should print the "Pressed" once then if released then it should print "Not Pressed" only once
void loop(){
push = digitalRead(inPin);
[original story: Circuit Digest]