What does this computer code do?
This program will loop 50 times. When the button is pressed the bot will move forward.
This program will loop 50 times. When the button is not pressed the bot will not move forward.
This program will loop for 1000000. When the button is port one is pressed the motor in port A will brake and then move backwards and the motor in port B will coast. This will run for three seconds before it makes a sound.
This program will loop for 1000000. When the button is port two is pressed the motors in port A and B will brake and then the motor in port B move backwards and the motor in port A will coast. This will run for three seconds before it makes a sound.
This program will loop for 1000000. When the button is port two is pressed the motors in port A and B will brake and then the motor in port B move backwards and the motor in port A will coast. This will run for three seconds before it makes a sound.
When the sonar sensor detects an object less than or equal to 55 cm away the bot will brake the motors in port A and B before turning left for 1.9 seconds before moving forward for 1.5 seconds and then braking. Then the bot turns right for 1.9 seconds and then brakes ad makes a sound.
When the sonar sensor does not detect anything less than or equal to 55 cm away it will move forward until it does.
When the sonar sensor does not detect anything less than or equal to 55 cm away it will move forward until it does.