Skip Navigation

micro: controller (Go Bananas!)

By Jen Perry 120 minutes
Level
Grades 4-6
Subjects
English Language Arts,
Art,
Mathematics
components
  • Programming
  • Technology and Society
  • Design
Tools & Languages
Block-based,
micro:bit

Key Coding Concepts

  • Algorithms
  • Conditional Statements
  • Events
  • Loops
  • Variables

Terminology

Circuit

Path that electricity travels on; must be complete for electricity to flow through it properly

 

Conductor

Any material that lets electricity flow through it (today, we are using metal and fruit!)

In this lesson, learners will code a video game in Scratch, then design their own micro:bit video game controller to play it!

Prerequisites

  • The educator should have some knowledge of micro:bit.
  • Learners should have some previous experiences with coding (Scratch or Blockly). Consider trying the ‘I <3 micro:bit’ lesson plan first.

Technology

  • micro:bit (one per learner)
    • Including battery holder and 2 AAA batteries
  • Computers or a device capable of pairing to micro:bit (one per learner)
  • Headphone jack

Materials

  • 4 alligator clips
  • Fruits: banana, orange, apple, peach, etc.
  • Craft supplies: fabric, duct tape, cardboard, glitter, tinfoil, elastic bands, buttons, etc.

Before the lesson...

Introduction

Discuss different types of game controllers and display some images. What do they have in common? How are they different?

Watch the ‘DIY Crazy Controllers (Scratch 3.0 + micro:bit)’ video by PinkyPepper. Share ideas on how these controllers might work.

Say: Today, we are going to code a game in Scratch and build our very own micro:bit video game controller to play it!

Code-Along

  1. Open up a new Scratch project at scratch.mit.edu and click on “create” (top, left corner).
  2. Point out the main elements: Stage, Sprites, and Scripts. Demonstrate how to drag and connect blocks.
  3. Give learners a few minutes to click on blocks and explore.
  4. Go through 1-2 challenges with the group, where learners are tasked with trying to make something happen in Scratch. For example, “Try to make Scratch move” or “Try to make Scratch say something when the space key is pressed” See the Code-Along Challenges doc for more examples and solutions.

Activity

Coding the Catch ‘Em Game

Follow the instructions at scratch.mit.edu/microbit (or more detailed instructions) to connect the micro:bit to Scratch. Learners will need to do this on their own computers, as well.

Show the example project, so learners know what they are working towards. Ask them what they see - what is happening in this project? How do we make these things happen?

Use the solution sheet to guide learners through the following steps:

  1. Moving Scratch around
  2. Making the collectibles fall
  3. Cloning the collectible
  4. Debugging
Building the Controller

Have learners create their own micro:bit controller using alligator clips and fruit (you may want to take this time to teach the group about circuits! We are actually making a circuit in the following steps):

  1. Connect the end of the 1st alligator clip onto the ground (GND) pin of the micro:bit.
  2. Connect the other end of the 1st alligator clip to the orange.
  3. Connect the end of the 2nd alligator clip onto pin 0 of the micro:bit.
  4. Connect the other end of the 2nd alligator clip to the banana.
  5. Connect the end of the 3rd alligator clip onto pin 1 of the micro:bit.
  6. Connect the other end of the 3rd alligator clip to the apple.

Tip: Try to secure the alligator clips so that as much of the metal part as possible is touching the gold part of the micro:bit.

Tell learners that pin 0 (or the banana) will act as our right arrow key in our game, while pin 1 (or the apple) will act as the left arrow key. Remember, you need to complete the circuit for the fruit-buttons to work. This means you just touch the banana and orange or the apple and orange at the same time (the orange is connected to the ground pin!)

Give learners time to remix their projects and play their games.

Reflection

Have learners Think-Pair-Share the following questions:

What are/is:

  • 3 new things that you learned today
  • 2 areas that challenged you in this lesson
  • 1 way you can use something from this lesson in your own life

Learning Outcomes

I can create algorithms in Scratch
I can use events to control when things happen in my project
I can use electric circuits to trigger events in my project
I can use loops to make things happen more than once
I can build my own video game controller using conductive materials

Assessment Ideas

Use comments in Scratch to have learners explain their steps (right click > add comment).

Have learners research the following coding concepts and explain how they used them in their project: algorithm, conditionals, events, loops, variables.

Coding:

  • Complete the Add-Ons in the solution sheet
  • Check out MakeCode micro:bit game projects for other games that a controller could be used to control. Then, as an unplugged activity to practice design thinking skills, have learners physically design a game controller prototype* to control the game they’ve chosen.
    *Note: the controller is not required to actually work at this time.

English: Check out Writing Prompts #1: Video Games by Build Creative Writing.

Technology & Society (Tech and the Environment): Have a class discussion about E-waste of old consoles/controllers and discuss this article.

Design (User Design): Identify the basic principles of design thinking. Is it possible to rebuild and repurpose games and consoles? Explore the Phonetroller project by hackaday.io and have learners draw a prototype of a hacked controller.

MakeCode Reference Guide
https://makecode.microbit.org/reference

The Official BBC micro:bit User Guide (2018) by Garteth Halfacree

micro:bit Tutorial Series Part 1: Getting Started
https://www.youtube.com/watch?v=ZIW_6rxYNBg

micro:bit by BBC - Creative Classroom Tips for Educators
https://www.youtube.com/watch?v=pR_AapxVudM

DIY Crazy Controllers (Scratch 3.0 + micro:bit) Video https://www.youtube.com/watch?v=44Xo76BbqiI

micro:bit Game Projects
https://makecode.microbit.org/projects/games

3rd Grade Writing Prompts #1: Video Games
http://www.build-creative-writing-ideas.com/3rd-grade-writing-prompts.html

Ecolife: How to Recycle Video Games and Consoles
http://www.ecolife.com/recycling/electronics/how-to-recycle-video-games-consoles.html

Hackaday.io’s Phonetroller
https://hackaday.io/project/112177-phonetroller

Teach lessons that are tied to your existing curriculum! https://bit.ly/CLClessons

r

More Lesson Plans For Grades 4-6

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝

    Programming

    By the end of high school, students should be able to create a simple computer program.

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.

    Data

    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.

    Design

    By the end of high school, students should be able to apply design principles to the digital projects they create.