Friday, June 25, 2021

Rock Paper Scissors

 Learning Intention

To learn how to code the microbit to play rock paper scissors and understand how the flowchart matches the code.

Link to DLO


  1. When I shake the microbit, it will choose a random number between 1 and 3
  2. I have to make a variable called hand and set this to the random number
  3. If the number is 1 - the microbit will show the symbol for paper
  4. If the number is 2 - the microbit will show the symbol for rock 
  5. If the number is 3 - the microbit will show the symbol for scissors


Friday, June 18, 2021

Friday, June 11, 2021

Building an mBot

 Learning Intention - To understand how the mBot is put together so that I can fix it when something goes wrong.

Today, we took an mBot apart and then reassembled it. We then tested it with some code to make sure that it worked correctly.

Here are the parts of the mBot that I took apart.



Here is the reassembled mBot



Here is the code that I used to test that it worked.





Friday, June 4, 2021

Being a Jedi in Coding

 



Learning Intention
To code the robot to move backwards without touching 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 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.