Pages

Thursday, June 3, 2021

Being a Jedi in coding

 LI:To code the robot backwards without toching it - to be a Jedi




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 to do.We are using the ULTRASONIC SENSOR on the front of the robot and we need to sense if soemthing is 10cm in front of it.If soemthing is 10cm or LESS in front of the robot,Ut will move backwards.If soemthing is NOT less than 10cm 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