The top program has the bot move forward for 3.5 seconds before stopping for 1.5 seconds before it finally turns in a circle.
The middle program has the bot moving in a circle until the sonar sensor detects an object at less than 30 cm which then ends the loop. Then the bot will turn in a circle for 1 second.
The last program has the bot moving in a short circle before driving straight. It will do this until the light sensor measures a light value greater than 42 which will then end the loop. Afterwards the bot will turn in a circle for 3 seconds.
1. Touch sensor (Set to respond to being pressed)
2. Motor block
3. Sonar sensor (set to measure in inches)
4. While Loop
5. Case Structure
6. Greater Than
7. Flat Sequence Sequence
8. Wait For
9. Tools Palette
The middle program has the bot moving in a circle until the sonar sensor detects an object at less than 30 cm which then ends the loop. Then the bot will turn in a circle for 1 second.
The last program has the bot moving in a short circle before driving straight. It will do this until the light sensor measures a light value greater than 42 which will then end the loop. Afterwards the bot will turn in a circle for 3 seconds.
1. Touch sensor (Set to respond to being pressed)
2. Motor block
3. Sonar sensor (set to measure in inches)
4. While Loop
5. Case Structure
6. Greater Than
7. Flat Sequence Sequence
8. Wait For
9. Tools Palette