Mini Challenge 1: Backwards Driving Assistance
Upgrade your program so that it has one more Button Press movement!
|
So far, we used If/Else Block to make robot think about only 2 different scenarios. Now, think very carefully and visualize the steps the robot would take to think about 3 different scenarios!
You will need more than one If/Else block to do this challenge.
One way to do this challenge is to place second If/Else Statement Block inside 'Else' branch of the first If/Else statement!
The robot will look at the outer-most If/Else statement first. If it is not true, it will run code inside 'Else' branch, which contains another If/Else statement to check if it is True or False.
Mini Challenge 2: Full Button Control
Create a new program where the steering of the robot is fully controlled using the VEX IQ Controller buttons. Assign one button to make the robot move forward, one to make the robot move backward, one for turning right, and one for turning left. Complete a simple maze using the program.
|
Create a repeatUntil loop where each time the program flow passes the loop, it checks up to 4 different buttons
Think about how you would check 4 different if-statements if you can only decide between 2 things at a time
You can use multiple nested If-Else block where If-Else block is placed inside another If-Else block.