0% found this document useful (0 votes)
161 views

Robot-Flowchart-Final-Algorithm 1

The document outlines the steps a robot will take to complete a race track, including starting the timer when the start button is pressed, making motor sounds, checking sensors to detect colors on the track to determine speed, counting laps, storing and returning the completion time, and ending when the race is over or a crash is detected.

Uploaded by

api-297074626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Robot-Flowchart-Final-Algorithm 1

The document outlines the steps a robot will take to complete a race track, including starting the timer when the start button is pressed, making motor sounds, checking sensors to detect colors on the track to determine speed, counting laps, storing and returning the completion time, and ending when the race is over or a crash is detected.

Uploaded by

api-297074626
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Waitforuserto

pressstartbutton
(touchsensor)

Start

ReturnTime

Endofrace

Timer
IRSensor

Say3,2,1...GO!
Timer

Makemotorsound.

No

HasRobot
completedLap?Or
detectedgreen?

No

Count1
Second
GetTime
Isthereanobstacle
withinarangeof30?

Yes
Return
Movement

DisplayTimeon
RobotDisplay.

SendTimetophone
viabluetooth

Yes
StoreTimein
Times.txt

Movement

StoreRobotsTime
inVariableTime.

ReturnCrash
Endofrace
Check
Boundary
End

ReturnTime
Check
Boundary

Hasrobot
detectedred?

Movement

IRSensor

No

Hasrobot
detectedblack?

Yes

Yes

SetSpeed30

Setspeedto
30

No

ReturnCrash
Hasrobot
detectedwhite?

Yes

SetSpeedto
60

Yes

Setspeedto
10

Yes

SetSpeedto
100

Return
Movement

No
Hasrobot
detectedblue?
No
Turn90degrees
clockwise

Turn90degrees
anticlockwise

HasRobot
detected
yellow?

No

SetSpeedto
0

You might also like