Skip Navigation

micro:bit camera (Say Code!)

By Jen Perry and Krystal Laframboise 90 minutes
Level
Grade 7-8
Subjects
English Language Arts,
Mathematics
components
  • Programming
  • Technology and Society
Tools & Languages
Block-based,
micro:bit

Key Coding Concepts

  • Algorithms
  • Events
  • Loops
  • Sequences
  • Variables

Terminology

Algorithm

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

 

Events

When one act causes another to occur

 

Loops

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

 

Sequence

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

 

Variable

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.

Prerequisites

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

Technology

  • 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.

Icebreaker

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!”

Code-Along

  1. Go to makecode.microbit.org 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”

Activity

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

Reflection

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.

Coding

  • 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.

Math

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):

Science

Light science videos:

Art

Learners can design their own micro:bit camera case.

Best Party Games: Camera Game
http://www.bestpartygames.co.uk/games/camera-game#.Xoeu1dP0lBw

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=pR_AapxVudM

Micro:bit Educational Foundation - Pairing and Flashing in iOS
https://www.youtube.com/watch?v=2uFuW8kA_lw&feature=emb_title

Cytrontech - Take A Selfie Using Microbit As A Remote
https://www.youtube.com/watch?v=gV7aKbs2-wI

Element14.Com micro:bit tutorials
https://www.element14.com/community/community/stem-academy/microbit/blog/2016/06/09/10-bbc-microbit-projects-in-10-days-day-four-camera-time

How is Math Used in Photography?
https://www.pixobo.com/how-is-math-used-in-photography/

Using smartphone cameras to solve math problems: Microsoft's camera-based AI app solves your math problems
https://thenextweb.com/microsoft/2020/01/16/microsofts-camera-based-ai-app-solves-your-math-problems/

How do cameras work? (funkidslive.com)
https://www.funkidslive.com/learn/techno-mum/cameras/#

Simple Explanation of how a Camera Works
https://www.youtube.com/watch?v=BNA97LaWLF0&feature=youtu.be

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

r

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 ➝

    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.