Pages

Friday 4 June 2021

Being A Jedi in Coding

 LI: to code the to move backward without touching it - being a jedi.


In coding this week we were tasked to try make the mBot move backwards without touching it. My Robot will wait until I press the onbaord button before it does anything. While coding we are using these blocks to start the coding. To make the mBot we needed "If - Then - Else" block to give the mBot to choices of things to do. We used an ultrasonic sencsor which is on the front of it for it to sense if there was something 10cm away from the robot. If there is an object 10cm or less away from the robot the robot will move backwards. If there is an object further than 10cm away it will keep going forward. This is a pull into the forever block so that the robot constantly senses what is in front of it.

No comments:

Post a Comment