Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean RightCombinationPressed() {
- int buttonsStates = readButtons();
- // true && false && true OR false && true && false .....
- return digitalRead(T1) == HIGH && digitalRead(T4) == HIGH && digitalRead(T3) == HIGH ||
- digitalRead(T1) == HIGH && digitalRead(T2) == HIGH && digitalRead(T3) == HIGH ||
- digitalRead(T4) == HIGH && digitalRead(T1) == LOW && digitalRead(T3) == LOW ||
- digitalRead(T1) == HIGH && digitalRead(T3) == HIGH && digitalRead(T4) == LOW;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement