Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (centerval == 0)
- {
- myservo.write(90);
- }
- else if (leftval == 0)
- {
- myservo.write(60);
- }
- else if (rightval == 0)
- {
- myservo.write(120);
- }
- else {
- delay(1000); // or however long you need to delay
- digitalwrite(motorpin, LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement