To learn how to use the distance sensor.
ALL students will: Learn how to use an IF block with the distance sensor
MOST students will: Learn how to use an IF ELSE block with the distance sensor
SOME students may: Learn how to use an IF ELSE IF block with the distance sensor
IF statement: A programming conditional statement that, if proved true, performs a function.
Get the sensor to turn on the motor once the distance of the object is less than 50cm.
Chance the IF block to an IF ELSE.
IF the distance is < 50, turn on the motor at 10% power.
If the distance is not < 50, turn off the motor.
Change the block to an IF ELSE IF & AND
Program the following to work:
Can you add in a second sensor? E.g. If the color sensor see's red AND the distance sensor is < 50, do something.
Portfolio
Take a video of your program working. Make sure your code is clearly visible. If your code is not clearly visible, take a screenshot of that and put it on your portfolio.
Do NOT use your phone to record your screen, use Quicktime. Speak to me if you cannot do this.