0% found this document useful (0 votes)
24 views

Class 1

The document introduces the micro:bit, a microcontroller that functions like a small computer. It can code programs, display them on its 5x5 LED grid, and has sensors like buttons, accelerometer, temperature. The document outlines coding challenges to create animations and games using the micro:bit's inputs and outputs, such as displaying faces when buttons are pressed or animating a smiley face. It also introduces programming concepts like functions, input/output, and algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Class 1

The document introduces the micro:bit, a microcontroller that functions like a small computer. It can code programs, display them on its 5x5 LED grid, and has sensors like buttons, accelerometer, temperature. The document outlines coding challenges to create animations and games using the micro:bit's inputs and outputs, such as displaying faces when buttons are pressed or animating a smiley face. It also introduces programming concepts like functions, input/output, and algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Introduction to micro bit

What is a Micro bit?

A Micro bit is a micro controller (very small) that operates like a shrunk down computer. You
can create your own codes, download, and display them on it.
It’s FUN to use
What are the features?

Front side:
- 5*5 pixel grids (to display text or images)
- Button A
- Button B

Back side:
- Accelerometer
- Bluetooth
- Compass
- USB hub
- Temperature sensor
What will we do with it?

We will create codes for games, animations, and we will learn new
concepts and apply them.
Algorithms
What is Algorithm?

A process or set of rules to be followed in calculations or other


problem-solving operations, especially by a computer.
Process

input output
What is a function?

A relationship between two sets of values.

x F(x)= x+2
1
2
3
4
Let’s Code!
Let’s activate the buttons:

Sets button A on Sets button B on Sets both buttons A and B on


What are other types of input we can

You can choose between The accelerometer measure


P0, P1, or P2 the shake in the micro bit
and responds to it.
Challenge 1:

Can you display a


sad face
when button B is
pressed?
Animation

What is the difference between toggle and plot?

Toggle gives an animation to Plot will keep the pixels fixed


the pixels where they alternate. in the specified x y
coordinates.
Challenge 2:
Can you code a smiley face using the PLOT strips?
Challenge 3:
Can you animate it using toggle strips?
The Bright Heart

Let’s set the brightness to decrease when button A is pressed, and


to increase when button B is pressed:

Set button B to increase the brightness by 25


Challenge 5:
On start:
1- set the brightness to be 225.
2-Show a heart shape on the micro bit.
Challenge 6:
1- When buttons A and B pressed, clear the screen.
2-Show the value of brightness on the micro bit.
3- Show the heart on the micro bit.

You might also like