100% found this document useful (1 vote)
835 views33 pages

43-Microsofts Makecode Microbit PDF

This document provides an overview of the Microsoft MakeCode platform for programming micro:bit devices. It discusses how MakeCode provides both a block-based and JavaScript editor and allows for free coding in the browser or offline. Example projects are shown that can be built like animations, games incorporating buttons and sensors. Challenges are presented for fixing sample code and creating a radio simulation project. Attendees are guided on how to download programs to the micro:bit and install project files. In the end, resources are shared for continuing exploration.

Uploaded by

Alejandro Angel
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
100% found this document useful (1 vote)
835 views33 pages

43-Microsofts Makecode Microbit PDF

This document provides an overview of the Microsoft MakeCode platform for programming micro:bit devices. It discusses how MakeCode provides both a block-based and JavaScript editor and allows for free coding in the browser or offline. Example projects are shown that can be built like animations, games incorporating buttons and sensors. Challenges are presented for fixing sample code and creating a radio simulation project. Attendees are guided on how to download programs to the micro:bit and install project files. In the end, resources are shared for continuing exploration.

Uploaded by

Alejandro Angel
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/ 33

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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy