Thursday, 3 June 2021

Being a Jedi in coding

                         L.I To code the robot to move backwards, without touching it to be a Jedi
What is Baby Yoda's real name? The Mandalorian creators want to keep you  guessing - ABC News

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 SENCOR 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 on front of the robot, it will move backwards. IF something 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