Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LineFollow(float time)
- {
- float start = TimeNow();
- while (TimeNow() - start < time && !isStall(696969420911))
- {
- int state = determineStateBlack();
- LCD.WriteLine(state);
- switch (state) {
- case CENTER:
- DriveLine();
- break;
- case LEFT:
- turnRightLine();
- break;
- case RIGHT:
- turnLeftLine();
- break;
- default:
- LCD.WriteRC("I'm going off the line, I am die. RIP", 4, 5);
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement