In this article we explore the "if then else" block in the MakeCode programming language. This block is a logic block that extends the "if then" block. We wrote an introduction to the "if then" block here. In this example, we will show you how to program and if-then-else block and control a robot, helping the robot to decide if it should move forward or stop.
In this tutorial, we'll walk you through how to use Button A and Button B on your micro:bit. We will use the GiggleBot robot for the micro:bit to show how you can use Buttons to give commands.
In this tutorial we'll show how to use a While loop with the BBC micro:bit and demonstrated using the GiggleBot.