Advertisement
UvZp

Untitled

Feb 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. boolean StartButtonPressed(){
  2. if (digitalRead(START_BTN) != HIGH || buttonsBlock){
  3. startButtonState = 0;
  4. return false;
  5. }
  6.  
  7. if (millis() - previousMillis > 50){
  8. previousMillis = millis();
  9. startButtonState++;
  10. }
  11.  
  12. if(startButtonState >=3){
  13. return true;
  14. }
  15.  
  16. return false;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement