Skip Navigation

micro:bit camera (Say Code!)

By Jen Perry and Krystal Laframboise 90 minutes
Grade 7-8
English Language Arts,
  • Programming
  • Technology and Society
Tools & Languages

Key Coding Concepts

  • Algorithms
  • Events
  • Loops
  • Sequences
  • Variables



A set of step-by-step instructions to follow in order to solve a problem



When one act causes another to occur



Running the same sequence multiple times i.e. repeat or forever blocks



An ordered series of steps for a task; computers read and perform tasks in order from top to bottom



A placeholder for a piece of information that can change

In this beginner project, learners will explore micro:bit’s camera function to take a timed photo.


  • The educator should have some knowledge of micro:bit.
  • Learners should have some previous experiences with coding (Scratch or Blockly).


  • micro:bit (one per learner)
  • iPad with ‘micro:bit app’ installed (one per learner)
  • Camera with self-timer

Before the lesson...

This lesson is based on Element14.Com micro:bit tutorials.


Ask the learners to sit in a circle.

Say: “For this icebreaker, we are going to play a modified game of hot potato using a camera. To play this game, we will pass the camera around the circle. When you have the camera, you hold it as if you were about to take a selfie! Don’t forget to make a silly face! I will be setting a self-timer on the camera and if it goes off during your “selfie” time, you are out! We will continue until one person remains: the selfie champion!”

Set the self-timer on your camera to initiate the game.

After the game and depending on comfort levels, share the photos with your group for a good laugh!

Say: “Today, we are going to use code to turn our micro:bits into cameras with timers, just like the one we used in our icebreaker!”


  1. Go to and select ‘New Project’.
  2. Point out the main elements: micro:bit simulator, block categories, blocks, block area, etc.
  3. Give learners a few minutes to explore the editor.
  4. Go through 1-2 challenges with the group, where learners are asked to try to make their micro:bit simulator do something. For example, “Try to display a smiley face on the LEDs forever” or “Try to make the micro:bit simulator play a song when a button is pressed”


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. Adding a countdown/timer
  2. Adding the ‘Device’ extension
  3. Taking a photo


Have learners Think-Pair-Share the following questions:

  • How did we use [coding concept] in our project?
  • What is one thing you liked about this lesson? Why?
  • What is one thing that challenged you in this lesson? Why?
  • What is one thing you learned? How will you use this knowledge in the future?

Learning Outcomes

I can create algorithms using the MakeCode editor
I can use events to control when things happen in my project
I can use variables to store information about my project
I can use loops to make things happen more than once
I can order blocks of code to make things happen in a specific sequence
I can interact with my camera

Assessment Ideas

Have learners write simple instructions on how to program a micro:bit. Assess their ability to recall events, sequence activities/steps, check for grammar and spelling.


  • Ask learners to explore the camera function. What else can they do with this function?
  • Given that they now know how to code a countdown, have learners consider what other projects they could build that incorporate a countdown function.


Make connections to math and photography/smartphone technology (*Note: these articles may be a bit advanced from younger students but they will promote class discussion):


Light science videos:


Learners can design their own micro:bit camera case.

Best Party Games: Camera Game

MakeCode Reference Guide:

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

micro:bit Tutorial Series Part 1: Getting Started

Micro:bit Educational Foundation - Pairing and Flashing in iOS

Cytrontech - Take A Selfie Using Microbit As A Remote

Element14.Com micro:bit tutorials

How is Math Used in Photography?

Using smartphone cameras to solve math problems: Microsoft's camera-based AI app solves your math problems

How do cameras work? (

Simple Explanation of how a Camera Works

Teach lessons that are tied to your existing curriculum!


More Lesson Plans For Grade 7-8

    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 ➝


    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.


    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.


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