0% found this document useful (0 votes)
19 views3 pages

Microbit Snippits and Cheat Sheet

The micro:bit Python get started guide provides an overview of using various features such as buttons, display options, sensors, and music playback. It includes examples of changing display images, playing tunes, and utilizing sensors like the accelerometer and temperature sensor. Additionally, it covers programming concepts like loops and arrays to enhance functionality in projects.

Uploaded by

Rym Abid
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)
19 views3 pages

Microbit Snippits and Cheat Sheet

The micro:bit Python get started guide provides an overview of using various features such as buttons, display options, sensors, and music playback. It includes examples of changing display images, playing tunes, and utilizing sensors like the accelerometer and temperature sensor. Additionally, it covers programming concepts like loops and arrays to enhance functionality in projects.

Uploaded by

Rym Abid
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/ 3

micro:bit Python get started guide

https://python.microbit.org/
A and B buttons

Using * will import everything within the library

Display a smiley face

Change HAPPY to:

HEART HEART_SMALL HAPPY SMILE SAD CONFUSED ANGRY

ASLEEP SURPRISED SILLY FABULOUS MEH YES NO

CLOCK12 CLOCK11 CLOCK10 CLOCK9 CLOCK8 CLOCK7 CLOCK6

CLOCK5 CLOCK4 CLOCK3 CLOCK2 CLOCK1 ARROW_N ARROW_NE

ARROW_E ARROW_SE ARROW_S ARROW_SW ARROW_W ARROW_NW TRIANGLE

TRIANGLE_LEFT CHESSBOARD DIAMOND DIAMOND_SMALL SQUARE SQUARE_SMALL RABBIT

COW MUSIC_CROTCHET MUSIC_QUAVER MUSIC_QUAVERS PITCHFORK XMAS PACMAN

TARGET TSHIRT ROLLERSKATE DUCK HOUSE TORTOISE BUTTERFLY

STICKFIGURE GHOST SWORD GIRAFFE SKULL UMBRELLA SNAKE

Accelerometer
Light sensor up, down, left, right, face up, face down, freefall, 3g, 6g, 8g, shake.

Compass heading
input sensor for measuring magnetic fields
Temperature sensor

www.computing4schools.com
Pam Jones 1
micro:bit Python get started guide
https://python.microbit.org/
Sleep = delay in milliseconds

Import music and play a tune - V2 or speaker connection

Change NYAN to:

DADADADUM ENTERTAINER PRELUDE ODE NYAN RINGTONE FUNK

BLUES BIRTHDAY WEDDING FUNERAL PUNCHLINE PYTHON BADDY

CHASE BA_DING WAWAWAWAA JUMP_UP JUMP_DOWN POWER_UP POWER_DOWN

LED Brightness
LED Coordinates 0 = off and 9 = brightest

Top left X = 0, Y = 0
Middle X = 2, Y = 2
Bottom right X = 4, Y = 4

Speaker
audio.play(Sound.HAPPY) V2
Change HAPPY to: HELLO MYSTERIOUS

SAD SLIDE SOARING SPRING

TWINKLE YAWN GIGGLE HAPPY

Microphone
V2

Using random numbers


Using strings - scrolling text

www.computing4schools.com
Pam Jones 2
micro:bit Python get started guide
https://python.microbit.org/
Speech

Radio: communicate between 2 micro:bits

Music notes

For loop

For loop and nested selection

Speech and for loop

Array and for loop

Array, for loop and music

micro:bit classroom

https://classroom.microbit.org/

www.computing4schools.com
Pam Jones 3

You might also like