Makey:bit Scratch Gamer

Project 7 of 8
In Progress

Makey:bit Scratch Gamer

30-60 min

Ages 8+

What Will You Make?

It’s time to play! Use Makey:bit as a controller for your games, to connect the real world with the digital world.

Pressing the buttons will turn on Makey’s LEDs, and you will use these to catch all the tools you can, to earn points, and increase the difficulty.

What Will You Learn?

We will use Scratch block programming to create a fun game, using variables, sounds, sensors, and operations. We will program our Makey:Bit, to interact with the NeoPixels in Makey’s eyes.

Grab your materials...let's get coding!


Our code is divided into 2 parts:

1) The neopixels with Makey:Bit

2) The game with Scratch

Neopixels + Makey:Bit

Step 1

We are going to open Make Code, here we can program with JavaScript, Python, and of course with a visual block language, the latter is the one we will use.


Step 2

We are going to go to the Makey-Bit-Projects project repository and download it, clicking on the green “code” button, we select the Zip format. When it finishes downloading, we open the “Makey-bit-scratch-gamer” folder where we have the complete code but divided into parts.

Step 3

We enter the Make Code platform, click on “import” and drag the file “microbit-Create-Makeybit-RGB.hex”, we are ready to start.

If you are new to the platform, the part on the left is our simulator, the middle part is the blocks menu, and the part on the right is our work table. In the upper part, we can change the programming language and the project configuration and in the lower part we have the section to download and save our program

Tip: The project is now ready to work with neopixels, but if you want to use it in another project you need to download its extension, go to Tool –> Extensions –> NeoPixel.

Step 4

We have two blocks of blue color, let’s start with “on start”, we are going to place inside our block “set strip” to NeoPixel on pin 16 with 2 leds as RGB (GRB format)” with this block, we specify that we have two NeoPixels on pin 16. Next, we drag the “strip clear” block, Then we put the “strip show” block


Step 5

We go to the blue “forever” block, we drag inside the first if “if button A+ B is pressed or button a is pressed or button b is pressed then”, inside the condition we place our second if “if button A+ B is pressed then” and in the first else we place the “if button A is pressed then” and in the last else we place the “strip clear” block.

What it’s doing is checking if we’re clicking any buttons, then checking which button we’re pressing to put the color on the neopixels and if not we turn off the leds.

Step 6

To bring the code to our Makey:bit we click on the three dots next to the “download” button, select “connect device”, follow the steps and download it.

It’s time to test our code, pressing the microbit buttons and we see the neopixels change color.

Great we are already halfway through the project, now we will work on the scratch game Scratch

Scratch + Makey:Bit

Step 7

We go to the Makey:bit Scratch Creator project, we click on “View inside” to start editing it.

On the left, we have our block menu, in the middle our artboard and on the right, we can test our project.


Step 8

On the right side, we select the “Button2” now in the work area we are going to place our purple block “change background to transparent” and the purple block “hide” under the block “when clicking on this object”

After the block “when the background changes to instructions”, we put next the purple “hide” block. We continue with the block “when the background changes to home” we put the purple block “show” next.

Step 9

Perfect now we select the “1-1” tool, we see the 3 yellow blocks of our main logic and the other blocks that we will need.

Below the yellow “when background changes to home” block, we are going to place the purple “hide” block. Then the “when the background changes to instructions” block, and we put the purple “hide” block.


Step 10

Now the last yellow block “when the background changes to transparent”, we put next the purple blocks of “show” and “change costume to 1”.

Next we put our blue “set Y to 210” block.


Step 11

Take the orange “forever” block that has a condition that only one tool per color appears on the screen. We place inside the condition the blue “turn -.1 degrees” block which also has a y-change block, which changes the speed taking into account the current points.

We place after the block “change y in – if touching the color-” and then we put our block “if position in Y < -170 then”.

What we are doing is that when it touches the corresponding color of Makey’s eyes, it changes our costume and gives us a point, but if on the contrary, it touches the ground, it takes away points and disappears.

Step 12

We are going to add a sound when you touch the tools and earn points, we go to the sounds section, here we can import one or create it, remember to check the sound block in the code to specify the name of the sound and it works perfectly.

Step 13

Let’s go to the last step and a very important one, adjust the colors that Scratch detects to earn points. We click on the green flag to start the game, we click on the hand with Makey:bit, the camera is activated. Now turn on Makey’s leds and place him in front of the camera, let’s start with the yellow color in the neo pixels, then in the work section and click on “touching color” we section the pointer, and select the color of the NeoPixels outline , also to have a better result the environment has to have little light.

Tip: To activate the camera, you must accept scratch permissions, we just click on the padlock on the left of the URL.

Step 14

Perfect it’s time to play and have fun, show it to your friends and have fun with Makey:bit!

Finished Project



What Is Happening Here?


We are using a visual programming language to create a video game with Scratch, and programming Makey:bit with Make Code.

What Is Next?

It’s time to be creative in programming use different block objects or game dynamics. Then you can use the sensors that this board has like the microphone, accelerometer, and among others, to combine Makey:Bit with Scratch.

You can also find more information:

How to use Microbit with Scratch?:

What is MakeCode and how to use it?:

I like to Move it Move it: Adding Motors to Makey:bit by Diego
Animatronic Face
Makey:bit Animatronic Face by Kathy Ceceri

About MoonMakers

MoonMakers — led by Camila and Diego Luna —  are a community of creators passionate about knowledge. A Makerspace, an open space with different digital manufacturing machines. And a YouTube channel where we promote science, technology and the maker movement.

MoonMakers have collaborated with companies such as: Sesame Street, Make Community and in Mexico with Educational Television and Fundación Televisa, creating educational content.

We have given workshops throughout the Mexican Republic with: Talent Land, Secretary of Education in Jalisco, Conacyt, Centro Cultural España.



See More Projects in these topics:

Electronics Engineering Games Microcontrollers STEM or STEAM

See More Projects from these themes:

Art/Craft Studio Carnival/Theme Park The Shop (Makerspace)
Somos una comunidad de creadores apasionados por el conocimiento. Un Makerspace, un espacio abierto con diferentes máquinas de fabricación digital. Y un canal de YouTube donde promovemos la ciencia, la tecnología y el movimiento maker.
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.
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.
NGSS 3-5.Engineering Design The Next Generation Science Standards (NGSS) are K–12 science content standards. 3-5-ETS1-1. Define a simple design problem reflecting a need or a want that includes specified criteria for success and constraints on materials, time, or cost. 3-5-ETS1-2. Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem. 3-5-ETS1-3. Plan and carry out fair tests in which variables are controlled and failure points are considered to identify aspects of a model or prototype that can be improved. For additional information on using content standards with our projects please visit the Maker Camp Playbook.