I like to Move It Move It: Adding Motors to the Makey:bit

Servo-Main-Project-Image

I Like to Move it Move it: Adding Motors to the Makey:bit

30-60 min

Ages 11+

What Will You Make?

Learn how to control servo motors with the micro:bit then build a small buggy for the Makey:bit.

What Will You Learn?

Learn how to install and control Servo motors with the Makey:bit.

Learn how to install Extensions in MakeCode.

Learn how to use Function blocks in MakeCode.

Connect the Servo Motors

Step 1

Look on the back of the Makey:bit at the array of pins behind the head. On the left side of the array, there are two rows of 3 pins dedicated to servo motors. The top row is labeled (left to right) P2 Servo, BAT and GND. The second row is labeled P0 Servo, BAT, GND.

Step 2

Insert your servo motors into each row with the orange wire to the left (into P0 or P2).

Add the Servo Motor extension

Step 1

Servo motors can be controlled using the Pins blocks but it is easier to control them if you add the Servo Extension. In your MakeCode program, click on Extensions.

Step 2

Select the Servo extension (if it is not visible on the first page, search for Servo).

Test Out Some Code

Step 1

Before you build something, try out some simple code to familiarize yourself with how to control the motor. From the “Input” tab, select “on button A pressed.”

Step 2

Now select from the servos tab and pick a “continuos servos” block. Put two of these blocks into the Input tab and select one from P0 and the other from P2.

Step 3

Select a “pause” block from the “Basic” tab.

Step 4

Select a “Stop servo” block from the “Servos” tab and use two of them to stop the servo.

Step 5

Upload the program and test it out

Build Something!

Step 1

Robots come in many shapes and sizes. Build your own or pick one of the projects designed specifically for the Makey:bit: Walking Robot or Robot Buggy.
Follow the assembly instructions for the project you pick. 

Step 2

Once assembled, take a close look at the position of the motors in your robot. Notice that they are mirroring each other. Almost any robot design will have the two motors positioned as mirror images of each other. What does that mean for your code? You probably guessed it… forward for one motor means reverse for the other motor! Update your code and test it out.

Build Something!

Step 1

Now that we know how to control motors and LEDs on the micro:bit and the eyes, we can use Functions to streamline our code for commonly used commands. In this case, let’s create a command for the robot that we will call “goForward”. Start by clicking on the “Advanced” tab.

Step 2

Now select the “Functions” tab and click on “Make a Function.”

Call the function “goForward.”

Note: It is common naming convention for Functions to start with a lower case letter. This isn’t a requirement in MakeCode but we will use this convention.

Step 3

Now we can combine code within the Function block “goForward.” Let’s add a face that represents going forward. We can also make the colors of the eyes green to represent “goForward” and, of course, let’s make the motors turn in such a way that the robot goes forward.

Test and upload the code.

Step 4

Now try making a “goRight” and a “goLeft” block or even a “goBackwards” block.

What Is Happening Here?

What is a Servo Motor?

According to Wikipedia “A servomotor is a closed-loop servomechanism that uses position feedback to control its motion and final position. The input to its control is a signal (either analogue or digital) representing the position commanded for the output shaft.”

What does this mean? Essentially, a servo motor is a precise motor that is often used in robotics. There are two types of servo motors: continuous and 180. A continuous motor can spin forward and backward continuously and is most commonly used for wheels of a robot. A 180 motor can only move 180 degrees and is used when we want to have very precise control.

Servo motors come in many shapes and sizes and the most commonly used size for beginner maker projects are “micro-servo motors.” If the servo is marked “FS90R” it is a continuous servo. If you are unsure what kind of servo you have, look up online the part number marked on the servo to confirm before proceeding

About the Makey:bit

The Makey:bit Adventure Board is the perfect way to get started with microcontrollers. With this exclusive Maker Shed kit, you’ll be able to easily launch into the world of electronics and create amazing projects.

This all-in-one board includes everything you need to get started, including a built-in LED, buzzer, and various sensors. Plus, the Makey:bit is compatible with all kinds of additional modules, so you can easily expand your creativity.

So what are you waiting for? Get the Makey:bit Adventure Board today and start supercharging your microcontrollers!

Are you looking for a way to supercharge your microcontrollers? If so, then you need the Makey:bit Adventure Board! This exclusive Maker Shed product is packed with features that will take your microcontrollers to the next level. With the Makey:bit, you’ll be able to launch into the realm of microcontrollers and unleash their full potential. The Makey:bit is loaded with features that make it an essential tool for anyone looking to get the most out of their microcontrollers.

Materials:

See More Projects in these topics:

Electronics Engineering Microcontrollers Programming Robotics STEM or STEAM

See More Projects from these themes:

Construction Site The Shop (Makerspace)
Print Project

Maker Camp Project Standards

Based on NGSS (Next Generation Science Standards)

NGSS (Next Generation Science Standards) The Next Generation Science Standards (NGSS) are K–12 science content standards. Learn more. Forces and Motion 3-PS2-3. Ask questions to determine cause and effect relationships of electric or magnetic interactions between two objects not in contact with each other. HS-PS4-5. Communicate technical information about how some technological devices use the principles of wave behavior and wave interactions with matter to transmit and capture information and energy.
CCSS (Common Core State Standards) The Common Core is a set of high-quality academic standards in mathematics and English language arts/literacy (ELA). Measurement & Data Grades K-2 CCSS.MATH.CONTENT.K.MD.A.1 Describe measurable attributes of objects, such as length or weight. Describe several measurable attributes of a single object. CCSS.MATH.CONTENT.1.MD.A.1 Order three objects by length; compare the lengths of two objects indirectly by using a third object. CCSS.MATH.CONTENT.1.MD.A.2 Express the length of an object as a whole number of length units, by laying multiple copies of a shorter object (the length unit) end to end; understand that the length measurement of an object is the number of same-size length units that span it with no gaps or overlaps. CCSS.MATH.CONTENT.2.MD.A.1 Measure the length of an object by selecting and using appropriate tools such as rulers, yardsticks, meter sticks, and measuring tapes. CCSS.MATH.CONTENT.2.MD.A.2 Measure the length of an object twice, using length units of different lengths for the two measurements; describe how the two measurements relate to the size of the unit chosen. CCSS.MATH.CONTENT.2.MD.A.3 Estimate lengths using units of inches, feet, centimeters, and meters. CCSS.MATH.CONTENT.2.MD.A.4 Measure to determine how much longer one object is than another, expressing the length difference in terms of a standard length unit. Grades 3-5 CCSS.MATH.CONTENT.3.MD.B.3 Draw a scaled picture graph and a scaled bar graph to represent a data set with several categories. Solve one- and two-step "how many more" and "how many less" problems using information presented in scaled bar graphs. CCSS.MATH.CONTENT.4.MD.A.1 Know relative sizes of measurement units within one system of units including km, m, cm; kg, g; lb, oz.; l, ml; hr, min, sec. Within a single system of measurement, express measurements in a larger unit in terms of a smaller unit. CCSS.MATH.CONTENT.4.MD.C.5 Recognize angles as geometric shapes that are formed wherever two rays share a common endpoint, and understand concepts of angle measurement. CCSS.MATH.CONTENT.5.MD.A.1 Convert among different-sized standard measurement units within a given measurement system (e.g., convert 5 cm to 0.05 m), and use these conversions in solving multi-step, real world problems. CCSS.MATH.CONTENT.5.MD.C.3 Recognize volume as an attribute of solid figures and understand concepts of volume measurement. Ratios & Proportional Relationships Middle School CCSS.MATH.CONTENT.6.RP.A.1 Understand the concept of a ratio and use ratio language to describe a ratio relationship between two quantities. CCSS.MATH.CONTENT.6.RP.A.3 Use ratio and rate reasoning to solve real-world and mathematical problems, e.g., by reasoning about tables of equivalent ratios, tape diagrams, double number line diagrams, or equations. CCSS.MATH.CONTENT.7.RP.A.1 Compute unit rates associated with ratios of fractions, including ratios of lengths, areas and other quantities measured in like or different units. CCSS.MATH.CONTENT.7.RP.A.2 Recognize and represent proportional relationships between quantities.
K–12 Computer Science Framework The K–12 Computer Science Framework is designed to guide computer science from a subject for the fortunate few to an opportunity for all. The guiding practices include: Fostering an Inclusive Computing Culture Collaborating Around Computing Recognizing and Defining Computational Problems Developing and Using Abstractions Creating Computational Artifacts Testing and Refining Computational Artifacts Communicating About Computing You can download the complete framework here. You may also want to consider the International Society for Technology in Education Standards. The ISTE Standards provide the competencies for learning, teaching and leading in the digital age, providing a comprehensive roadmap for the effective use of technology in schools worldwide.
K–12 Computer Science Framework The K–12 Computer Science Framework is designed to guide computer science from a subject for the fortunate few to an opportunity for all. The guiding practices include: Fostering an Inclusive Computing Culture Collaborating Around Computing Recognizing and Defining Computational Problems Developing and Using Abstractions Creating Computational Artifacts Testing and Refining Computational Artifacts Communicating About Computing You can download the complete framework here. You may also want to consider the International Society for Technology in Education Standards. The ISTE Standards provide the competencies for learning, teaching and leading in the digital age, providing a comprehensive roadmap for the effective use of technology in schools worldwide.
ISTE Standards (International Society for Technology in Education) The ISTE Standards provide the competencies for learning, teaching and leading in the digital age, providing a comprehensive roadmap for the effective use of technology in schools worldwide. 1.1 Empowered Learner Summary: Students leverage technology to take an active role in choosing, achieving, and demonstrating competency in their learning goals, informed by the learning sciences. 1.1.a Students articulate and set personal learning goals, develop strategies leveraging technology to achieve them and reflect on the learning process itself to improve learning outcomes. 1.1.b Students build networks and customize their learning environments in ways that support the learning process. 1.1.c Students use technology to seek feedback that informs and improves their practice and to demonstrate their learning in a variety of ways. 1.1.d Students understand the fundamental concepts of technology operations, demonstrate the ability to choose, use and troubleshoot current technologies and are able to transfer their knowledge to explore emerging technologies. 1.2 Digital Citizen Summary: Students recognize the rights, responsibilities and opportunities of living, learning and working in an interconnected digital world, and they act and model in ways that are safe, legal and ethical. 1.2.a Students cultivate and manage their digital identity and reputation and are aware of the permanence of their actions in the digital world. 1.2.b Students engage in positive, safe, legal and ethical behavior when using technology, including social interactions online or when using networked devices. 1.2.c Students demonstrate an understanding of and respect for the rights and obligations of using and sharing intellectual property. 1.2.d Students manage their personal data to maintain digital privacy and security and are aware of data-collection technology used to track their navigation online. 1.3 Knowledge Constructor Summary: Students critically curate a variety of resources using digital tools to construct knowledge, produce creative artifacts and make meaningful learning experiences for themselves and others. 1.3.a Students plan and employ effective research strategies to locate information and other resources for their intellectual or creative pursuits. 1.3.b Students evaluate the accuracy, perspective, credibility and relevance of information, media, data or other resources. 1.3.c Students curate information from digital resources using a variety of tools and methods to create collections of artifacts that demonstrate meaningful connections or conclusions. 1.3.d Students build knowledge by actively exploring real-world issues and problems, developing ideas and theories and pursuing answers and solutions. 1.4 Innovative Designer Summary: Students use a variety of technologies within a design process to identify and solve problems by creating new, useful or imaginative solutions. 1.4.a Students know and use a deliberate design process for generating ideas, testing theories, creating innovative artifacts or solving authentic problems. 1.4.b Students select and use digital tools to plan and manage a design process that considers design constraints and calculated risks. 1.4.c Students develop, test and refine prototypes as part of a cyclical design process. 1.4.d Students exhibit a tolerance for ambiguity, perseverance and the capacity to work with open-ended problems. 1.5 Computational Thinker Summary: Students develop and employ strategies for understanding and solving problems in ways that leverage the power of technological methods to develop and test solutions. 1.5.a Students formulate problem definitions suited for technology-assisted methods such as data analysis, abstract models and algorithmic thinking in exploring and finding solutions. 1.5.b Students collect data or identify relevant data sets, use digital tools to analyze them, and represent data in various ways to facilitate problem-solving and decision-making. 1.5.c Students break problems into component parts, extract key information, and develop descriptive models to understand complex systems or facilitate problem-solving. 1.5.d Students understand how automation works and use algorithmic thinking to develop a sequence of steps to create and test automated solutions.
NGSS MS.Engineering Design The Next Generation Science Standards (NGSS) are K–12 science content standards. MS-ETS1-1. Define the criteria and constraints of a design problem with sufficient precision to ensure a successful solution, taking into account relevant scientific principles and potential impacts on people and the natural environment that may limit possible solutions. MS-ETS1-2. Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem. MS-ETS1-3. Analyze data from tests to determine similarities and differences among several design solutions to identify the best characteristics of each that can be combined into a new solution to better meet the criteria for success. MS-ETS1-4. Develop a model to generate data for iterative testing and modification of a proposed object, tool, or process such that an optimal design can be achieved. For additional information on using content standards with our projects please visit the Maker Camp Playbook.
NGSS HS.Engineering Design The Next Generation Science Standards (NGSS) are K–12 science content standards. HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants. HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering. HS-ETS1-3. Evaluate a solution to a complex real-world problem based on prioritized criteria and trade-offs that account for a range of constraints, including cost, safety, reliability, and aesthetics as well as possible social, cultural, and environmental impacts. HS-ETS1-4. Use a computer simulation to model the impact of proposed solutions to a complex real-world problem with numerous criteria and constraints on interactions within and between systems relevant to the problem. For additional information on using content standards with our projects please visit the Maker Camp Playbook.