Let’s get ready to code your Wind Turbine project. To follow the coding tutorial on Makecode, click the Start Coding button below.

Open Coding

If you’d like to try coding your Wind Turbine without following a tutorial, you can code openly in the traditional Makecode workspace by clicking the link below.

Here’s a brief description of the coding objective:

The computer program uses a special knob (like the ones you turn to play a game) to check the speed. When you press the knob, the program stops changing the speed. If you turn the knob one way, it makes the blades spin faster, and if you turn it the other way, they slow down. The program knows which way to spin because it follows a set rule, like a game rule that tells it which direction to go.

There are two buttons, let’s call them button A and button B. Button A is like starting a stopwatch when you begin spinning. Button B is like stopping the stopwatch when you finish.

To figure out how fast the blades spin, the program looks at how much time passed from when you started to when you stopped. Then your mirco:bit should display the milliseconds. In the next section you will work to calculate your RPM using a formal provided.