Merge branch 'master' of https://github.com/Microsoft/pxt-microbit
This commit is contained in:
commit
f5f36d9cca
@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "koduj z micro:bit",
|
||||
"title": "koduj z micro:bit",
|
||||
"docMenu": [
|
||||
{
|
||||
"name": "O nas",
|
||||
"path": "/about"
|
||||
},
|
||||
{
|
||||
"name": "Lekcje",
|
||||
"path": "/lessons"
|
||||
},
|
||||
{
|
||||
"name": "Instrukcja obsługi",
|
||||
"path": "/reference"
|
||||
},
|
||||
{
|
||||
"name": "Urządzenie",
|
||||
"path": "/device"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
# Dokumentacja
|
||||
|
||||
Witamy na stronach dokumentacji!
|
||||
|
||||
* Przeglądnij [instrukcje obsługi](/reference)
|
||||
* Dowiedz się więcej o [urządzeniu](/device)
|
||||
* Wystartuj z [lekcjami](/lessons)
|
@ -28,4 +28,4 @@
|
||||
|
||||
* [Command Line Interface](/cli)
|
||||
* Learn about [packages](/packages)
|
||||
* [Release notes](/release-notes)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Getting started
|
||||
|
||||
### @description An activity for beginners to get started with the micro:bit
|
||||
### @description An activity for beginners to get started with the @boardname@
|
||||
|
||||
## ~avatar
|
||||
|
||||
|
@ -37,7 +37,7 @@ You can find the letter `B` by clicking the letter `A` on the
|
||||
|
||||
#### ~
|
||||
|
||||
Click **Download** to move your program to the BBC @boardname@!
|
||||
Click **Download** to move your program to the @boardname@!
|
||||
|
||||
#### Your turn!
|
||||
|
||||
@ -48,9 +48,9 @@ name_ instead of **BANANA** when you press `B`?
|
||||
### Pins
|
||||
|
||||
You can also use the pins as buttons. (The pins are the holes in the
|
||||
metal stripe at the bottom of the micro:bit board.) For example, hold
|
||||
metal stripe at the bottom of the @boardname@ board.) For example, hold
|
||||
the ``GND`` button with one hand and touch the ``0`` pin (called
|
||||
``P0``) with your other hand to tell the micro:bit you're pressing it.
|
||||
``P0``) with your other hand to tell the @boardname@ you're pressing it.
|
||||
|
||||
Unscramble the blocks in the editor to show a heart when you touch
|
||||
pin ``P0``.
|
||||
|
@ -50,7 +50,7 @@ input.onButtonPressed(Button.AB, () => {
|
||||
```
|
||||
|
||||
These blocks mean that if you press button `A`, you will add `1` to
|
||||
your score, and if you press `A` and `B` together, the micro:bit will
|
||||
your score, and if you press `A` and `B` together, the @boardname@ will
|
||||
show your score.
|
||||
|
||||
When you're done, your coin flipping program should look like this:
|
||||
|
@ -3,7 +3,7 @@
|
||||
### ~avatar avatar
|
||||
|
||||
Build a Rock Paper Scissors game with the @boardname@! You can play
|
||||
the game with a friend who has it on a micro:bit. You can also play
|
||||
the game with a friend who has it on a @boardname@. You can also play
|
||||
it with friends who are just using their hands. (The game is built
|
||||
like a coin flipper, but with three choices instead of two.)
|
||||
|
||||
@ -11,9 +11,9 @@ like a coin flipper, but with three choices instead of two.)
|
||||
|
||||
## Step 1: Getting started
|
||||
|
||||
We want the micro:bit to choose rock, paper, or scissors when you
|
||||
We want the @boardname@ to choose rock, paper, or scissors when you
|
||||
shake it. Try creating an ``on shake`` block so when you shake the
|
||||
micro:bit, it will run part of a program.
|
||||
@boardname@, it will run part of a program.
|
||||
|
||||
Clear up the blocks and add the blocks below.
|
||||
|
||||
@ -23,7 +23,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Next, when you shake the micro:bit, it should pick a random number from `0` to `2`
|
||||
Next, when you shake the @boardname@, it should pick a random number from `0` to `2`
|
||||
and store it in the variable `item`.
|
||||
|
||||
Add a ``set`` block with a variable. Then add a ``pick random`` block,
|
||||
@ -75,7 +75,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
## Step 3: A random rock
|
||||
|
||||
Now we are going to add a new picture for the micro:bit to show
|
||||
Now we are going to add a new picture for the @boardname@ to show
|
||||
when another random number comes up.
|
||||
|
||||
Make the ``else if`` part check if the variable `item` is `1`.
|
||||
@ -160,7 +160,7 @@ Have fun!
|
||||
|
||||
Here is a way you can make your Rock Paper Scissors game better.
|
||||
When button ``A`` is pressed,
|
||||
the micro:bit will add `1` to your score.
|
||||
the @boardname@ will add `1` to your score.
|
||||
|
||||
Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program,
|
||||
like this:
|
||||
@ -174,7 +174,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 6: Prove you're the greatest!
|
||||
|
||||
After your micro:bit can add `1` to the score, show how many wins you have.
|
||||
After your @boardname@ can add `1` to the score, show how many wins you have.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@ -185,7 +185,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
```
|
||||
## Step 7: Staying honest
|
||||
|
||||
Success! Your micro:bit can track wins!
|
||||
Success! Your @boardname@ can track wins!
|
||||
But what about losses?
|
||||
Use the ``Game`` drawer to subtract `1` from your score when you press button `B`.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
There are 25 bright LEDs on the micro:bit screen. Let's use them to create some cool animations!
|
||||
There are 25 bright LEDs on the @boardname@ screen. Let's use them to create some cool animations!
|
||||
|
||||
### ~
|
||||
|
||||
@ -12,7 +12,7 @@ Draw an unhappy face instead of the blank screen. Click on the dots
|
||||
in the second ``show leds`` block until it matches the blocks below.
|
||||
Now you have an **animation** (cartoon) that shows a happy face,
|
||||
then an unhappy one, then a happy one again, forever (or until
|
||||
you turn off your micro:bit)!
|
||||
you turn off your @boardname@)!
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Shake
|
||||
|
||||
You can find when someone is shaking the @boardname@ by checking its
|
||||
**accelerometer** (it finds whether the micro:bit is speeding up or
|
||||
**accelerometer** (it finds whether the @boardname@ is speeding up or
|
||||
slowing down).
|
||||
|
||||
Unscramble these blocks in the editor to show a frownie when someone
|
||||
shakes the micro:bit. (Ouch!)
|
||||
shakes the @boardname@. (Ouch!)
|
||||
|
||||
```shuffle
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
|
@ -1,6 +1,7 @@
|
||||
# JavaScript
|
||||
|
||||
Visit the cards below to starting programming JavaScript and TypeScript with the micro:bit:
|
||||
Visit the cards below to starting programming JavaScript
|
||||
with the @boardname@:
|
||||
|
||||
```codecard
|
||||
[{
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Call a function
|
||||
|
||||
The simplest way to get started in JavaScript with your micro:bit is to
|
||||
call one of the micro:bit's built-in JavaScript functions. Just like Blocks
|
||||
are organized into categories/drawers, the micro:bit functions are organized by
|
||||
The simplest way to get started in JavaScript with your @boardname@ is to
|
||||
call one of the @boardname@'s built-in JavaScript functions. Just like Blocks
|
||||
are organized into categories/drawers, the @boardname@ functions are organized by
|
||||
namespaces, with names corresponding to the drawer names. The `basic` namespace
|
||||
contains a number of helpful functions, such as:
|
||||
|
||||
|
@ -35,7 +35,7 @@ This calls into the constructor we defined earlier, creating a new object with t
|
||||
# Inheritance
|
||||
|
||||
### ~hint
|
||||
### Inheritance is not supported yet for the micro:bit. Coming soon...
|
||||
### Inheritance is not supported yet for the @boardname@. Coming soon...
|
||||
### ~
|
||||
|
||||
In TypeScript, we can use common object-oriented patterns.
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Frequently asked questions
|
||||
|
||||
# What is the language supported for the micro:bit?
|
||||
# What is the language supported for the @boardname@?
|
||||
|
||||
For the micro:bit, we support a "static" subset of TypeScript (itself a superset of JavaScript):
|
||||
For the @boardname@, we support a "static" subset of TypeScript (itself a superset of JavaScript):
|
||||
|
||||
## Supported language features
|
||||
|
||||
|
@ -13,7 +13,7 @@ basic.showNumber(add(1, 2))
|
||||
```
|
||||
|
||||
### ~ hint
|
||||
For the micro:bit, you must specify a [type](/js/types) for each function parameter.
|
||||
For the @boardname@, you must specify a [type](/js/types) for each function parameter.
|
||||
### ~
|
||||
|
||||
Functions can refer to variables outside of the function body.
|
||||
|
@ -1,9 +1,9 @@
|
||||
## Operators
|
||||
|
||||
The following JavaScript operators are supported for the micro:bit.
|
||||
The following JavaScript operators are supported for the @boardname@.
|
||||
|
||||
### ~hint
|
||||
Note that for the micro:bit all arithmetic is performed on integers, rather than floating point.
|
||||
Note that for the @boardname@ all arithmetic is performed on integers, rather than floating point.
|
||||
This also is true when simulating in the browser.
|
||||
### ~
|
||||
|
||||
|
@ -48,7 +48,7 @@ basic.showNumber(1);
|
||||
|
||||
|
||||
### ~hint
|
||||
For the micro:bit, we don't allow a program to contain an empty statement, such as shown above.
|
||||
For the @boardname@, we don't allow a program to contain an empty statement, such as shown above.
|
||||
If you really want an empty statement, you need to use curly braces to delimit an empty statement block:
|
||||
```typescript
|
||||
while(true) { }
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Statements
|
||||
|
||||
The following JavaScript statements are supported for the micro:bit:
|
||||
The following JavaScript statements are supported for the @boardname@:
|
||||
|
||||
## Variable declarations
|
||||
* `const` statement - [read more](http://devdocs.io/javascript/statements/const)
|
||||
|
@ -15,7 +15,7 @@ let isDone: boolean = false;
|
||||
|
||||
### ~ hint
|
||||
In JavaScript, `numbers` are floating point values.
|
||||
However, for the micro:bit, `numbers` are integer values.
|
||||
However, for the @boardname@, `numbers` are integer values.
|
||||
### ~
|
||||
|
||||
Integer values can be specified via decimal, hexadecimal and octal notation:
|
||||
@ -74,7 +74,7 @@ let list: Array<number> = [1, 2, 3];
|
||||
```
|
||||
|
||||
### ~hint
|
||||
For the micro:bit, all elements of an array must have the same type.
|
||||
For the @boardname@, all elements of an array must have the same type.
|
||||
### ~
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ let c: Color = Color.Green;
|
||||
|
||||
# Any
|
||||
|
||||
The TypeScript type `any` is not supported in the micro:bit.
|
||||
The TypeScript type `any` is not supported in the @boardname@.
|
||||
|
||||
|
||||
# Void
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks activity
|
||||
|
||||
Learn to create an answering machine on the micro:bit
|
||||
Learn to create an answering machine on the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
|
@ -12,7 +12,7 @@ basic.showString("ASK ME A QUESTION")
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now we need to reply after someone asks micro:bit a yes or no question. We want to respond `YES` when button `A` is pressed. Add a condition for button `A` and inside it show the string `YES`.
|
||||
Now we need to reply after someone asks @boardname@ a yes or no question. We want to respond `YES` when button `A` is pressed. Add a condition for button `A` and inside it show the string `YES`.
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
@ -25,7 +25,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 2
|
||||
|
||||
What if micro:bit's answer to the question is no? Let's have `NO` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the string `NO`.
|
||||
What if @boardname@'s answer to the question is no? Let's have `NO` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the string `NO`.
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks quiz answers
|
||||
|
||||
Create an answering machine on the micro:bit.
|
||||
Create an answering machine on the @boardname@.
|
||||
|
||||
This is the answer key for the [answering machine quiz](/lessons/answering-machine/quiz).
|
||||
|
||||
@ -26,7 +26,7 @@ basic.showString("Hi")
|
||||
![](/static/mb/lessons/answering-machine-1.png)
|
||||
|
||||
|
||||
## 4. If the rectangle below represents the micro:bit, write the code to display the letter "Z".
|
||||
## 4. If the rectangle below represents the @boardname@, write the code to display the letter "Z".
|
||||
|
||||
![](/static/mb/lessons/answering-machine-2.png)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# answering machine blocks quiz
|
||||
|
||||
Create an answering machine on the micro:bit.
|
||||
Create an answering machine on the @boardname@.
|
||||
|
||||
## Name
|
||||
|
||||
@ -36,7 +36,7 @@ basic.showString("Hi")
|
||||
|
||||
![](/static/mb/lessons/answering-machine-4.png)
|
||||
|
||||
## 4. If the rectangle below represents the micro:bit, write the code to display the letter "Z".
|
||||
## 4. If the rectangle below represents the @boardname@, write the code to display the letter "Z".
|
||||
|
||||
```blocks
|
||||
basic.showString("Z")
|
||||
|
@ -31,6 +31,6 @@ basic.pause(100)
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to display an image on the micro:bit's LED screen
|
||||
* learn how to display an image on the @boardname@'s LED screen
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
||||
|
@ -18,7 +18,7 @@ basic.showLeds(`
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now show an new image that will display on the micro:bit.
|
||||
Now show an new image that will display on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -1,6 +1,6 @@
|
||||
# charting lesson
|
||||
|
||||
Create a charting app for simulating and measuring the acceleration applied to the micro:bit
|
||||
Create a charting app for simulating and measuring the acceleration applied to the @boardname@
|
||||
|
||||
## Topic
|
||||
|
||||
@ -32,5 +32,5 @@ radio.sendNumber(0)
|
||||
* learn how to get the acceleration value (g-force), in one of three specified dimensions
|
||||
* learn how to display a vertical bar graph based on the value and high value.
|
||||
* learn how to register code to run when a packet is received over radio
|
||||
* learn how to broadcast a number data packet to other micro:bits connected via radio
|
||||
* learn how to broadcast a number data packet to other @boardname@s connected via radio
|
||||
* learn how to read the next radio packet as a number data packet
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Activity
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the acceleration in the "x" direction. Let's get started!
|
||||
Welcome! This activity will teach how to use the @boardname@ to chart the acceleration in the "x" direction. Let's get started!
|
||||
|
||||
|
||||
### ~
|
||||
@ -16,7 +16,7 @@ input.acceleration(Dimension.X)
|
||||
```
|
||||
|
||||
### ~
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the @boardname@ in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -26,27 +26,27 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
### ~
|
||||
Notice that moving the micro:bit in the simulator from left to right (x direction) changes the values beneath the micro:bit in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the micro:bit from left to right, you can observe changing values beneath the micro:bit simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit simulator in the x direction. The line underneath the micro:bit simulator reflect the acceleration in the x direction.
|
||||
Notice that moving the @boardname@ in the simulator from left to right (x direction) changes the values beneath the @boardname@ in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the @boardname@ from left to right, you can observe changing values beneath the @boardname@ simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the @boardname@ simulator in the x direction. The line underneath the @boardname@ simulator reflect the acceleration in the x direction.
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bit is yellow. So the color of the data line reflects the color of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@ is yellow. So the color of the data line reflects the color of the @boardname@
|
||||
|
||||
![](/static/mb/data4.png)
|
||||
|
||||
### ~
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
Vigorously move the @boardname@ in the @boardname@ simulatator by moving the @boardname@ image from side to side. Every time the @boardname@ moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the @boardname@ from side to side, the more data being saved in Excel. After you have vigarously moved the @boardname@ simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
### ~
|
||||
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the @boardname@ in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the micro:bit
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the @boardname@
|
||||
|
||||
![](/static/mb/data7.png)
|
||||
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit.
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@.
|
||||
Let's get started!
|
||||
|
||||
### ~
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other micro:bits connected via radio.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other @boardname@s connected via radio.
|
||||
|
||||
```blocks
|
||||
radio.sendNumber(input.acceleration(Dimension.X));
|
||||
@ -33,7 +33,7 @@ radio.onDataPacketReceived(() => {
|
||||
})
|
||||
```
|
||||
### ~
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st micro:bit, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the micro:bit's acceleration in the "x" direction.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st @boardname@, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the @boardname@'s acceleration in the "x" direction.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -45,15 +45,15 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
|
||||
```
|
||||
### ~
|
||||
Notice that moving the micro:bit the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd micro:bit. There is a single LED turned on with the 1st micro:bit. Additionally, the graphs will reflect 0 acceleation for the 1st micro:bit. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
Notice that moving the @boardname@ the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd @boardname@. There is a single LED turned on with the 1st @boardname@. Additionally, the graphs will reflect 0 acceleation for the 1st @boardname@. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
|
||||
![](/static/mb/acc.png)
|
||||
|
||||
### ~
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bits are blue and green. So the colors of the line graphs reflect the colors of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@s are blue and green. So the colors of the line graphs reflect the colors of the @boardname@
|
||||
|
||||
### ~
|
||||
After running this simulation several seconds by moving the micro:bit side to side in the x direction, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
After running this simulation several seconds by moving the @boardname@ side to side in the x direction, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
|
||||
![](/static/mb/acc2.png)
|
||||
|
||||
@ -81,10 +81,10 @@ Use the Recommended Charts command on the Insert tab to quickly create a chart t
|
||||
### ~
|
||||
Have fun reviewing your simulation and analyze the acceleration by chart the Excel data using Excel.
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* Review and analyze the actual micro:bit device acceleration data on Excel
|
||||
* Connect the first @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the @boardname@ in the "x" direction while the other player charts the data on the @boardname@!
|
||||
* Review and analyze the actual @boardname@ device acceleration data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
|
||||
```package
|
||||
|
@ -1,6 +1,6 @@
|
||||
# charting quiz answers
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
|
||||
## Name
|
||||
@ -25,7 +25,7 @@ We are creating a forever loop to constantly display the appropriate brightness
|
||||
led.plotBarGraph(input.acceleration(Dimension.X), 0)
|
||||
```
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
## 3. After vigarously moving the @boardname@ from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# charting quiz
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
## Name
|
||||
|
||||
@ -18,6 +18,6 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br/>
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
## 3. After vigarously moving the @boardname@ from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# compass activity
|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the micro:bit is pointing. Let's get started!
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the @boardname@ is pointing. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -17,7 +17,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
Store the reading of the micro:bit in a variable called `degrees`.
|
||||
Store the reading of the @boardname@ in a variable called `degrees`.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -25,7 +25,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -36,7 +36,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E` on the micro:bit.
|
||||
If `degrees` is less than 135, the @boardname@ is mostly pointing East. Display `E` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -51,7 +51,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `S` on the micro:bit.
|
||||
If `degrees` is less than 225, the @boardname@ is mostly pointing South. Display `S` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -70,7 +70,7 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
|
||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||
If none of these conditions returned true, then the @boardname@ must be pointing West. Display `W` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# compass challenges
|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
## Before we get started
|
||||
|
||||
|
@ -12,7 +12,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
## 1. What is the purpose of the 'compass heading' block?
|
||||
|
||||
Gets the compass heading of the micro:bit in degrees
|
||||
Gets the compass heading of the @boardname@ in degrees
|
||||
|
||||
|
||||
## 2. Write the code that stores the compass heading into a local variable called 'degrees'.
|
||||
@ -22,7 +22,7 @@ Gets the compass heading of the micro:bit in degrees
|
||||
let degrees = input.compassHeading()
|
||||
```
|
||||
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the micro:bit
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
@ -32,7 +32,7 @@ if (degrees < 45) {
|
||||
}
|
||||
```
|
||||
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
@ -42,7 +42,7 @@ if (degrees < 135) {
|
||||
}
|
||||
```
|
||||
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -15,12 +15,12 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
## 2. Write the code that stores the compass heading into a local variable called 'degrees'.
|
||||
|
||||
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the micro:bit
|
||||
## 3. Write the 'If statement' that will check if the device is mostly pointing North. Display 'N' on the @boardname@
|
||||
|
||||
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the micro:bit
|
||||
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the @boardname@
|
||||
|
||||
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the micro:bit
|
||||
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the @boardname@
|
||||
|
||||
|
||||
|
@ -33,5 +33,5 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Now let's try to reset the counter when the micro:bit is shaken. You will need to register an event handler with `on shake`.
|
||||
Now let's try to reset the counter when the @boardname@ is shaken. You will need to register an event handler with `on shake`.
|
||||
|
||||
|
@ -32,7 +32,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
![](/static/mb/lessons/counter-1.png)
|
||||
|
||||
We are only pressing on button pressed once. So the number to display on the micro:bit is also one.
|
||||
We are only pressing on button pressed once. So the number to display on the @boardname@ is also one.
|
||||
|
||||
<br/>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# dice roll activity
|
||||
|
||||
Create a dice on the micro:bit
|
||||
Create a dice on the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -8,7 +8,7 @@ Welcome! This tutorial will help you create a dice. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
Let's create a condition for when the micro:bit is shaken.
|
||||
Let's create a condition for when the @boardname@ is shaken.
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -1,6 +1,6 @@
|
||||
# dice roll challenges
|
||||
|
||||
Create a dice on the micro:bit.
|
||||
Create a dice on the @boardname@.
|
||||
|
||||
## Before we get started
|
||||
|
||||
|
@ -62,7 +62,7 @@ while (count > 0) {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Now, we need `count` to decrease by one after the micro:bit has displayed the value of `count`.
|
||||
Now, we need `count` to decrease by one after the @boardname@ has displayed the value of `count`.
|
||||
|
||||
We can do this by adding this line:
|
||||
|
||||
|
@ -8,7 +8,7 @@ In this activity, you will learn how to blink an image on the LED screen.
|
||||
|
||||
### ~
|
||||
|
||||
Let's start by adding code that plots a heart image on the screen using `show LEDs`. Once you are done coding, don't forget to run your code in the simulator or the micro:bit.
|
||||
Let's start by adding code that plots a heart image on the screen using `show LEDs`. Once you are done coding, don't forget to run your code in the simulator or the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -33,5 +33,5 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Now let's try to reset the counter when the micro:bit is shaken. You will need to register an event handler with `on shake`.
|
||||
Now let's try to reset the counter when the @boardname@ is shaken. You will need to register an event handler with `on shake`.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# game of chance blocks activity
|
||||
|
||||
Learn to create an answering machine on the micro:bit
|
||||
Learn to create an answering machine on the @boardname@
|
||||
|
||||
We will use `show string` to show text on the LED screen. *String* is a common name for *text* in programming languages. The function `show string` scrolls the text column by column at a *150* milliseconds interval. If you want to speed up or down the scrolling, simply change the *150*.
|
||||
|
||||
|
@ -28,7 +28,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 2
|
||||
|
||||
What if micro:bit's answer to the question is GAME OVER? Let's have `GAME OVER` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the `GAME OVER`.
|
||||
What if @boardname@'s answer to the question is GAME OVER? Let's have `GAME OVER` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the `GAME OVER`.
|
||||
|
||||
```blocks
|
||||
basic.showString("SELECT A BUTTON")
|
||||
|
@ -47,7 +47,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
Since the micro:bit will be swinging back and forth, the acceleration will only be positive half of the time. Thus, to always get a positive value, we want to take the absolute value of the acceleration.
|
||||
Since the @boardname@ will be swinging back and forth, the acceleration will only be positive half of the time. Thus, to always get a positive value, we want to take the absolute value of the acceleration.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -64,7 +64,7 @@ basic.forever(() => {
|
||||
});
|
||||
```
|
||||
|
||||
The function `acceleration(y)` returns a number between 0 and 1024. We want to use this value for the brightness of the micro:bit, but the `set brightness()` only accepts a value between 0 and 256. Thus, we need to divide the acceleration by 4 to ensure we will be in the appropriate range.
|
||||
The function `acceleration(y)` returns a number between 0 and 1024. We want to use this value for the brightness of the @boardname@, but the `set brightness()` only accepts a value between 0 and 256. Thus, we need to divide the acceleration by 4 to ensure we will be in the appropriate range.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
@ -82,7 +82,7 @@ basic.forever(() => {
|
||||
|
||||
```
|
||||
|
||||
Now let's use our acceleration value to set the brightness on the micro:bit.
|
||||
Now let's use our acceleration value to set the brightness on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -28,9 +28,9 @@ basic.forever(() => {
|
||||
|
||||
![](/static/mb/lessons/glowing-pendulum-0.jpg)
|
||||
|
||||
Hold the micro:bit in your hand in a dark room. Move the micro:bit like a pendulum and produce a slow image that captures the pattern of the micro:bit LEDs.
|
||||
Hold the @boardname@ in your hand in a dark room. Move the @boardname@ like a pendulum and produce a slow image that captures the pattern of the @boardname@ LEDs.
|
||||
|
||||
### Challenge 2
|
||||
|
||||
Replace "y" in `acceleration(y)` with "x" or "z". Changing the axis will cause the micro:bit to measure the force in a different direction. What differences in the resulting pattern does this replacement make?
|
||||
Replace "y" in `acceleration(y)` with "x" or "z". Changing the axis will cause the @boardname@ to measure the force in a different direction. What differences in the resulting pattern does this replacement make?
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
# guess the number quiz answers
|
||||
|
||||
Learn how to generate a random number on the micro:bit.
|
||||
Learn how to generate a random number on the @boardname@.
|
||||
|
||||
This is the answer key for the [guess the number quiz](/lessons/guess-the-number/quiz).
|
||||
|
||||
## 1. What is on button pressed?
|
||||
|
||||
Answers may vary. Generally, on button pressed run code when an input button is pressed. The micro:bit has two input buttons: A and B.
|
||||
Answers may vary. Generally, on button pressed run code when an input button is pressed. The @boardname@ has two input buttons: A and B.
|
||||
|
||||
## 2. Consider the following directions
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# guess the number quiz
|
||||
|
||||
Learn how to generate a random number on the micro:bit.
|
||||
Learn how to generate a random number on the @boardname@.
|
||||
|
||||
## Name
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Play sounds with music blocks.
|
||||
|
||||
Have you ever tried to play a song on an instrument? Let's try coding the song "Happy Birthday" on the micro:bit !
|
||||
Have you ever tried to play a song on an instrument? Let's try coding the song "Happy Birthday" on the @boardname@ !
|
||||
|
||||
Let's start by adding the code in the music drawer that includes a single musical chord (or pitched sound) with the `play` block. Then insert the chord "C". Once you are done coding, don't forget to run your code in the simulator or the micro:bit.
|
||||
Let's start by adding the code in the music drawer that includes a single musical chord (or pitched sound) with the `play` block. Then insert the chord "C". Once you are done coding, don't forget to run your code in the simulator or the @boardname@.
|
||||
|
||||
```blocks
|
||||
music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Quarter));
|
||||
|
@ -100,5 +100,5 @@ music.playTone(music.noteFrequency(Note.F), music.beat(BeatFraction.Quarter));
|
||||
|
||||
### Challenge 3
|
||||
|
||||
You now have a the ability to create music on the micro:bit. Try to code another favourite song.
|
||||
You now have a the ability to create music on the @boardname@. Try to code another favourite song.
|
||||
|
||||
|
@ -8,7 +8,7 @@ This tutorial will teach you how to create a hero game to capture food while dod
|
||||
|
||||
### ~
|
||||
|
||||
First we need to create a function create sprite at the x, y coordinates and that set the variable called hero on the micro:bit the first time we play.
|
||||
First we need to create a function create sprite at the x, y coordinates and that set the variable called hero on the @boardname@ the first time we play.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -17,7 +17,7 @@ let hero = game.createSprite(2, 2)
|
||||
|
||||
```
|
||||
|
||||
Let's set up where we want our ghost will be. Create starting positions of the hero, ghost, and food in each individual quadrant. We will ensure that the ghost, food, and hero is set apart. Divide the micro:bit into 4 quadrants. We don't want hero to be too close to the ghost so let's make the ghost starting positions in the 3 other quadrants. Hero is in the one quadrant. To do this, we need to keep track of the middle point in each quadrant. Create sprite at the x, y coordinates for the hero, food, and ghost.
|
||||
Let's set up where we want our ghost will be. Create starting positions of the hero, ghost, and food in each individual quadrant. We will ensure that the ghost, food, and hero is set apart. Divide the @boardname@ into 4 quadrants. We don't want hero to be too close to the ghost so let's make the ghost starting positions in the 3 other quadrants. Hero is in the one quadrant. To do this, we need to keep track of the middle point in each quadrant. Create sprite at the x, y coordinates for the hero, food, and ghost.
|
||||
|
||||
```blocks
|
||||
let hero = game.createSprite(2, 2)
|
||||
|
@ -1,10 +1,10 @@
|
||||
# love meter blocks activity
|
||||
|
||||
Create a love meter with the micro:bit
|
||||
Create a love meter with the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will help you create a love meter with the micro:bit. Let's get started!
|
||||
Welcome! This activity will help you create a love meter with the @boardname@. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -28,7 +28,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
|
||||
```
|
||||
|
||||
Finally, let's show that number on the micro:bit. You are registering an event handler that will execute on the @boardname@ whenever the user holds the GND pin with one hand, and presses pin 0 with the other hand, thus completing a circuit
|
||||
Finally, let's show that number on the @boardname@. You are registering an event handler that will execute on the @boardname@ whenever the user holds the GND pin with one hand, and presses pin 0 with the other hand, thus completing a circuit
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -1,6 +1,6 @@
|
||||
# love meter blocks challenges
|
||||
|
||||
Create a love meter with the micro:bit
|
||||
Create a love meter with the @boardname@
|
||||
|
||||
## Before we get started
|
||||
|
||||
|
@ -39,7 +39,7 @@ basic.showNumber(item + 1);
|
||||
|
||||
You have to add 1 if you want to generate a random number between 1 and 10 .
|
||||
|
||||
## 5. Why do you have to hold ground (GND) to make this work on the micro:bit?
|
||||
## 5. Why do you have to hold ground (GND) to make this work on the @boardname@?
|
||||
|
||||
|
||||
You have told GND to complete the circuit.
|
||||
|
@ -34,6 +34,6 @@ basic.showNumber(item + 1);
|
||||
|
||||
|
||||
|
||||
## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the micro:bit
|
||||
## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the @boardname@
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# lucky 7 blocks quiz answers
|
||||
|
||||
Show a number on the micro:bit.
|
||||
Show a number on the @boardname@.
|
||||
|
||||
This is the answer key for the [lucky 7 quiz](/lessons/lucky-7/quiz).
|
||||
|
||||
@ -26,7 +26,7 @@ basic.showNumber(21)
|
||||
|
||||
![](/static/mb/lessons/lucky-7-1.png)
|
||||
|
||||
## 4. Write the code that will be used to display the number 3 on the micro:bit.
|
||||
## 4. Write the code that will be used to display the number 3 on the @boardname@.
|
||||
|
||||
![](/static/mb/lessons/lucky-7-2.png)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# lucky 7 blocks quiz
|
||||
|
||||
Show a number on the micro:bit
|
||||
Show a number on the @boardname@
|
||||
|
||||
## Name
|
||||
|
||||
@ -33,7 +33,7 @@ basic.showNumber(21)
|
||||
|
||||
|
||||
|
||||
## 4. Write the code that will be used to display the number 3 on the micro:bit.
|
||||
## 4. Write the code that will be used to display the number 3 on the @boardname@.
|
||||
|
||||
![](/static/mb/lessons/lucky-7-3.png)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# magic 8 activity
|
||||
|
||||
Welcome! This activity will help you create a magic 8 ball on the micro:bit. Let's get started!
|
||||
Welcome! This activity will help you create a magic 8 ball on the @boardname@. Let's get started!
|
||||
|
||||
Show a string to instruct the user how to play Magic 8! The magic 8 ball can only answer true or false questions.
|
||||
|
||||
@ -17,7 +17,7 @@ basic.showString("ASK A QUESTION")
|
||||
basic.showNumber(8)
|
||||
```
|
||||
|
||||
Create a condition for when the micro:bit is shaken. Then use the block `clear screen` to clear the 8 from the display.
|
||||
Create a condition for when the @boardname@ is shaken. Then use the block `clear screen` to clear the 8 from the display.
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK A QUESTION")
|
||||
|
@ -6,7 +6,7 @@ Show a string to instruct the user how to play Magic 8! The magic 8 ball can onl
|
||||
|
||||
The blocks have been shuffled! Put them back together so that...
|
||||
* show "ASK A QUESTION" on the screen
|
||||
* when the micro:bit is shaken,
|
||||
* when the @boardname@ is shaken,
|
||||
* generate a random number between 0 and 2.
|
||||
* if the number is `2`, show "YES"
|
||||
* if the number is `1`, show "NO"
|
||||
|
@ -17,7 +17,7 @@ On Logo Up
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to plot image **on logo up**, `on logo up` to run code when the micro:bit screen is facing up and vertically orientated. We will be learning how to plot an image with the logo up, basic show LEDs, and logo down.
|
||||
Learn how to plot image **on logo up**, `on logo up` to run code when the @boardname@ screen is facing up and vertically orientated. We will be learning how to plot an image with the logo up, basic show LEDs, and logo down.
|
||||
|
||||
## Documentation
|
||||
```cards
|
||||
@ -34,7 +34,7 @@ basic.showLeds(`
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to display an image on the micro:bit's LED screen
|
||||
* learn how to run code when the micro:bit screen is facing down and vertically orientated
|
||||
* learn how to run code when the micro:bit screen is facing up and vertically orientated
|
||||
* learn how to display an image on the @boardname@'s LED screen
|
||||
* learn how to run code when the @boardname@ screen is facing down and vertically orientated
|
||||
* learn how to run code when the @boardname@ screen is facing up and vertically orientated
|
||||
|
||||
|
@ -8,7 +8,7 @@ Welcome! This tutorial will help you display an arrow pointing toward the logo!
|
||||
|
||||
### ~
|
||||
|
||||
Using the **accelerometer** sensor, the micro:bit can detect when the **logo** is oriented **up**. We call that the **logo up** event. We will use `on logo up` to register an event handler that will run when the **logo up** event happens.
|
||||
Using the **accelerometer** sensor, the @boardname@ can detect when the **logo** is oriented **up**. We call that the **logo up** event. We will use `on logo up` to register an event handler that will run when the **logo up** event happens.
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.LogoUp, () => {
|
||||
@ -16,7 +16,7 @@ input.onGesture(Gesture.LogoUp, () => {
|
||||
})
|
||||
```
|
||||
|
||||
When the micro:bit goes logo up, the code nested under the `on logo up` function will run. Let's add a line of code to show LEDs in there.
|
||||
When the @boardname@ goes logo up, the code nested under the `on logo up` function will run. Let's add a line of code to show LEDs in there.
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.LogoUp, () => {
|
||||
@ -30,7 +30,7 @@ input.onGesture(Gesture.LogoUp, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Run your code and try to turn around the micro:bit to see the **logo up** event in action!
|
||||
Run your code and try to turn around the @boardname@ to see the **logo up** event in action!
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# night light activity
|
||||
|
||||
Change the brightness of the micro:bit.
|
||||
Change the brightness of the @boardname@.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This tutorial will teach you how to change the brightness of the micro:bit. Let's get started!
|
||||
Welcome! This tutorial will teach you how to change the brightness of the @boardname@. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -12,7 +12,7 @@ basic.forever(() => {
|
||||
})
|
||||
```
|
||||
|
||||
Since the micro:bit will be swinging up and down, we need to store the variable called jumps. We will set the variable called jumps to 0 to store the number 0.
|
||||
Since the @boardname@ will be swinging up and down, we need to store the variable called jumps. We will set the variable called jumps to 0 to store the number 0.
|
||||
|
||||
```blocks
|
||||
let jumps = 0
|
||||
@ -65,7 +65,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
})
|
||||
```
|
||||
|
||||
If you press button A+B together, then reset the jump counter to 0 on the @boardname@. Finally, we will show the show the jump counter on the micro:bit
|
||||
If you press button A+B together, then reset the jump counter to 0 on the @boardname@. Finally, we will show the show the jump counter on the @boardname@
|
||||
|
||||
|
||||
```blocks
|
||||
@ -94,7 +94,7 @@ input.onButtonPressed(Button.AB, () => {
|
||||
|
||||
```
|
||||
|
||||
We want to setup the radio communication between an additional micro:bit. We first must send number for jumps. The additional micro:bit will receive the number and show number on data received. We are now displaying the current jump count on the second micro:bit
|
||||
We want to setup the radio communication between an additional @boardname@. We first must send number for jumps. The additional @boardname@ will receive the number and show number on data received. We are now displaying the current jump count on the second @boardname@
|
||||
|
||||
```blocks
|
||||
let jumps = 0
|
||||
@ -125,7 +125,7 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
})
|
||||
|
||||
```
|
||||
We want to stop animation so every time the number of jumps increase by 1 the second micro:bit will not also display smiley from show leds. So we add the code stop animation
|
||||
We want to stop animation so every time the number of jumps increase by 1 the second @boardname@ will not also display smiley from show leds. So we add the code stop animation
|
||||
|
||||
```blocks
|
||||
let jumps = 0
|
||||
@ -159,9 +159,9 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
```
|
||||
|
||||
|
||||
Connect the first micro:bit to your computer using your USB cable and run the pogo script on it.
|
||||
Connect the second micro:bit to your computer using your USB cable and run the pogo script on it.
|
||||
The first person and second person take turns jumping in the “y” direction while the other player uses the micro:bit to track the results on the micro:bit!
|
||||
Connect the first @boardname@ to your computer using your USB cable and run the pogo script on it.
|
||||
Connect the second @boardname@ to your computer using your USB cable and run the pogo script on it.
|
||||
The first person and second person take turns jumping in the “y” direction while the other player uses the @boardname@ to track the results on the @boardname@!
|
||||
|
||||
```package
|
||||
radio
|
||||
|
@ -43,7 +43,7 @@ while (rotating) {
|
||||
|
||||
<br/>
|
||||
|
||||
## 4. Draw the areas on the micro:bits to illustrate the code below. Explain why you chose to draw in those areas.
|
||||
## 4. Draw the areas on the @boardname@s to illustrate the code below. Explain why you chose to draw in those areas.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -1,12 +1,12 @@
|
||||
# screen wipe blocks activity
|
||||
|
||||
Clear the screen by pressing buttons on the micro:bit
|
||||
Clear the screen by pressing buttons on the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
|
||||
|
||||
This activity will teach how to clear the screen by pressing button A on the micro:bit.
|
||||
This activity will teach how to clear the screen by pressing button A on the @boardname@.
|
||||
|
||||
### ~
|
||||
|
||||
@ -80,7 +80,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
```
|
||||
|
||||
*Run* the script in the simulator or on the micro:bit to see how this works!
|
||||
*Run* the script in the simulator or on the @boardname@ to see how this works!
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
|
@ -4,7 +4,7 @@ Clear the screen by pressing the "A" button after an animation has been played
|
||||
|
||||
This is the answer key for the [screen wipe quiz](/lessons/screen-wipe/quiz).
|
||||
|
||||
## 1. What does the function "clear screen" do on the micro:bit?
|
||||
## 1. What does the function "clear screen" do on the @boardname@?
|
||||
|
||||
This function turns off all the LED lights on the LED screen.
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Seismograph Activity
|
||||
|
||||
Welcome! In this project, you will build your own seismograph. This activity will teach how to use the micro:bit to chart the strength of the acceleration. Let's get started! Project duration: 25 minutes.
|
||||
Welcome! In this project, you will build your own seismograph. This activity will teach how to use the @boardname@ to chart the strength of the acceleration. Let's get started! Project duration: 25 minutes.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Engineering: In this project, you will build your own seismograph micro:bit from tape and a household plate.
|
||||
Engineering: In this project, you will build your own seismograph @boardname@ from tape and a household plate.
|
||||
|
||||
### ~
|
||||
|
||||
@ -28,13 +28,13 @@ Prepare Tape: Measure and cut approximately 10mm of tape. The tape will be faste
|
||||
|
||||
## 2.
|
||||
|
||||
Fasten Tape: Fasten tape to the micro USB cable and to the plate. Attach the micro:bit to the micro:bit USB cable.
|
||||
Fasten Tape: Fasten tape to the micro USB cable and to the plate. Attach the @boardname@ to the @boardname@ USB cable.
|
||||
|
||||
![](/static/mb/lessons/seismograph0.png)
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Computer Science: The seismograph has been built. We are ready to program the micro:bit to be a seismograph!
|
||||
Computer Science: The seismograph has been built. We are ready to program the @boardname@ to be a seismograph!
|
||||
|
||||
### ~
|
||||
|
||||
@ -61,7 +61,7 @@ basic.forever(() => {
|
||||
|
||||
## 6.
|
||||
|
||||
At rest, the micro:bit is always subject to Earth gravity, whose magnitude is measured around ``1023``. Substract ``1023`` to measure a data close to ``0``.
|
||||
At rest, the @boardname@ is always subject to Earth gravity, whose magnitude is measured around ``1023``. Substract ``1023`` to measure a data close to ``0``.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -74,7 +74,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Data Analysis: We now need to use the micro:bit to Analyze Data and chart for the strength of the acceleration.
|
||||
Data Analysis: We now need to use the @boardname@ to Analyze Data and chart for the strength of the acceleration.
|
||||
|
||||
### ~
|
||||
|
||||
@ -82,25 +82,25 @@ Data Analysis: We now need to use the micro:bit to Analyze Data and chart for th
|
||||
|
||||
## 7.
|
||||
|
||||
First, notice that moving the micro:bit in the simulator in any direction, you will change the acceleration value, which is being displayed as the same color as the micro:bit simulator. Also, notice that by moving the micro:bit simulator, there is a changing acceleration value. Second, the flat colored horizontal line will start a waving line to display the value of the strength as measured in milli-gravities. Finally, notice that the LED display will fluctate based on the movement of the micro:bit simulator.
|
||||
First, notice that moving the @boardname@ in the simulator in any direction, you will change the acceleration value, which is being displayed as the same color as the @boardname@ simulator. Also, notice that by moving the @boardname@ simulator, there is a changing acceleration value. Second, the flat colored horizontal line will start a waving line to display the value of the strength as measured in milli-gravities. Finally, notice that the LED display will fluctate based on the movement of the @boardname@ simulator.
|
||||
|
||||
![](/static/mb/lessons/analyze20.png)
|
||||
|
||||
## 8.
|
||||
|
||||
Connect a micro:bit to your computer using your USB cable
|
||||
Connect a @boardname@ to your computer using your USB cable
|
||||
|
||||
![](/static/mb/lessons/seismograph33.png)
|
||||
|
||||
Click or tap the **Download** button for the seismograph program to run the program on the micro:bit.
|
||||
Click or tap the **Download** button for the seismograph program to run the program on the @boardname@.
|
||||
|
||||
## 9.
|
||||
|
||||
A black line should appear directly beneath the colored line. The black line measures the micro:bit acceleration. And the colored line measures micro:bit simulator acceleration.
|
||||
A black line should appear directly beneath the colored line. The black line measures the @boardname@ acceleration. And the colored line measures @boardname@ simulator acceleration.
|
||||
|
||||
Run the acceleration experiment by vigarously moving the plate in any direction or move the object below the micro:bit (such as a table).
|
||||
Run the acceleration experiment by vigarously moving the plate in any direction or move the object below the @boardname@ (such as a table).
|
||||
|
||||
Every time the micro:bit moves in any direction, you generate data points that can be reviewed in Excel later. The more attempts to move the micro:bit, the more data to be reviewed in Excel.
|
||||
Every time the @boardname@ moves in any direction, you generate data points that can be reviewed in Excel later. The more attempts to move the @boardname@, the more data to be reviewed in Excel.
|
||||
|
||||
![](/static/mb/lessons/seismograph5.png)
|
||||
|
||||
@ -108,19 +108,19 @@ Every time the micro:bit moves in any direction, you generate data points that
|
||||
|
||||
Please find seismogrph experiment obervations:
|
||||
|
||||
First, notice that moving the micro:bit in any direction, you will change the acceleration value, which is being displayed as a milli-gravities value. By moving the micro:bit, there will be a changing acceleration value.
|
||||
First, notice that moving the @boardname@ in any direction, you will change the acceleration value, which is being displayed as a milli-gravities value. By moving the @boardname@, there will be a changing acceleration value.
|
||||
|
||||
![](/static/mb/lessons/seismograph7.png)
|
||||
|
||||
Second, the horizontal line will move to plot the value of the strength as measured in milli-gravities. The horizontal line's movement is based on the micro:bit acceleration in Magnitude or Strength.
|
||||
Second, the horizontal line will move to plot the value of the strength as measured in milli-gravities. The horizontal line's movement is based on the @boardname@ acceleration in Magnitude or Strength.
|
||||
|
||||
![](/static/mb/lessons/seismograph6.png)
|
||||
|
||||
Third, notice that the LED display fluctates based on the movement of the micro:bit.
|
||||
Third, notice that the LED display fluctates based on the movement of the @boardname@.
|
||||
|
||||
![](/static/mb/lessons/seismograph8.png)
|
||||
|
||||
Now we are ready to graph or chart the accceleration of the micro:bit. We want a printout of the micro:bit acceleration graphed in Excel.
|
||||
Now we are ready to graph or chart the accceleration of the @boardname@. We want a printout of the @boardname@ acceleration graphed in Excel.
|
||||
|
||||
## 11.
|
||||
|
||||
@ -141,7 +141,7 @@ Click or tap Download data
|
||||
|
||||
## 13.
|
||||
|
||||
A CSV file will be generated to display the data points collected by the micro:bit. Click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
A CSV file will be generated to display the data points collected by the @boardname@. Click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
|
||||
![](/static/mb/lessons/analyze9.png)
|
||||
|
||||
@ -149,7 +149,7 @@ A CSV file will be generated to display the data points collected by the micro:b
|
||||
|
||||
Select the data that you want to include in your chart. The chart should include the first two columns: time and acceleration.
|
||||
|
||||
Click or tap on the first two columns (A, B) to include time and acceleration data from the micro:bit
|
||||
Click or tap on the first two columns (A, B) to include time and acceleration data from the @boardname@
|
||||
|
||||
|
||||
## 15.
|
||||
|
@ -5,7 +5,7 @@ Coding challenges for the seismograph.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Engineering: In this project, you will build a remote control based on the seismograph micro:bit activity using a second micro:bit and micro USB cable.
|
||||
Engineering: In this project, you will build a remote control based on the seismograph @boardname@ activity using a second @boardname@ and micro USB cable.
|
||||
|
||||
### ~
|
||||
|
||||
@ -31,13 +31,13 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
### ~avatar avatar
|
||||
Computer Science: Welcome! The activity will teach you how to code the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit. Let's get started!
|
||||
Computer Science: Welcome! The activity will teach you how to code the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@. Let's get started!
|
||||
### ~
|
||||
|
||||
# Computer Science Steps
|
||||
|
||||
## 1.
|
||||
We want to simply detach the blocks from the recent activity. We will use blocks from the activity to create a brand new program to show the way micro:bit devices communicate through the BLE (Bluetooth low energy) radio.
|
||||
We want to simply detach the blocks from the recent activity. We will use blocks from the activity to create a brand new program to show the way @boardname@ devices communicate through the BLE (Bluetooth low energy) radio.
|
||||
|
||||
```shuffle
|
||||
basic.forever(() => {
|
||||
@ -47,7 +47,7 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
## 2.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other micro:bits connected via radio.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other @boardname@s connected via radio.
|
||||
|
||||
We need add send number block found in the Radio drawer. We will attach send number to acceleration and subtract the gravity from acceleration strength.
|
||||
|
||||
@ -84,7 +84,7 @@ radio.onDataPacketReceived(() => {
|
||||
```
|
||||
|
||||
## 5.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st micro:bit, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the micro:bit's acceleration in the "x" direction.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st @boardname@, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the @boardname@'s acceleration in the "x" direction.
|
||||
|
||||
Your finished code will look like this:
|
||||
|
||||
@ -98,41 +98,41 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
```
|
||||
|
||||
### ~avatar avatar
|
||||
Science: Welcome! The activity will teach you how to chart the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit. Let's get started!
|
||||
Science: Welcome! The activity will teach you how to chart the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@. Let's get started!
|
||||
### ~
|
||||
|
||||
# Science Steps
|
||||
|
||||
## 6.
|
||||
First, notice that moving the 1st micro:bit in the simulator in any direction, you will change the acceleration value of the 2nd micro:bit. Also, notice that by moving the micro:bit simulator, there is a changing acceleration value of the second micro:bit. Second, the flat colored horizontal line will start a waving line on the 2nd micro:bit to display the value of the strength as measured in milli-gravities. Finally, notice that the LED display will fluctate based on the movement of the 2nd micro:bit simulator.
|
||||
First, notice that moving the 1st @boardname@ in the simulator in any direction, you will change the acceleration value of the 2nd @boardname@. Also, notice that by moving the @boardname@ simulator, there is a changing acceleration value of the second @boardname@. Second, the flat colored horizontal line will start a waving line on the 2nd @boardname@ to display the value of the strength as measured in milli-gravities. Finally, notice that the LED display will fluctate based on the movement of the 2nd @boardname@ simulator.
|
||||
|
||||
![](/static/mb/lessons/seis_challenge02.png)
|
||||
|
||||
## 7.
|
||||
|
||||
Connect the 2nd micro:bit to your computer using your USB cable. We should have two micro:bit devices attached to the computer.
|
||||
Connect the 2nd @boardname@ to your computer using your USB cable. We should have two @boardname@ devices attached to the computer.
|
||||
|
||||
![](/static/mb/lessons/seismograph33.png)
|
||||
|
||||
## 8.
|
||||
|
||||
Click or tap the **Download** button for the seismograph program to run the program on the 1st micro:bit and 2nd micro:bit.
|
||||
Click or tap the **Download** button for the seismograph program to run the program on the 1st @boardname@ and 2nd @boardname@.
|
||||
|
||||
## 9.
|
||||
|
||||
The black lines should appear directly beneath the colored lines. The black lines measure the micro:bit acceleration. And the colored lines measures micro:bit simulator acceleration.
|
||||
The black lines should appear directly beneath the colored lines. The black lines measure the @boardname@ acceleration. And the colored lines measures @boardname@ simulator acceleration.
|
||||
|
||||
![](/static/mb/lessons/seis_challenge05.png)
|
||||
|
||||
Run the acceleration experiment by vigarously moving the plate in any direction or move the object below the micro:bit (such as a table).
|
||||
Run the acceleration experiment by vigarously moving the plate in any direction or move the object below the @boardname@ (such as a table).
|
||||
|
||||
![](/static/mb/lessons/seis_challenge06.png)
|
||||
|
||||
Every time the micro:bit moves in any direction, you generate data points that can be reviewed in Excel later. The more attempts to move the micro:bit, the more data to be reviewed in Excel. Notice that the LED on the 2nd micro:bit changes to communicate the movement of the 1st micro:bit.
|
||||
Every time the @boardname@ moves in any direction, you generate data points that can be reviewed in Excel later. The more attempts to move the @boardname@, the more data to be reviewed in Excel. Notice that the LED on the 2nd @boardname@ changes to communicate the movement of the 1st @boardname@.
|
||||
|
||||
![](/static/mb/lessons/seis_challenge04.png)
|
||||
|
||||
Now we are ready to graph or chart the accceleration of the micro:bit. We want a printout of the micro:bit acceleration graphed in Excel.
|
||||
Now we are ready to graph or chart the accceleration of the @boardname@. We want a printout of the @boardname@ acceleration graphed in Excel.
|
||||
|
||||
## 10.
|
||||
|
||||
@ -153,7 +153,7 @@ Click or tap Download data
|
||||
|
||||
## 12.
|
||||
|
||||
A CSV file will be generated to display the data points collected by the micro:bit. Click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
A CSV file will be generated to display the data points collected by the @boardname@. Click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
|
||||
![](/static/mb/lessons/analyze9.png)
|
||||
|
||||
@ -161,7 +161,7 @@ A CSV file will be generated to display the data points collected by the micro:b
|
||||
|
||||
Select the data that you want to include in your chart. The chart should include the first two columns: time and acceleration.
|
||||
|
||||
Click or tap on the first two columns (A, B) to include time and acceleration data from the micro:bit. We only need the first two columns (A, B) because the 2nd micro:bit changes have been communicated by the 1st micro:bit. So the data points of the seismograph are being recorded on the 1st micro:bit.
|
||||
Click or tap on the first two columns (A, B) to include time and acceleration data from the @boardname@. We only need the first two columns (A, B) because the 2nd @boardname@ changes have been communicated by the 1st @boardname@. So the data points of the seismograph are being recorded on the 1st @boardname@.
|
||||
|
||||
## 14.
|
||||
|
||||
@ -192,8 +192,8 @@ Let's select Style 10 as an example.
|
||||
|
||||
### ~
|
||||
* Have fun reviewing your seismograph data and analyzing the acceleration with Excel.
|
||||
* The first person and second person take shaking or moving the micor:bit in any direction while the other player charts the data on the micro:bit!
|
||||
* Review and analyze the actual micro:bit device acceleration data on Excel
|
||||
* The first person and second person take shaking or moving the micor:bit in any direction while the other player charts the data on the @boardname@!
|
||||
* Review and analyze the actual @boardname@ device acceleration data on Excel
|
||||
|
||||
```package
|
||||
radio
|
||||
|
@ -12,7 +12,7 @@ A function that will display an image on the LED screen
|
||||
|
||||
<br/>
|
||||
|
||||
The extra empty image with show LED creates a blinking smiley, allowing the micro:bit to alternate between showing the smiley and the empty screen.
|
||||
The extra empty image with show LED creates a blinking smiley, allowing the @boardname@ to alternate between showing the smiley and the empty screen.
|
||||
|
||||
## 3. Draw the image created with this code
|
||||
|
||||
|
@ -10,7 +10,7 @@ Create an arrow that randomly points to a player.
|
||||
|
||||
Welcome! This guided tutorial will teach how to program a script that randomly points to a player. Let's get started!
|
||||
|
||||
Let's begin by adding an `on shake` condition to know when the micro:bit is shaken.
|
||||
Let's begin by adding an `on shake` condition to know when the @boardname@ is shaken.
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
|
@ -10,7 +10,7 @@ Welcome! This guided tutorial will teach how to develop shapes with a for loop.
|
||||
|
||||
### ~
|
||||
|
||||
Create a `for loop` that will loop from 0 to 4 to indicate the x-coordinates of the micro:bit display.
|
||||
Create a `for loop` that will loop from 0 to 4 to indicate the x-coordinates of the @boardname@ display.
|
||||
|
||||
```blocks
|
||||
for (let i = 0; i < 5; i++) {
|
||||
@ -19,7 +19,7 @@ for (let i = 0; i < 5; i++) {
|
||||
|
||||
```
|
||||
|
||||
Create another for loop that will loop from 0 to 4, indicating the y-coordinates of the micro:bit instead. This for loop will light each LED by column.
|
||||
Create another for loop that will loop from 0 to 4, indicating the y-coordinates of the @boardname@ instead. This for loop will light each LED by column.
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -13,7 +13,7 @@ Temperature
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to get the ambient temperature (degree Celsius °C). The temperature is inferred from the the surface temperature of the various chips on the micro:bit. We will be learning how to get the temperature using on shake, local variables, as well as simple commands such as show number.
|
||||
Learn how to get the ambient temperature (degree Celsius °C). The temperature is inferred from the the surface temperature of the various chips on the @boardname@. We will be learning how to get the temperature using on shake, local variables, as well as simple commands such as show number.
|
||||
|
||||
## Documentation
|
||||
|
||||
@ -28,5 +28,5 @@ input.onGesture(Gesture.Shake, () => {})
|
||||
## Objectives
|
||||
|
||||
* learn how to create a variable to store data
|
||||
* learn how to get the ambient temperature (degree Celsius °C). The temperature is inferred from the the surface temperature of the various chips on the micro:bit.
|
||||
* learn how to get the ambient temperature (degree Celsius °C). The temperature is inferred from the the surface temperature of the various chips on the @boardname@.
|
||||
* learn how to show a number on the LED screen
|
||||
|
@ -1,10 +1,10 @@
|
||||
# temperature activity
|
||||
|
||||
Measure the temperature on the micro:bit
|
||||
Measure the temperature on the @boardname@
|
||||
|
||||
Welcome! This activity will teach how to measure the temperature on the micro:bit. Let's get started!
|
||||
Welcome! This activity will teach how to measure the temperature on the @boardname@. Let's get started!
|
||||
|
||||
We want to display the temperature on shake. In order to do so, we need to register the event `on shake` that will execute whenever the user shakes the micro:bit; in the web browser, click the button labelled "SHAKE" under the simulator to generate a shake event
|
||||
We want to display the temperature on shake. In order to do so, we need to register the event `on shake` that will execute whenever the user shakes the @boardname@; in the web browser, click the button labelled "SHAKE" under the simulator to generate a shake event
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
|
@ -6,7 +6,7 @@ A multi-player game that forces each player to reveal a secret or something funn
|
||||
|
||||
|
||||
|
||||
Welcome! This tutorial will teach how to program a game of truth or dare on the micro:bit. Let's get started!
|
||||
Welcome! This tutorial will teach how to program a game of truth or dare on the @boardname@. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -23,7 +23,7 @@ basic.showLeds(`
|
||||
|
||||
```
|
||||
|
||||
Now let's create a condition to know when button `A` is pressed so that we can display "truth" or "dare" on the micro:bit. We want the @boardname@ to randomly choose whether to display "truth" or display "dare". We can use accomplish this by using `pick random (1)`.
|
||||
Now let's create a condition to know when button `A` is pressed so that we can display "truth" or "dare" on the @boardname@. We want the @boardname@ to randomly choose whether to display "truth" or display "dare". We can use accomplish this by using `pick random (1)`.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -64,7 +64,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 2
|
||||
|
||||
Instead of just saying "TRUTH" or "DARE", let's sometimes say "SKIP". This would allow the skipped person to spin the micro:bit without completing a truth or dare. Modify the if statement as shown.
|
||||
Instead of just saying "TRUTH" or "DARE", let's sometimes say "SKIP". This would allow the skipped person to spin the @boardname@ without completing a truth or dare. Modify the if statement as shown.
|
||||
|
||||
``` blocks
|
||||
basic.showLeds(`
|
||||
@ -100,5 +100,5 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Add some other messages, such as "TWO DARES" for the micro:bit to show. You will need to modify the parameter inside `pick random (3)` as well as adding another `if` condition.
|
||||
Add some other messages, such as "TWO DARES" for the @boardname@ to show. You will need to modify the parameter inside `pick random (3)` as well as adding another `if` condition.
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
The *Truth or dare!* game works as follows: a player spins the @boardname@ on the table.
|
||||
When the micro:bit stops spinning, the player pointed by the arrow (displayed on screen) must press the button "A"
|
||||
When the @boardname@ stops spinning, the player pointed by the arrow (displayed on screen) must press the button "A"
|
||||
to see if she has to provide a *truth* or a *dare*.
|
||||
|
||||
### ~
|
||||
@ -13,7 +13,7 @@ to see if she has to provide a *truth* or a *dare*.
|
||||
### Rebuild the game!
|
||||
|
||||
The blocks have been shuffled! Put them back together so that...
|
||||
* an up arrow is displayed when the micro:bit is powered on.
|
||||
* an up arrow is displayed when the @boardname@ is powered on.
|
||||
* on button `A` is pressed,
|
||||
* randomly display "TRUTH" or "DARE" on the screen
|
||||
* show the up arrow again.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# zoomer blocks lesson
|
||||
|
||||
measure the acceleration on the micro:bit in the "z" direction.
|
||||
measure the acceleration on the @boardname@ in the "z" direction.
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# zoomer block activity
|
||||
|
||||
Measure the acceleration on the micro:bit in the "z" direction.
|
||||
Measure the acceleration on the @boardname@ in the "z" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -8,7 +8,7 @@ Measure the acceleration on the micro:bit in the "z" direction.
|
||||
|
||||
### ~
|
||||
|
||||
Welcome! This activity will teach how to measure the acceleration on the micro:bit in the "z" direction. Let's get started!
|
||||
Welcome! This activity will teach how to measure the acceleration on the @boardname@ in the "z" direction. Let's get started!
|
||||
|
||||
We want to display the acceleration forever. In order to do so, we need a `forever` loop.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# zoomer quiz answers
|
||||
|
||||
Measure the acceleration on the micro:bit in the "z" direction.
|
||||
Measure the acceleration on the @boardname@ in the "z" direction.
|
||||
|
||||
This is the answer key for the [zoomer quiz](/lessons/zoomer/quiz).
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# zoomer quiz
|
||||
|
||||
Measure the acceleration on the micro:bit in the "z" direction.
|
||||
Measure the acceleration on the @boardname@ in the "z" direction.
|
||||
|
||||
## Name
|
||||
|
||||
|
@ -35,7 +35,7 @@ This file contains a map from the symbol name to the en
|
||||
```
|
||||
{
|
||||
...
|
||||
"basic": "Provides access to basic micro:bit functionality.",
|
||||
"basic": "Provides access to common functionality.",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Projects
|
||||
|
||||
Here are some cool projects that you can build with your micro:bit!
|
||||
Here are some cool projects that you can build with your @boardname@!
|
||||
|
||||
## Games
|
||||
|
||||
Fun games to build with your micro:bit.
|
||||
Fun games to build with your @boardname@.
|
||||
|
||||
```codecard
|
||||
[{
|
||||
@ -72,7 +72,7 @@ Fun games to build with your micro:bit.
|
||||
|
||||
## From the community
|
||||
|
||||
Projects contributed by the micro:bit community
|
||||
Projects contributed by the @boardname@ community
|
||||
|
||||
```codecard
|
||||
[{
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build your own micro:bit piano using bananas!
|
||||
Build your own @boardname@ piano using bananas!
|
||||
|
||||
### ~
|
||||
|
||||
@ -14,7 +14,7 @@ Build your own micro:bit piano using bananas!
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Bananas
|
||||
* Orange
|
||||
* Crocodile clips
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Bananas
|
||||
* Orange
|
||||
* Crocodile clips
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-1.png)
|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||
@ -21,7 +21,7 @@ Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-3.png)
|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||
@ -55,7 +55,7 @@ Using the 3rd crocodile clip, connect the unattached end of the crocodile clip o
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-10.png)
|
||||
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the micro:bit.
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the @boardname@.
|
||||
|
||||
### Step 8
|
||||
|
||||
@ -71,7 +71,7 @@ Your banana keyboard is ready!
|
||||
|
||||
### Step 10
|
||||
|
||||
Connect your micro:bit to your computer using your USB cable and run this script:
|
||||
Connect your @boardname@ to your computer using your USB cable and run this script:
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P1, () => {
|
||||
music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Quarter));
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
![](/static/mb/projects/a5-compass.png)
|
||||
|
||||
Display the direction that the micro:bit is facing using the compass
|
||||
Display the direction that the @boardname@ is facing using the compass
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the micro:bit is pointing. Let's get started!
|
||||
Welcome! This guided tutorial will show you how to program a script that displays the direction the @boardname@ is pointing. Let's get started!
|
||||
|
||||
### ~
|
||||
|
||||
@ -24,7 +24,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 2
|
||||
|
||||
Store the reading of the micro:bit in a variable called `degrees`.
|
||||
Store the reading of the @boardname@ in a variable called `degrees`.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -34,7 +34,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 3
|
||||
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -47,7 +47,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 4
|
||||
|
||||
If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E` on the micro:bit.
|
||||
If `degrees` is less than 135, the @boardname@ is mostly pointing East. Display `E` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -64,7 +64,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 5
|
||||
|
||||
If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `S` on the micro:bit.
|
||||
If `degrees` is less than 225, the @boardname@ is mostly pointing South. Display `S` on the @boardname@.
|
||||
|
||||
|
||||
```blocks
|
||||
@ -84,7 +84,7 @@ basic.forever(() => {
|
||||
|
||||
## Step 6
|
||||
|
||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||
If none of these conditions returned true, then the @boardname@ must be pointing West. Display `W` on the @boardname@.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
![guitar icon](/static/mb/projects/guitar.png)
|
||||
|
||||
### @description A beginner-intermediate maker activity, building a guitar with the micro:bit
|
||||
### @description A beginner-intermediate maker activity, building a guitar with the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Make a micro:bit guitar with this guided tutorial!
|
||||
Make a @boardname@ guitar with this guided tutorial!
|
||||
|
||||
### ~
|
||||
*playing micro:bit guitar*
|
||||
*playing @boardname@ guitar*
|
||||
https://youtu.be/GYmdTFvxz80
|
||||
|
||||
## Duration
|
||||
@ -23,7 +23,7 @@ https://youtu.be/GYmdTFvxz80
|
||||
* Markers and/or paint
|
||||
* Aluminum Foil
|
||||
* Scissors that can cut cardboard
|
||||
* 1 micro:bit, battery holder and 2 AAA batteries
|
||||
* 1 @boardname@, battery holder and 2 AAA batteries
|
||||
* 4-5 Crocodile clips
|
||||
* Headphones
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Accelerometer Beat control
|
||||
|
||||
### @description micro:bit guitar: using accelerometer to control tempo
|
||||
### @description @boardname@ guitar: using accelerometer to control tempo
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -33,18 +33,18 @@ Math.abs(1)
|
||||
|
||||
## Accelerometer, gravity and tilting!
|
||||
|
||||
The micro:bit contains an **accelerometer** sensor that is able to measure forces applied to the board.
|
||||
The @boardname@ contains an **accelerometer** sensor that is able to measure forces applied to the board.
|
||||
On earth, we are subject to the **gravity force** which pulls us to the ground!
|
||||
|
||||
https://youtu.be/0SULoTKmkhI
|
||||
|
||||
When the micro:bit is flat on a table, with the screen pointing up, the gravity force is aligned
|
||||
with the **Z** axis of the micro:bit.
|
||||
When the @boardname@ is flat on a table, with the screen pointing up, the gravity force is aligned
|
||||
with the **Z** axis of the @boardname@.
|
||||
|
||||
![micro:bit x, y, z axis image](/static/mb/projects/guitar/accelleration_axis.png)
|
||||
![@boardname@ x, y, z axis image](/static/mb/projects/guitar/accelleration_axis.png)
|
||||
|
||||
If you tilt it up and down, the force will align with the **Y** axis -- this is how we can detect tilting!!!
|
||||
If the force along **Y** grows, the micro:bit is tilting more and more vertically!
|
||||
If the force along **Y** grows, the @boardname@ is tilting more and more vertically!
|
||||
|
||||
## Measuring Acceleration along different coordinates (X, Y, Z axis)
|
||||
|
||||
@ -59,7 +59,7 @@ basic.forever(() => {
|
||||
```
|
||||
**Create the code** that measures the change in the Y axis acceleration as a graph on the LEDs
|
||||
|
||||
**Dowload the code** to the micro:bit
|
||||
**Dowload the code** to the @boardname@
|
||||
|
||||
**Test the movements that move the graph from 1 to 5 bars on the LEDs**
|
||||
|
||||
@ -74,7 +74,7 @@ Try graphing the acceleration along the **X** and **Z** axis. Can you explain th
|
||||
### ~
|
||||
|
||||
### Step 2: Mapping acceleration to Beat
|
||||
**micro:bit sensors produce signal values between 0 to 1023. The *[map block](/reference/pins/map)* converts the signal to a desired range.**
|
||||
**@boardname@ sensors produce signal values between 0 to 1023. The *[map block](/reference/pins/map)* converts the signal to a desired range.**
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
music.setTempo(pins.map(Math.abs(input.acceleration(Dimension.Y)),
|
||||
@ -86,7 +86,7 @@ basic.forever(() => {
|
||||
|
||||
**Create the code** that *Maps* Y axis acceleration as *tempo*
|
||||
|
||||
**Download the code** to the micro:bit on the guitar
|
||||
**Download the code** to the @boardname@ on the guitar
|
||||
|
||||
**Test the movements that speed and slow the tempo**
|
||||
|
||||
@ -106,7 +106,7 @@ basic.forever(() => {
|
||||
```
|
||||
**Combine the code above with the light sensor tone control code from the previous activity**
|
||||
|
||||
**Download the code** to the micro:bit on the guitar
|
||||
**Download the code** to the @boardname@ on the guitar
|
||||
|
||||
### Now play the guitar adjusting tone and tempo using the light sensor and accelerometer!
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Buttons, Display & Sound
|
||||
### @description micro:bit guitar: using buttons with display and sound
|
||||
### @description @boardname@ guitar: using buttons with display and sound
|
||||
|
||||
### ~avatar avatar
|
||||
Use Button Events to control LED Display and play Sound
|
||||
@ -14,9 +14,9 @@ Use Button Events to control LED Display and play Sound
|
||||
|
||||
## Materials
|
||||
|
||||
A micro:bit, battery pack and 2 x AAA batteries
|
||||
A @boardname@, battery pack and 2 x AAA batteries
|
||||
|
||||
![battery pack and micro:bit](/static/mb/projects/guitar/microbit.jpg)
|
||||
![battery pack and @boardname@](/static/mb/projects/guitar/microbit.jpg)
|
||||
|
||||
2 to 4 crocodile clips
|
||||
|
||||
@ -56,9 +56,9 @@ Open [pxt.microbit.org](https://pxt.microbit.org) in your web browser
|
||||
From **Basics**, drag a **show LEDs** block into the coding area
|
||||
* Create a face with LEDs
|
||||
|
||||
![micro:bit USB connection](/static/mb/projects/guitar/connectmicrobit.jpg)
|
||||
Connect your micro:bit to your computer via USB and click **`Download`**.
|
||||
Follow the instructions to move the code to your micro:bit.
|
||||
![@boardname@ USB connection](/static/mb/projects/guitar/connectmicrobit.jpg)
|
||||
Connect your @boardname@ to your computer via USB and click **`Download`**.
|
||||
Follow the instructions to move the code to your @boardname@.
|
||||
|
||||
## Step 2: Add Smiley LED Button Events
|
||||
```blocks
|
||||
@ -88,7 +88,7 @@ From **Input**, drag an **on button 'A' pressed** block into the coding area
|
||||
|
||||
* Create a 'B' button block with a different LED face
|
||||
|
||||
* Download the code to your micro:bit and try the A & B buttons
|
||||
* Download the code to your @boardname@ and try the A & B buttons
|
||||
|
||||
|
||||
## Step 3: Add Headphone Speakers using Crocodile clips
|
||||
@ -100,16 +100,16 @@ Connect **GND** to the **base of the headphone jack** using a second crocodile c
|
||||
|
||||
Connect **pin 0** to the **tip of the headphone jack** with a crocodile clip
|
||||
|
||||
*attaching batteries and micro:bit*
|
||||
*attaching batteries and @boardname@*
|
||||
https://youtu.be/zwRTmpKIaVU
|
||||
Attach the micro:bit & battery-pack to the guitar body
|
||||
Attach the @boardname@ & battery-pack to the guitar body
|
||||
|
||||
*connecting headphone speaker*
|
||||
https://youtu.be/ewyEW_U5G9M
|
||||
Connect the headphones with crocodile clips
|
||||
|
||||
### ~hint
|
||||
## The micro:bit can play music
|
||||
## The @boardname@ can play music
|
||||
|
||||
The **play tone** block allows a range letter note tones from **C** to **B5**.
|
||||
Songs are played using sequences notes. Like the beginning of a birthday song (C, C, D, C, F, E).
|
||||
@ -160,7 +160,7 @@ From **Music**, drag **play tone *C* for *1* beat** block under the **show leds*
|
||||
|
||||
**Repeat** for **Button B** event
|
||||
|
||||
**Download the code** to the micro:bit
|
||||
**Download the code** to the @boardname@
|
||||
|
||||
**Try the A & B buttons** with headphones and power connected
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Light Sensor Tone control
|
||||
|
||||
### @description micro:bit guitar: using light sensor to control tone
|
||||
### @description @boardname@ guitar: using light sensor to control tone
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -20,9 +20,9 @@ Use the Light Sensor to the control tone for this [Theremin](https://en.wikipedi
|
||||
*playing tones with light sensor*
|
||||
https://youtu.be/2cKg9pokVC4
|
||||
|
||||
## The micro:bit LEDs Light Sensors
|
||||
## The @boardname@ LEDs Light Sensors
|
||||
|
||||
- the micro:bit can detect external light level intensity reaching the LEDs
|
||||
- the @boardname@ can detect external light level intensity reaching the LEDs
|
||||
- the light level block reports a reading of values 0 (*dark*) to 255 (*bright*)
|
||||
- a **Forever Loop** is required to continually measure the current light level and control the tone
|
||||
|
||||
@ -65,7 +65,7 @@ Experiment to see the effect on graph height when the **plot bar graph** value *
|
||||
### Frequency
|
||||
**Frequency** measured in Hz which are cycles per second or vibrations per second
|
||||
* A healthy human ear can detect frequencies in the range of 20Hz to 20,000Hz.
|
||||
* The micro:bit + headphones reliably produce detectable output ~50Hz - 6,000Hz.
|
||||
* The @boardname@ + headphones reliably produce detectable output ~50Hz - 6,000Hz.
|
||||
|
||||
**261Hz** represents a C note
|
||||
```blocks
|
||||
@ -89,7 +89,7 @@ Create a **play tone** block using a **Math** section, **multiplication** block
|
||||
### Next
|
||||
**Add** a **B** button block that multiplies the **261** tone by a number other than 2 to set tone
|
||||
|
||||
**Download the code to the micro:bit**
|
||||
**Download the code to the @boardname@**
|
||||
|
||||
**Test the sound for multiples of the 261Hz *C* frequency**
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Making the Guitar Body
|
||||
### @description Maker Project for Guitar Body for micro:bit
|
||||
### @description Maker Project for Guitar Body for @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Make the Guitar Body for your micro:bit Guitar
|
||||
Make the Guitar Body for your @boardname@ Guitar
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Pin Press Switch
|
||||
|
||||
### @description micro:bit guitar: use pin press to toggle guitar play on/off
|
||||
### @description @boardname@ guitar: use pin press to toggle guitar play on/off
|
||||
|
||||
### ~avatar avatar
|
||||
Use pin press to switch guitar play on/off
|
||||
@ -55,15 +55,15 @@ input.onPinPressed(TouchPin.P2, () => {
|
||||
```
|
||||
**Create the pin-press code**
|
||||
|
||||
**Download the code** on the micro:bit
|
||||
**Download the code** on the @boardname@
|
||||
|
||||
https://youtu.be/PAIU-vHqyGU
|
||||
|
||||
**Hold the micro:bit touching The GND pin with one hand**
|
||||
**Hold the @boardname@ touching The GND pin with one hand**
|
||||
**with the other hand alternately touch the 0, 1 and 2 pins**
|
||||
|
||||
### ~hint
|
||||
**The electric signal traveled from pins, between your hands to `GND` and the micro:bit detected the electric signal!**
|
||||
**The electric signal traveled from pins, between your hands to `GND` and the @boardname@ detected the electric signal!**
|
||||
### ~
|
||||
|
||||
## Step 2: Installing conductive foil on the guitar
|
||||
@ -78,7 +78,7 @@ https://youtu.be/YkymZGNmkrE
|
||||
**Connect the foil to `pin 1` using a crocodile clip**
|
||||
|
||||
## Step 3: Add a switch to turn the guitar ON and OFF
|
||||
**Using the `on` global variable we can switch the message on the micro:bit**
|
||||
**Using the `on` global variable we can switch the message on the @boardname@**
|
||||
**between ON and OFF**
|
||||
```blocks
|
||||
let on = false
|
||||
@ -99,7 +99,7 @@ input.onPinPressed(TouchPin.P1, () => {
|
||||
```
|
||||
**Create the ON/OFF switch code**
|
||||
|
||||
**Download the code on the micro:bit**
|
||||
**Download the code on the @boardname@**
|
||||
|
||||
**Test by touching `P1` to toggle the LED message between ON and OFF**
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build your own music player micro:bit from headphones.
|
||||
Build your own music player @boardname@ from headphones.
|
||||
|
||||
### ~
|
||||
|
||||
@ -15,7 +15,7 @@ Build your own music player micro:bit from headphones.
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Headphones
|
||||
* Crocodile clips
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Did you know you could attach your headhpones to the micro:bit to generate sounds?
|
||||
Did you know you could attach your headhpones to the @boardname@ to generate sounds?
|
||||
|
||||
### ~
|
||||
|
||||
@ -16,7 +16,7 @@ Did you know you could attach your headhpones to the micro:bit to generate sound
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-1.png)
|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||
@ -24,13 +24,13 @@ Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-3.png)
|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-4.png)
|
||||
|
||||
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the micro:bit.
|
||||
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the @boardname@.
|
||||
|
||||
### Step 4
|
||||
|
||||
@ -38,7 +38,7 @@ Using the 1st crocodile clip, connect the second end of the crocodile clip onto
|
||||
|
||||
![](/static/mb/lessons/hack-your-headphones-1.png)
|
||||
|
||||
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the micro:bit pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
|
||||
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the @boardname@ pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
|
||||
|
||||
### Step 5
|
||||
|
||||
|
@ -67,4 +67,4 @@ input.onButtonPressed(Button.A, () => {
|
||||
});
|
||||
```
|
||||
|
||||
* click **Download** and run your code on the micro:bit.
|
||||
* click **Download** and run your code on the @boardname@.
|
||||
|
@ -1,23 +1,23 @@
|
||||
# magic button trick
|
||||
|
||||
Perform a magic trick where you appear to make the **A** and **B** button of your micro:bit swap over just by moving a sticky label.
|
||||
Perform a magic trick where you appear to make the **A** and **B** button of your @boardname@ swap over just by moving a sticky label.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach you how to use the micro:bit's compass to detect a nearby magnet
|
||||
Welcome! This activity will teach you how to use the @boardname@'s compass to detect a nearby magnet
|
||||
|
||||
### ~
|
||||
This is a simple magic trick you can perform to amaze your friends, where by moving the sticky labels on your micro:bit's **A** and **B** button you appear to make the buttons really switch over. To see the trick performed watch the video below.
|
||||
This is a simple magic trick you can perform to amaze your friends, where by moving the sticky labels on your @boardname@'s **A** and **B** button you appear to make the buttons really switch over. To see the trick performed watch the video below.
|
||||
|
||||
https://youtu.be/-9KvmPopov8
|
||||
|
||||
## How the trick works
|
||||
|
||||
Unfortunately, the only magic here is in the code. This trick uses a magnet, hidden in your hand, to tell the micro:bit to swap over the buttons so that when the magnet is near the microbit the **A** button starts working like the **B** button and the **B** button starts working like the **A** button.
|
||||
Unfortunately, the only magic here is in the code. This trick uses a magnet, hidden in your hand, to tell the @boardname@ to swap over the buttons so that when the magnet is near the microbit the **A** button starts working like the **B** button and the **B** button starts working like the **A** button.
|
||||
|
||||
## What you need
|
||||
|
||||
The only things you need for this trick are your micro:bit and any magnet that is small enough to fit in your hand, even a fridge magnet will work.
|
||||
The only things you need for this trick are your @boardname@ and any magnet that is small enough to fit in your hand, even a fridge magnet will work.
|
||||
|
||||
![](/static/mb/projects/magic-button-trick/magnets.jpg "Magnets")
|
||||
|
||||
@ -37,7 +37,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
## Step 2: measuring magnetic force
|
||||
|
||||
We will use the micro:bit's compass to detect the magnet. Compass's tell us what direction we are pointing by detecting the Earth's magnetic field but they can also detect any other magnet nearby. We will use that to check if our magnet is next to the micro:bit by using the [magnetic force](/reference/input/magnetic-force) block found in the input menu's 'more' section. As we only want to measure the strength we change the drop down to select 'strength':
|
||||
We will use the @boardname@'s compass to detect the magnet. Compass's tell us what direction we are pointing by detecting the Earth's magnetic field but they can also detect any other magnet nearby. We will use that to check if our magnet is next to the @boardname@ by using the [magnetic force](/reference/input/magnetic-force) block found in the input menu's 'more' section. As we only want to measure the strength we change the drop down to select 'strength':
|
||||
|
||||
```blocks
|
||||
input.magneticForce(Dimension.Strength)
|
||||
@ -56,7 +56,7 @@ let isSwitched = Math.abs(input.magneticForce(Dimension.Strength)) > 100
|
||||
```
|
||||
## Step 4: running our 'magnet nearby' check all the time
|
||||
|
||||
At the moment our code to detect the magnet being nearby will only run once so we need to put it into a [forever](/reference/basic/forever) block so that it keeps getting run again and again checking for the magnet to come near to the micro:bit. We should also make sure 'isSwitched' is false when our program starts.
|
||||
At the moment our code to detect the magnet being nearby will only run once so we need to put it into a [forever](/reference/basic/forever) block so that it keeps getting run again and again checking for the magnet to come near to the @boardname@. We should also make sure 'isSwitched' is false when our program starts.
|
||||
|
||||
```blocks
|
||||
let isSwitched = false;
|
||||
@ -94,8 +94,8 @@ input.onButtonPressed(Button.B, () => {
|
||||
```
|
||||
|
||||
## step 5: practice your performance
|
||||
Now you just need to program your own micro:bit and practice the trick a few times before performing to friends. Try asking your friends to click the buttons after you have switched the labels and the trick won't work for them as they don't have a hidden magnet in their hand.
|
||||
Now you just need to program your own @boardname@ and practice the trick a few times before performing to friends. Try asking your friends to click the buttons after you have switched the labels and the trick won't work for them as they don't have a hidden magnet in their hand.
|
||||
|
||||
|
||||
## about the authors
|
||||
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can chekout their [micro:bit tutorials chanel on youtube](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) for more projects.
|
||||
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can chekout their [@boardname@ tutorials chanel on youtube](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) for more projects.
|
@ -2,11 +2,11 @@
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st micro:bit and to visualize the acceleration on the 2nd micro:bit.
|
||||
Welcome! The activity will teach you how to use the acceleration of the 1st @boardname@ and to visualize the acceleration on the 2nd @boardname@.
|
||||
Let's get started!
|
||||
|
||||
### ~
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other micro:bits connected via radio.
|
||||
Let's measure `acceleration (mg)` and then `send number`. `Acceleration` is measured in **milli-gravities**, so a value of -1000 is equivalent to -1g or -9.81m/s^2. We will be able to get the acceleration value (g-force), in the specified "x" dimension. `Send number` will broadcast a number data packet to other @boardname@s connected via radio.
|
||||
|
||||
```blocks
|
||||
radio.sendNumber(input.acceleration(Dimension.X));
|
||||
@ -33,7 +33,7 @@ radio.onDataPacketReceived(() => {
|
||||
})
|
||||
```
|
||||
### ~
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st micro:bit, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the micro:bit's acceleration in the "x" direction.
|
||||
Finally, we want to chart the acceleration. So we must first implement `plot bar graph`. `Plot Bar Graph` will display a vertical bar graph based on the value and high value. In order to transfer the receive the number from the 1st @boardname@, we must implement `receive number` to constantly display a vertical bar graph based on the value. Remember, the value will equal to the @boardname@'s acceleration in the "x" direction.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -45,15 +45,15 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
|
||||
```
|
||||
### ~
|
||||
Notice that moving the micro:bit the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd micro:bit. There is a single LED turned on with the 1st micro:bit. Additionally, the graphs will reflect 0 acceleation for the 1st micro:bit. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
Notice that moving the @boardname@ the farthest direction in the x direction will be -1023 on the charting beneath the simulator. The second observation will be that the LEDs will be full brightness on the 2nd @boardname@. There is a single LED turned on with the 1st @boardname@. Additionally, the graphs will reflect 0 acceleation for the 1st @boardname@. In this scenario, if you are adjusting the acceleration in the simualator, you are also changing your chart that will be produced.
|
||||
|
||||
![](/static/mb/acc.png)
|
||||
|
||||
### ~
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bits are blue and green. So the colors of the line graphs reflect the colors of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@s are blue and green. So the colors of the line graphs reflect the colors of the @boardname@
|
||||
|
||||
### ~
|
||||
After running this simulation several seconds by moving the micro:bit side to side in the x direction, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
After running this simulation several seconds by moving the @boardname@ side to side in the x direction, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel. We will graph the fluctuating acceleration of the simulation experiment.
|
||||
|
||||
![](/static/mb/acc2.png)
|
||||
|
||||
@ -83,10 +83,10 @@ Use the Recommended Charts command on the Insert tab to quickly create a chart t
|
||||
### ~
|
||||
Have fun reviewing your simulation and analyze the acceleration by chart the Excel data using Excel.
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* Review and analyze the actual micro:bit device acceleration data on Excel
|
||||
* Connect the first @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the @boardname@ in the "x" direction while the other player charts the data on the @boardname@!
|
||||
* Review and analyze the actual @boardname@ device acceleration data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
|
||||
```package
|
||||
|
@ -1,10 +1,10 @@
|
||||
# radio
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
Measure the acceleration on the @boardname@ in the "x" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the acceleration in the "x" direction. Let's get started!
|
||||
Welcome! This activity will teach how to use the @boardname@ to chart the acceleration in the "x" direction. Let's get started!
|
||||
|
||||
|
||||
### ~
|
||||
@ -16,7 +16,7 @@ input.acceleration(Dimension.X)
|
||||
```
|
||||
|
||||
### ~
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the @boardname@ in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
@ -26,27 +26,27 @@ basic.forever(() => {
|
||||
```
|
||||
|
||||
### ~
|
||||
Notice that moving the micro:bit in the simulator from left to right (x direction) changes the values beneath the micro:bit in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the micro:bit from left to right, you can observe changing values beneath the micro:bit simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit simulator in the x direction. The line underneath the micro:bit simulator reflect the acceleration in the x direction.
|
||||
Notice that moving the @boardname@ in the simulator from left to right (x direction) changes the values beneath the @boardname@ in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the @boardname@ from left to right, you can observe changing values beneath the @boardname@ simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the @boardname@ simulator in the x direction. The line underneath the @boardname@ simulator reflect the acceleration in the x direction.
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bit is yellow. So the color of the data line reflects the color of the micro:bit
|
||||
NOTE: The colors of the charts reflect the color of the @boardname@ simulator. In this instance, the @boardname@ is yellow. So the color of the data line reflects the color of the @boardname@
|
||||
|
||||
![](/static/mb/data4.png)
|
||||
|
||||
### ~
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
Vigorously move the @boardname@ in the @boardname@ simulatator by moving the @boardname@ image from side to side. Every time the @boardname@ moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the @boardname@ from side to side, the more data being saved in Excel. After you have vigarously moved the @boardname@ simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the @boardname@. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
### ~
|
||||
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the @boardname@ in the X direction. Then click or tap on the data Excel file that was downloaded to your local ``Downloads`` Folder.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the micro:bit
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the @boardname@
|
||||
|
||||
![](/static/mb/data7.png)
|
||||
|
||||
|
@ -36,7 +36,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
In this project, you will build a Rock Paper Scissors game with the @boardname@.
|
||||
You can play the game with a friend who has it on a micro:bit.
|
||||
You can play the game with a friend who has it on a @boardname@.
|
||||
You can also play it with friends who are just using their hands.
|
||||
|
||||
### ~
|
||||
@ -48,8 +48,8 @@ You can also play it with friends who are just using their hands.
|
||||
|
||||
## Step 1: Getting started
|
||||
|
||||
We want the micro:bit to choose rock, paper, or scissors when you shake it.
|
||||
Try creating an ``on shake`` block so when you shake the micro:bit, it will run part of a program.
|
||||
We want the @boardname@ to choose rock, paper, or scissors when you shake it.
|
||||
Try creating an ``on shake`` block so when you shake the @boardname@, it will run part of a program.
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -57,7 +57,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Next, when you shake the micro:bit, it should pick a random number from `0` to `2`
|
||||
Next, when you shake the @boardname@, it should pick a random number from `0` to `2`
|
||||
and store it in the variable `weapon`. (This variable is named `weapon` because
|
||||
rock, paper, and scissors are the weapons you use to battle your friends!)
|
||||
|
||||
@ -110,7 +110,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
## Step 3: A random rock
|
||||
|
||||
Now we are going to add a new picture for the micro:bit to show
|
||||
Now we are going to add a new picture for the @boardname@ to show
|
||||
when another random number comes up.
|
||||
|
||||
Make the ``else if`` part check if the variable `weapon` is `1`.
|
||||
@ -192,7 +192,7 @@ Your game is ready! Have fun!
|
||||
|
||||
Here is a way you can make your Rock Paper Scissors game better.
|
||||
When button ``A`` is pressed,
|
||||
the micro:bit will add `1` to your score.
|
||||
the @boardname@ will add `1` to your score.
|
||||
|
||||
Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program,
|
||||
like this:
|
||||
@ -206,7 +206,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 6: Prove you're the greatest!
|
||||
|
||||
After your micro:bit can add `1` to the score, show how many wins you have.
|
||||
After your @boardname@ can add `1` to the score, show how many wins you have.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@ -217,7 +217,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
```
|
||||
## Step 7: Staying honest
|
||||
|
||||
Success! Your micro:bit can track wins!
|
||||
Success! Your @boardname@ can track wins!
|
||||
But what about losses?
|
||||
Use the ``Game`` drawer to subtract `1` from your score when you press button `B`.
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Build a telegraph between two micro:bits to communicate with your friends!
|
||||
Build a telegraph between two @boardname@s to communicate with your friends!
|
||||
|
||||
### ~
|
||||
|
||||
@ -12,7 +12,7 @@ Build a telegraph between two micro:bits to communicate with your friends!
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Crocodile clips
|
||||
|
||||
## Activities
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### ~avatar
|
||||
|
||||
Let's build a telegraph between two micro:bits.
|
||||
Let's build a telegraph between two @boardname@s.
|
||||
|
||||
### ~
|
||||
|
||||
@ -10,7 +10,7 @@ Let's build a telegraph between two micro:bits.
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Crocodile clips
|
||||
|
||||
## Steps
|
||||
@ -19,49 +19,49 @@ Let's build a telegraph between two micro:bits.
|
||||
|
||||
![](/static/mb/lessons/banana-keyboard-1.png)
|
||||
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
|
||||
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the @boardname@.
|
||||
|
||||
### Step 2
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-2.png)
|
||||
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the micro:bit.
|
||||
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the @boardname@.
|
||||
|
||||
### Step 3
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-3.png)
|
||||
|
||||
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the micro:bit.
|
||||
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the @boardname@.
|
||||
|
||||
### Step 4
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-4.png)
|
||||
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the micro:bit.
|
||||
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the @boardname@.
|
||||
|
||||
### Step 5
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-5.png)
|
||||
|
||||
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd micro:bit.
|
||||
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd @boardname@.
|
||||
|
||||
### Step 6
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-6.png)
|
||||
|
||||
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd micro:bit.
|
||||
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd @boardname@.
|
||||
|
||||
### Step 7
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-7.png)
|
||||
|
||||
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd micro:bit.
|
||||
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd @boardname@.
|
||||
|
||||
### Step 8
|
||||
|
||||
![](/static/mb/lessons/ornament-chain-8.png)
|
||||
|
||||
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd micro:bit
|
||||
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd @boardname@
|
||||
|
||||
### Step 9
|
||||
|
||||
|
@ -90,6 +90,6 @@ Your telegraph is ready!
|
||||
|
||||
### Step 7
|
||||
|
||||
* Connect the first micro:bit to your computer using your USB cable and put the telegraph script on it.
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the telegraph script on it.
|
||||
* Connect the first @boardname@ to your computer using your USB cable and put the telegraph script on it.
|
||||
* Connect the second @boardname@ to your computer using your USB cable and run the telegraph script on it.
|
||||
* The first person and second person take turns pressing button A to play the telegraph game!
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
![](/static/mb/lessons/the-watch-0.png)
|
||||
|
||||
In this project, you will build your own wearable micro:bit watch from an old pair of jeans and T-shirt. Project duration: 15 minutes.
|
||||
In this project, you will build your own wearable @boardname@ watch from an old pair of jeans and T-shirt. Project duration: 15 minutes.
|
||||
|
||||
![](/static/mb/lessons/the-watch-1.png)
|
||||
|
||||
## Materials
|
||||
|
||||
* micro:bit, battery holder and 2 AAA batteries
|
||||
* @boardname@, battery holder and 2 AAA batteries
|
||||
* Old T-shirt
|
||||
* Old Jeans
|
||||
* Velcro with sticky back – 5cm x 5cm
|
||||
@ -70,25 +70,25 @@ Peal the tape protective layer from the rectangle.
|
||||
|
||||
![](/static/mb/lessons/the-watch-11.png)
|
||||
|
||||
Place the micro:bit pins on the tape at more or less **7** cm from the left border. Then lower the micro:bit on the tape and press **gently**.
|
||||
Place the @boardname@ pins on the tape at more or less **7** cm from the left border. Then lower the @boardname@ on the tape and press **gently**.
|
||||
|
||||
### Step 9
|
||||
|
||||
![](/static/mb/lessons/the-watch-12.png)
|
||||
|
||||
Connect the battery holder and place it on the right of the micro:bit. Tuck the cables away on the tape to protect them.
|
||||
Connect the battery holder and place it on the right of the @boardname@. Tuck the cables away on the tape to protect them.
|
||||
|
||||
### Step 10
|
||||
|
||||
![](/static/mb/lessons/the-watch-13.png)
|
||||
|
||||
Stick the T-shirt rectangle from the top of the micro:bit, over the battery cables.
|
||||
Stick the T-shirt rectangle from the top of the @boardname@, over the battery cables.
|
||||
|
||||
### Step 11
|
||||
|
||||
![](/static/mb/lessons/the-watch-14.png)
|
||||
|
||||
Use your fingers to push the T-shirt cloth under the micro:bit to give access to the micro-USB plug.
|
||||
Use your fingers to push the T-shirt cloth under the @boardname@ to give access to the micro-USB plug.
|
||||
|
||||
### Step 12
|
||||
|
||||
@ -106,7 +106,7 @@ Turn over the watch and cut the extra T-shirt material.
|
||||
|
||||
![](/static/mb/lessons/the-watch-17.png)
|
||||
|
||||
Stick the T-shirt cloth on the other side of the watch. Lift the micro:bit pins to slide the cloth under and leave them free from the tape.
|
||||
Stick the T-shirt cloth on the other side of the watch. Lift the @boardname@ pins to slide the cloth under and leave them free from the tape.
|
||||
|
||||
### Step 15
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user