microbit code

Have you ever wanted a pet? In this activity we’ll code a digital pet you can feed, walk and play with!

Download the activity sheets below to get started. This activity can be completed using a virtual Micro:Bit, or for a limited time Micro:Bit STEM kits are available to borrow from The Learning Space using your Canada Bay Libraries membership card.

Recommended for ages 8 years and up.

A Micro:Bit is a programmable pocket-sized computer with a LED display, sound, accelerometer, compass, and bluetooth built-in. It's great for learning how to code games, program tunes, and more!

Part 1 - The basics

An introduction to coding with Micro:Bit

Part 2 - Coding behavior

Let's code the pet to do something

Part 3 - Coding a mood

Let's give the pet feelings

Here's a copy of the final code: