Thursday, June 3, 2021

Being a Jedi in Coding

LI: to code a robot to try and make it move forward and back withoutb touching it





My robot will wait until i have pressed the onboard button before it does anything. We used an "IF - THEN - ELSE" block as this gives the robot two choices of things to do. We are using the ULTRASONIC  SENSORon the of the robot and we need to sense if something 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 han 10cm in the front of the robot, it wil 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