Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

43-Microsofts Makecode Microbit PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33
At a glance
Powered by AI
The key takeaways are that the workshop introduces the micro:bit hardware and covers programming it using the MakeCode online editor using both block and JavaScript coding. It also discusses downloading programs to the micro:bit and exploring example projects and challenges.

The main programming languages and tools covered are the MakeCode online block-based editor, the MakeCode JavaScript editor, and MicroPython. The block editor allows visual programming while the JavaScript editor allows for text-based coding.

Some example projects mentioned that can be built include wrist cuffs, wallets/purses, light monsters, magic wands, and air guitars.

MakeCode

tinyurl.com/MicrobitWorkshop
Aloha

Douglas Kiang
Punahou School
www.kiang.net
@dkiang
Microsoft MakeCode
Just works always, everywhere
• Free web-based IDE
• Offline capabilities

Real skills
• Block to Text editor progression
• JavaScript, VS Code extension

Make CS fun and tangible


• Easy drag & drop deployment
• Simulator for quick iteration
MakeCode.com
Micro:bit Programming

MakeCode: Block-based

MakeCode: JavaScript

MicroPython

tinyurl.com/MicrobitWorkshop
Today

Overview of hardware

Download and run programs

Explore challenges

Q&A

tinyurl.com/MicrobitWorkshop
Example Projects

Magic Wands

Wrist Cuffs

Air Guitars

Wallet / Purse Light Monsters


micro:bit
hardware
http://microbit.org/hardware/
Micro:bit accessories Battery Pack & USB cable

Crocodile Clips

Headphones
Maker Kits
Start a Project
Start a New Project
Program an Animation
1. Open the Basic Toolbox drawer 3. Position them under the
2. Drag 2 of the Show LED blocks onto your Workspace Forever block to look like this:
Program an Animation
5. Notice your animation running in the
4. In the first Show LED block, click squares to Simulator
turn on lights to make a design

Smiley Face Heart

6. Try replacing the first Show LED block


with a Show Icon block

7. Experiment with
other Basic blocks
Download your program to the micro:bit
1. Plug in your micro:bit with USB cable

2. Click Download Button


3. Microsoft Edge: Select ‘Save As’ onto your
MICROBIT USB drive

4. Google Chrome: Find the file you


downloaded (microbit-Untitled.hex), and
copy your file over to the micro:bit drive
when it appears on your computer
Add Inputs 3. Drag a Show String block under the On
Button Pressed block in your program
1. Open the Input Toolbox drawer
2. Drag a On Button Pressed block onto your Workspace

4. Test your program in the Simulator by


clicking Button A

5. Try other inputs


JavaScript Editor
1. Click the JavaScript button at the top

1. Try typing in the following line of code:


Challenge 1
Fix Board Game Arrow
Download and Import project
at: https://
makecode.microbit.org/
_9Wf9ECM8tJer

Your goal: When you shake the Micro:bit, the arrow spins and
slows down until it lands on a random direction.

The starter code provided always lands on the same direction.


How can you fix it?
Challenge 2
Servo
What are the max and min values for rotation (pitch) on the X axis?
Challenge 3
Create Radio Simulation
Choose a different
number with a partner.
Challenge 4
Install Radio Simulation
Download and Install project
at: https://
makecode.microbit.org/
_5s12CX7XH983

Just drag the .hex file to your MICROBIT


volume. No need to Import it to the IDE! (Unless
you want to check out the JavaScript behind it.)
Mahalo

@dkiang
Slides, links, and resources: tinyurl.com/microbitworkshop
My web site: www.kiang.net

You might also like