This section provides answers for the 'Consider This...' sections of this workshop.
Where does human error come into play here?
For this example, human error could have involved with the placing of the robot on the line and/or the laying of a striaght tape line.
Can you think of why this program may not produce a perfect straight line with this robot (excluding the human error mentioned above)?
The program relies on both motors being the same age and power. Also, tyre wear may not be identical causing some deviation.
Why do you think the turning values for Johnny may differ from those of other robot designs using the same kit and motors?
Different wheel and motor set-ups can alter the turning circle of the robot. Some hardware set-ups don't even involve wheels or the same type of motors.
If we ran this program on an identically built robot, it would not be guaranteed to work. Why might this be?
The motors and tyres will come from different batches of different ages and levels of wear.
How could you use sound effects or other additions to help with determining if a program is working correctly? Have a look at the sort of sounds available for clues.
Sound can be used to test sensor detection, or which parts of a program are being used.
Why have we not just set the switch to 'if 0 move forward, if not turn'?
The 0 reading could mean directly behind so doing this would increase the distance from the beacon.
What would have happened if we didn't instruct Johnny to stop when near the beacon?
The robot would continue pushing the beacon and not stop as the beacon would continue registering as in front of the robot.
Looking at how Johnny is built, why can we not use a threshold value between 0 and 5 for stopping?
The infrared sensor is near the back of the robot meaning if the threshold is too low, the beacon cannot get close enough to the sensor due to the robot's body.
How could we use sounds to test line detection in the program?
We can set different sounds to play according to colour detection to highlight when it finds or loses the white line
Why would this program fail if the speed was increased too far?
The faster the robot, the lower the accuracy of the colour sensor on such a thin target.
Why would this program fail if the white line took a very tight turn to the left?
This program means that, when the sensor does not detect the white line, it turns to the right. A tight left turn would result in the robot turning right to rediscover the line it has already travelled.
If a red taped line was put across the end of the white line how would you change the program to stop at this point?
Set the forever loop to end when the colour sensor detects red.
Why would this program not work if the maze involved dead-ends?
The program relies on only being able to turn left or right with no back-up if neither option is available, it will instead crash into the left wall.
Why would it be better practice to write a program that wasn't just designed to navigate this maze of right-angled turns?
It would mean not needing to tweak the power and turning ratio figures and make it more compatible with similar hardware set-ups.