Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() {
- pressCount = buttonRead();
- //Serial.println(pressCount);
- switch (pressCount) {
- case 1:
- lightUp(pressCount);
- motorRun(1);
- break;
- case 2:
- lightUp(pressCount);
- motorRun(0);
- break;
- case 3:
- lightUp(pressCount);
- motorRun(2);
- break;
- case 4:
- lightUp(pressCount);
- motorRun(1);
- break;
- default:
- lightUp(0);
- motorRun(0);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement