In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

In this tutorial, we will be guiding you through the 5th experiment from the Kitronik Inventors Kit. We will guide you through setting up the circuit and coding the program using block programming in the MakeCode software.

Setting Up the Experiment

Parts List

  • 1x Transistor
  • 1x 2.2kΩ Resistor (Red, Red, Red, Gold)
  • 1x Terminal Connector
  • 1x Motor
  • 1x Fan Blade
  • 3x M/F Jumper Wires

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Building the Circuit

Adding the Resistor

Insert the pins of the 2.2kΩ Resistor into holes C9 and E17 of the breadboard.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Adding the Transistor

Add the transistor onto the breadboard by inserting the pins into holes D16, D17 and D18, with the flat side towards the bottom of the board.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Adding the Motor

Place the red (positive) wire in the left-hand side of the terminal connector and the black (negative) wire into the right-hand side. Using a small flat head screwdriver tighten the screws to secure the wires in place.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Insert the pins of the terminal connector into holes A14 and A16 on the breadboard. Push the fan blades securely onto the motor.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Adding the Jumper Wires

  • 0 to E9
  • 3V to E14
  • 0V to E18

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Coding the Experiment

MakeCode Software

Regardless of which OS you are using go to the MakeCode website with any internet browser. The page is broken down into a series of sub-categories with your created projects being at the top along with some premade programs for Tutorials, Games, Radio Games, Fashion and many more!

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

You can click on any of these to load the code, however, if you wish to start your first or a new project click on the big purple box labelled New Project.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

You have 2 coding options within this which can be changed by using the At the top of the page you will notice a slider-style button, click on it to change the coding window to JavaScript mode.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5 In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

Block Mode

JavaScript Mode

You should now have a screen that looks similar to this.

In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Coding Guide

    This program doesn't require the use of the on start function. Remove it by click and dragging the 'On Start' block from the main coding window over the block categories until you see an image of a bin then release the mouse button to remove it from the program.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Click on the ADVANCED category to expand the menu

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Click on the PINS category and drag the 'Analog Write Pin P0 to 1023' block into the Forever block.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    From the MATH category, drag the  'absolute of 0' block and place it over the value 1023 in the analog write block.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Click on the INPUT category and drag the block 'acceleration (mg) X' and place it on the 0 of the absolute block.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Click on the little arrow next to the letter X, from the dropdown menu select the option Y.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Uploading to the Micro:Bit

    In the bottom left corner of the MakeCode page, you will find a textbox along with a purple download button. Click on the word untitled in the textbox and give your program a new name.

    Press the Download button and the file will download to your downloads folder unless you specified a specific place.

    In-Depth Guide to the Kitronik Inventors Kit - Experiment 5

    Once the file has downloaded, open up the window for the download location and a separate window for the MICROBIT. Click and drag the file from downloads over to the micro:bit.

    Once it has finished, the MICROBIT window will close and reopen, please note that while the file you just copied does not appear in the window, it will have been copied across. 

    Previous Next