micro:bit Microsoft Make Code (We use Python in here to code our Micro:bits!) REQUIRED
❤️Flashing Heart
(display)
REQUIRED
Connect your micro:bit to your computer using a USB-C cable that goes from the micro:bit to the computer port.
Select <Next>.
Press the [Pair button] on the bottom right of micro:bit's instructions.
A window will appear, select your connected micro:bit device. Now click <Pair>.
When it finishes pairing, the program should hook up to your micro:bit automatically.
If an error occurs, make sure the micro:bit is plugged into your computer via USB.
If errors continue, restart your computer or follow any more specific directions micro:bit may give you.
You can also try to drag your program ONTO the micro:bit icon (like we used to drag STL files into the BARBERTECHNOLOGY FOLDER).
😀 Smiley Buttons (Input)
REQUIRED
Name Tag
(controlling the display)
Micro Chat
(Radio Transmission)
THIS ONE IS REALLY COOL! YOU HAVE TO PAIR UP TO TRY IT!!!
micro:bit Microsoft Make Code (We use Python in here to code our Micro:bits!) REQUIRED
🎲 Dice
(If/Then/Else Loops)
REQUIRED
Hot Potato
(making random integers)
Coin Flip
(using random integers)
Tails is a Box 📦 & Heads is a skull 💀
Rock/Paper/Scissors
(If/Then/Else Loops)
Snap the Dot
(trying to press A when the middle lights up)
🚶➡️Step Counter
(Conditional Loops)
REQUIRED, BUT THE WHOLE CLASS HAS TO DO IT TOGETHER!
We need to measure your steps. We will measure 5 of them and enter your distance in my Spreadsheet in inches.
We are going to tape your step counter to one of your legs. It will need to count 2 for every step by this leg because you're not counting the other leg, right? (The alternative is to hold and shake your micro:bit for every step you take, and then it will need to count only one step per shake)
We are going to walk the bus loop, which I'm told is 1/8 of a mile. We are going to test the accuracy of your step counter!
This is where it gets REALLY weird!!
Step Counter (Conditional Loops) - Blocks is the only Tutorial available. Austin P made a tutorial, or you can use the steps to the right =>
Go to micro:bit. https://makecode.microbit.org/#
Create a new project named "Step Counter."
Set the Language to Python.
Delete all of the current lines of code.
First, add a new variable that will control the Steps. To do this type: Steps = 0 in line 1, then press <Enter>.
Next type in line 2: input.on_gesture(Gesture.SHAKE, on_gesture_shake), then press <Enter>.
This should automatically create a function titled on_gesture_shake. If it doesn't, you will need to type in def on_gesture_shake():
Delete "Pass" in line 3.
Make sure that the first line of the function is indented.
Type: "global Steps" to grab the variable, then press <Enter>.
Go to the next line and type: Steps += 2, then press Enter. This will make sure your Steps are added for BOTH feet every time you step with one.
Then type in the next line type: basic.show_number(Steps), then press <Enter>.
Your Final Code should look like this:
Steps = 0
def on_gesture_shake():
global Steps
Steps += 2
basic.show_number(Steps)
input.on_gesture(Gesture.SHAKE, on_gesture_shake)
Got to the three dots next to the <Download Button> to open the download options.
Click <Connect Device> listed first on the download options.
A list of directions will be presented on the screen giving you directions on how to pair the micro:bit to your computer. The steps below can also help you with the pairing process:
Connect your micro:bit to your computer using a USB-C cable that goes from the micro:bit to the computer port.
Select <Next>.
Press the [Pair button] on the bottom right of micro:bit's instructions.
A window will appear, select your connected micro:bit device. Now click <Pair>.
When it finishes pairing, the program should hook up to your micro:bit automatically.
If an error occurs, make sure the micro:bit is plugged into your computer via USB.
You can also try to drag your program ONTO the micro:bit icon (like we used to drag STL files into the BARBERTECHNOLOGY FOLDER).
If errors continue, restart your computer or follow any more specific directions micro:bit may give you.
You should be able to test your STEP COUNTER now. See if it works! See if the reset button on the back makes it go back to zero!
Try to tape it in a way that you can reset if you want to, but it doesn't reset while you are walking!
micro:bit Microsoft Make Code (We use Python in here to code our Micro:bits!) REQUIRED:
Multi Dice- Blocks is the only Tutorial available. How can we make this a useful lesson? What other tutorials can ease us into Python that I can add below?
Multi-Dice
Tug-Of-LED is a two person game that you can code with Python
Tug of LED
THIS ONE IS REALLY COOL! YOU HAVE TO PAIR UP TO TRY IT!!!