Microbit Robotics Sensors & Circuits
Advanced
60 mins
Teacher/Student led
140 points
What you need:
Chromebook/Laptop/PC
Microbit
Move Motor Car
Move Motor Klaw

Robot Car Claw

In this step-by-step lesson, you'll learn how to program a Robot Car Claw. Starting with setting up your Move Motor Car, you'll create a new project on the Microbit website, add the necessary extension, and understand how servos work. You'll then program the claw to close and open, and adjust the claw's grip. Finally, you'll be encouraged to explore other ways to program and use the claw.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Setup

    Before you start this project you will need to have a Move Motor Car with a Move Motor Klaw attached and a Microbit inserted into it.


    2 - Create a new project

    Go to the https://makecode.microbit.org/ website and create a new Microbit project.

    3 - Add the extension

    Add the kitronik-move-motor extension to your project.


    4 - How servos work

    The Move Motor Klaw has a servo in it that we can program and this controls the 2 pinchers of the claw.

    What is a servo?
    A servo is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As the coded signal changes, the angular position of the shaft changes. In practice, servos are used in radio controlled airplanes to position control surfaces like the elevators and rudders. They are also used in radio controlled cars, puppets, and of course, robots.


    5 - Close the claw

    First let's program the claw to close. To do this we will use the write servo [1 v] to 0 block which sends the a value to the servo and the servo uses this value to set what angle to turn the shaft to.

    Sending a value of 0 should make the claw close. Add the following code to your project to close the claw when you press the A button.

    Once you've added the code, download it onto your Move Motor Car, turn the car on and press the A button to test that it closes correctly.

    Note that the Move Motor car has two servo connections. They are labelled on the car as "SERVO 1" and "SERVO 2". When you are adding the above code make sure you choose whatever servo (1 or 2) that you have connected your claw to on the car.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more