Learning Intention
To code the robot to move backwards without touching it - to be a Jedi
We used an "IF - THEN - ELSE" block, as this gives the robot two choices of things to do.
We are using the ULTRASONIC SENSOR on the front of the robot and we need to sense if something is 10cm in front of it..
IF something is 10cm or LESS in front of the robot, it will move backwards.
IF something is NOT less than 10 cm in front of the robot, it will move forwards (ELSE).
This is all put into a forever block so that the robot constantly senses what is in front of it.
No comments:
Post a Comment