Introduce your class to physical computing with micro:bit and MicroPython. This course is an advanced introduction to micro:bit and requires prior Python programming knowledge. The curriculum engages students as they see their abstract programs come to life on a tangible physical device that they can control with their hands. Using built-in micro:bit sensors, buttons, and the 5X5 LED display, students build animated LED emojis, real-world temperature sensors, pedometers, multiplayer games, and even a two-way Morse code radio.

The course includes 16 hands-on projects with step-by-step instructions. It is delivered in an interactive notebook-style lesson format so that students can learn new concepts, write programs, and deploy code to the micro:bit right from the lesson interface. There is nothing to download or install on your computer. In addition, students can also launch Tynker Code Editor and write their own programs from scratch.

The lesson plans in this course build and reinforce STEM skills, problem solving, debugging, and collaboration skills, as students bridge digital and physical learning. Students will apply abstract programming concepts to create tangible hands-on micro:bit-based inventions.

Each lesson is designed for a class period of 45-60 minutes. All student work is automatically tracked and assessed, and you'll be able to monitor individual progress and mastery charts for your students.

This course is recommended for advanced students who are already familiar with Python. Beginner students may enroll in micro:Bit 101 where they use Tynker Blocks to program micro:bit.

This course is supported online and not supported on iPad.

Recommended Accessories: This course requires micro:bit devices (not included). You may purchase these separately at a variety of resellers or consider buying the classroom pack from Tynker. Each lesson has a detailed Parts List.

  • micro:bit, USB cable, Battery pack, 2xAAA batteries (for each student or group)
  • Accessories: Lessons 13, 14 require a Piezo speaker and Alligator clips
  • Lessons 15,16 require two or more micro:bits
  • Optional: microBit Inventor’s Kit: Classroom Pack (includes accessories required for all lessons)

While most lessons need a single micro:bit, it is encouraged that students improvise to create inventions that incorporate external cables, LEDs, speakers, aluminum foil, and other accessories, when available.

See the this section on the micro:bit foundation for more ideas!


  • micro:bit Python commands
  • 2-way radio communication
  • Deploying code to the micro:bit
  • Light and temperature sensing
  • Reading sensor values
  • Gestures and motion detection
  • Programming the LED grid
  • Multiplayer game development

What Students Learn

  • Display animations on the micro:bit LED
  • Create classic arcade games on the micro:bit
  • Create a pedometer by detecting steps
  • Build a prime number checker
  • Program a loaded die that always rolls 6
  • Detect button clicks and other events
  • Create multiplayer games using the radio
  • Build a soundboard to play musical notes
  • Extend the project to the physical world

Technical Requirements

* Online courses require a modern desktop computer, laptop computer, Chromebook, or Netbook with Internet access and a Chrome (29+), Firefox (30+), Safari (7+), or Edge (20+) browser. No downloads required.

MicroPython 101 Lesson Plan

Lesson: Introduction
Time: 45+ mins


Welcome to Tynker's MicroPython 101 course! This course contains 14 exciting lessons that will teach your students how to program a micro:bit, which is a small (yet powerful) computer called a microcontroller. Did you know microcontrollers are all around us? They can be found in automobiles, mobile phones, laptops, and more! As students progress through the course, they'll learn about microcontrollers as they create a variety of projects while reinforcing coding concepts in the challenge activities.

Students will likely encounter a situation where their micro:bit does not work as expected, so they'll need to troubleshoot. The problem could be caused by human error (e.g., incorrect syntax, forgetting to attach the USB) or the device (e.g., the firmware isn't updated).

By the end of this lesson, students will become familiar with using their micro:bit as they complete a text scrolling and counter project. Note: Answers to all challenge solutions and quiz questions are located below the "Standards" section of this teacher guide.

New Code

  • display.scroll() : This is a display function that allows the user to scroll text on the micro:bit.
  • button_a.was_pressed() : This is a button function that returns True when button A is pressed on the micro:bit.
  • button_b.was_pressed() : This is a button function that returns True when button B is pressed on the micro:bit.


  • micro:bit : A small computer that can run MicroPython commands
  • MicroPython: A version of Python that's designed to run on tiny computers, such as the micro:bit.
  • Booleans: Values that can only be True or False.
  • Loop: A loop is used to repeat one or more commands over and over


Students will...

  • Demonstrate how to program and download code onto the micro:bit
  • Apply coding concepts to complete the challenge activities
  • Create a text scrolling and counter project using the micro:bit


  • micro:bit device (recommended 1 per student)
  • USB cord
  • Computers, laptops, or Chromebooks (1 per student) with student account access to

Warm-Up (5 minutes)

Tell students that they're going to learn how to program their micro:bit today using Tynker! Prepare students for today's lesson by helping them understand how to program their micro:bit. For example:

  • Step 1: Use Tynker's Text Code Editor to write your code
  • Step 2: Attach your USB to the computer and the micro:bit
  • Step 3: Click Deploy, then select the device you're using
  • Step 4: Test your micro:bit to make sure your code transferred correctly

Activities (45 minutes)

Facilitate as students complete all Introduction modules on their own:
1. What Is a micro:bit? (Document)

  • Students will read a short document that introduces micro:bit and the MicroPython 101 course. Here's what the micro:bit looks like:

  • Emphasize to students that they’ll need to read each module carefully so they can apply concepts from the lesson to program their micro:bit correctly and answer a multiple-choice quiz.
  • Point out the different features of the micro:bit: accelerometer, thermometer, compass, light sensor, and radio. Explain to students that they'll explore these features and more in the upcoming modules.
  • Tell students to click the Next button (located at the bottom of the document) to move on to the next module.

2. What is MicroPython? (Example)

  • In this module, students will learn about MicroPython, a version of Python that can be used to run on micro:bits. Additionally, they'll learn how to deploy code to the micro:bit.
  • Explain to students that the purple image of a micro:bit indicates an activity that requires using the Tynker Code Editor and deploying code. Here's what the purple circuit icon looks like:

  • Are students struggling to deploy their code?
    • Read the "Deploy Code" instructions carefully
    • Make sure the USB cable is properly attaching the micro:bit to the computer
    • Ask them to click the Deploy button in the code editor
    • Check that they're connecting the micro:bit to the correct device (e.g., BBC micro:bit CMSIS-DAP, TDAP-Link, LPC1768)
    • Update the micro:bit's firmware. Here's a link with helpful instructions:

3. Hello, World! (DIY)

  • Students will learn how to write their first program using MicroPython and the display.scroll() function.
  • Tell students that the display.scroll() function allows them to display text on their micro:bit.
  • Coding Challenge: Change the Display
    • To solve this challenge, students need to change the word "Tynker" to "Hello, World!". Note: Answers to all challenge solutions are located below the "Standards" section of this teacher guide.
    • Remind students to type their code inside Tynker's Code Editor. Then, they'll need to click the Deploy button:

    • Optional: Ask students, "What does the Deploy button do?" (Answer: The Deploy button downloads the code onto the micro:bit.)
    • If students finish early, ask them to change the text to a different word, such as their name or favorite color. Their code might look similar to this:

4. Scorekeeper (DIY)

  • Students will learn how to create a program that keeps track of a score using the A and B buttons on the micro:bit.
  • Point out to students that the A and B buttons on the micro:bit can be used to increase, decrease, or reset the count. Once students finish programming their micro:bit, they can see the count displayed on the micro:bit.
  • This page includes two challenges:
    • Coding Challenge: Creating a Variable- Tell students to create a variable called counter and make sure they assign it a value of 0. Next, they'll need to display the counter variable using the display.scroll() function.
    • Coding Challenge: Using the Buttons- To solve this challenge, students need to program the micro:bit's button A to increase the counter variable and button B to decrease the counter variable. Give a hint: Tell students that in Python, the += operator adds to the variable, whereas the -= operator subtracts from the variable.
  • Are students struggling with the "Taking It Further" activity?
    • Give a hint: Tell them to create an if statement using the button_a.was_pressed() and button_b.was_pressed() functions. Next, they'll need to reset the counter to 0. They'll also need to display the counter variable using the display.scroll() function.
    • The code for the bonus section might look similar to this:

5. Review (Document)

  • This page reviews the following:
    • How to import the micro:bit's module using from microbit import *
    • How to increase a variable's value by using the += operator
    • display.scroll(text, wait=False, loop=False): Check that students understand the different parameters. For example, the text parameter needs to be in quotations. Point out to students that display.scroll() can also include wait and loop parameters.
    • The button_a.was_pressed() function controls button A on the micro:bit.
    • The button_b.was_pressed() function controls button B on the micro:bit.
    • Applying two different loops: while True: and If...Else...

6. Quiz (Multiple-choice)

  • Inform students that they'll need to apply what they've learned and answer a multiple-choice quiz. Note: Quiz questions and answers are located below the "Standards" section of this teacher guide.

Extended Activities (10 minutes)

Lead a discussion with your students:

  • Who can name at least two different micro:bit parts you learned today? (Answer: input/output pins, button A, button B.)
  • What does the Deploy button do? (Answer: downloads your code onto the micro:bit.)
  • If you're micro:bit isn't working as expected, what should you do? (Answer: check your code's syntax, make sure the USB is attached properly, ask a neighbor or the teacher for help, make sure you're pairing your micro:bit correctly, update the firmware.)

U.S. Standards

  • CCSS-Math:MP.1
  • CCSS-ELA: 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
  • CSTA: 2-AP-11, 2-AP-13, 2-AP-15, 2-AP-17
  • CS CA: 6-8.AP.11, 6-8.AP.13, 6-8.AP.15, 6-8.AP.16, 6-8.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b

U.K. Standards

Key Stage 2 (Years 4-6)

  • Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts.
  • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs.
  • Understand computer networks, including the internet; how they can provide multiple services, such as the World Wide Web, and the opportunities they offer for communication and collaboration.
  • Use technology safely, respectfully and responsibly; recognise acceptable/unacceptable behaviour; identify a range of ways to report concerns about content and contact.

Key Stage 3 (Years 7-9)

  • Understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem.
  • Create, re-use, revise and re-purpose digital artefacts for a given audience, with attention to trustworthiness, design and usability.
  • Understand a range of ways to use technology safely, respectfully, responsibly and securely, including protecting their online identity and privacy; recognise inappropriate content, contact and conduct and know how to report concerns.

Class Presentations

These student-facing slide presentations help educators seamlessly run Tynker lessons in a virtual or physical classroom setting. Each lesson has its own set of slides that introduce the big ideas, suggest unplugged activities, and include a section for each activity module. While running lesson slides, you can switch back and forth between the activity, the slides, answer keys and other lesson materials.
A sample slide presentation is available for your review. Please log in to view all the class presentations available with your plan..
Lesson 1
33 Slides
Lesson 2
Emoji Maker
27 Slides
Lesson 3
Track and Field
28 Slides
Lesson 4
Prime Time
20 Slides
Lesson 5
Temperature Search
24 Slides
Lesson 6
Reflex Master
20 Slides
Lesson 7
Maze Madness
23 Slides
Lesson 8
High Rollers
25 Slides
Lesson 9
27 Slides
Lesson 10
Button Masher
23 Slides
Lesson 11
18 Slides
Lesson 12
Guess the Word
21 Slides
Lesson 13
Morse Code
24 Slides
Lesson 14
Treasure Hunt
20 Slides