rename micro:bit to @boardname@
This commit is contained in:
@ -4,7 +4,7 @@ The acceleration function.
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
Great job! You have successfully completed the [zoomer tutorial](https://test.microbit.co.uk/td/lessons/zoomer/challenges) . You have created a script that measures the acceleration on the micro:bit in the "z" direction of a 3D world.
|
||||
Great job! You have successfully completed the [zoomer tutorial](https://test.microbit.co.uk/td/lessons/zoomer/challenges) . You have created a script that measures the acceleration on the @boardname@ in the "z" direction of a 3D world.
|
||||
|
||||
```
|
||||
basic.forever(() => {
|
||||
@ -49,7 +49,7 @@ basic.forever(() => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
If Button `B` is pressed, program the micro:bit to display the acceleration in the "y" direction.
|
||||
If Button `B` is pressed, program the @boardname@ to display the acceleration in the "y" direction.
|
||||
|
||||
You can do this by storing the acceleration in a variable: `var milliY := input->acceleration("y")`.
|
||||
|
||||
|
@ -8,7 +8,7 @@ This [guided tutorial](/lessons/boxer-mania/tutorial) will help you create an an
|
||||
|
||||
Let's create and show a series of frames on the LED screen; this is an animation!
|
||||
|
||||
We will use multiple frames to make it look like a square is rotating on the micro:bit screen!
|
||||
We will use multiple frames to make it look like a square is rotating on the @boardname@ screen!
|
||||
|
||||
```
|
||||
basic.showAnimation(`
|
||||
|
@ -19,7 +19,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 1
|
||||
|
||||
Now let's do something special when the micro:bit reaches the number `5`. Instead of just showing the number `5`, let's show the string `HALF WAY!`. Begin by setting an if statement to know when `counter = 5`.
|
||||
Now let's do something special when the @boardname@ reaches the number `5`. Instead of just showing the number `5`, let's show the string `HALF WAY!`. Begin by setting an if statement to know when `counter = 5`.
|
||||
|
||||
```
|
||||
counter = 0
|
||||
@ -56,7 +56,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
You may notice a problem right now. When `counter = 5`, the micro:bit will show both the message `HALF WAY!` and the number `5`. In order to fix this problem, let's take advantage of the `else` at the end of the if statement.
|
||||
You may notice a problem right now. When `counter = 5`, the @boardname@ will show both the message `HALF WAY!` and the number `5`. In order to fix this problem, let's take advantage of the `else` at the end of the if statement.
|
||||
|
||||
```
|
||||
counter = 0
|
||||
@ -75,5 +75,5 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Challenge 4
|
||||
|
||||
When `counter = 8`, display the message `ALMOST THERE!` on the micro:bit. You will need to add an `else if` after the if statement of `counter = 5`.
|
||||
When `counter = 8`, display the message `ALMOST THERE!` on the @boardname@. You will need to add an `else if` after the if statement of `counter = 5`.
|
||||
|
||||
|
@ -67,10 +67,10 @@ Learn how to create **functions**, `function()` that perform a specific task and
|
||||
* learn how to set or change the value of a global variable
|
||||
* learn how to repeat code in the background forever
|
||||
* learn how to get the state of an input button
|
||||
* learn how to show a number on the micro:bit's LED screen
|
||||
* learn how to show a string on the micro:bit's LED screen
|
||||
* learn how to create an image to show on the micro:bit's LED screen
|
||||
* learn how to show an image on the micro:bit's LED screen
|
||||
* learn how to show a number on the @boardname@'s LED screen
|
||||
* learn how to show a string on the @boardname@'s LED screen
|
||||
* learn how to create an image to show on the @boardname@'s LED screen
|
||||
* learn how to show an image on the @boardname@'s LED screen
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
||||
## Links to the National Curriculum Programmes of Study for Computing
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Turn a LED on and off. #docs
|
||||
|
||||
Detect and show an image when the micro:bit falls.
|
||||
Detect and show an image when the @boardname@ falls.
|
||||
|
||||
* [tutorial](/lessons/landslide/tutorial)
|
||||
* [challenges](/lessons/landslide/challenges)
|
||||
|
@ -73,5 +73,5 @@ input.onFall(() => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Now let's display a third image when the micro:bit falls! First, add `basic->pause(2000)` followed by another image of your choice. Be creative!
|
||||
Now let's display a third image when the @boardname@ falls! First, add `basic->pause(2000)` followed by another image of your choice. Be creative!
|
||||
|
||||
|
@ -48,7 +48,7 @@ Learn how to create **functions**, `function()` that perform a specific task and
|
||||
* learn how to repeat code in the background forever
|
||||
* learn how to conditionally run code depending on whether a condition is true or not
|
||||
* learn how to run code when an input button is pressed
|
||||
* learn how to show a string on the micro:bit's LED screen
|
||||
* learn how to show a string on the @boardname@'s LED screen
|
||||
* learn how to turn on a LED light on the LED screen. Learn how to specify which LED using x, y coordinates
|
||||
* learn how to turn off a LED light on the LED screen. Learn how to specify which LED using x, y coordinates
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
@ -67,5 +67,5 @@ input.onLogoDown(() => {
|
||||
|
||||
**Challenge 3**
|
||||
|
||||
Let's show a spinning arrow when the micro:bit is shaken. We can do this by adding an on shake condition and showing an animation of the arrow spinning!
|
||||
Let's show a spinning arrow when the @boardname@ is shaken. We can do this by adding an on shake condition and showing an animation of the arrow spinning!
|
||||
|
||||
|
@ -52,8 +52,8 @@ Learn how to create **functions**, `function()` that perform a specific task and
|
||||
* learn how to gradually increase the LED screen brightness until the LED lights are turned on
|
||||
* learn how to conditionally run code depending on whether a condition is true or not
|
||||
* learn how to run code when an input button is pressed
|
||||
* learn how to show a number on the micro:bit's LED screen
|
||||
* learn how to show a string on the micro:bit's LED screen
|
||||
* learn how to show a number on the @boardname@'s LED screen
|
||||
* learn how to show a string on the @boardname@'s LED screen
|
||||
* learn how to turn on a LED light on the LED screen. Learn how to specify which LED using x, y coordinates
|
||||
* learn how to turn on all the 25 LEDs on the LED screen
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
@ -121,7 +121,7 @@ for (let i4 = 0; i4 < 4; i4++) {
|
||||
|
||||
**Questions 10-14 are concerned with 'number pysch controller tutorial'**
|
||||
|
||||
## 10. Write the code that asks for a player number if button 'A' is pressed on the BBC controller micro:bit.
|
||||
## 10. Write the code that asks for a player number if button 'A' is pressed on the BBC controller @boardname@.
|
||||
|
||||
<br />
|
||||
|
||||
@ -162,7 +162,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
})
|
||||
```
|
||||
|
||||
## 13. Create a while loop that first reads which controller the console micro:bit is requesting data from. Plot a waiting image, and then write an IF statement to check if the request corresponds to the controller. (Don't worry about writing anything inside the if statement).
|
||||
## 13. Create a while loop that first reads which controller the console @boardname@ is requesting data from. Plot a waiting image, and then write an IF statement to check if the request corresponds to the controller. (Don't worry about writing anything inside the if statement).
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -80,7 +80,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
**Questions 10-14 are concerned with 'number pysch controller tutorial'**
|
||||
|
||||
## 10. Write the code that asks for a player number if button 'A' is pressed on the BBC controller micro:bit.
|
||||
## 10. Write the code that asks for a player number if button 'A' is pressed on the BBC controller @boardname@.
|
||||
|
||||
<br />
|
||||
|
||||
@ -100,7 +100,7 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu
|
||||
|
||||
<br/>
|
||||
|
||||
## 13. Create a while loop that first reads which controller the console micro:bit is requesting data from. Plot a waiting image, and then write an IF statement to check if the request corresponds to the controller. (Don't worry about writing anything inside the if statement).
|
||||
## 13. Create a while loop that first reads which controller the console @boardname@ is requesting data from. Plot a waiting image, and then write an IF statement to check if the request corresponds to the controller. (Don't worry about writing anything inside the if statement).
|
||||
|
||||
<br />
|
||||
|
||||
|
@ -4,7 +4,7 @@ The on fall function.
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Welcome! This [guided tutorial](https://live.microbit.co.uk/td/lessons/on-fall/tutorial) will show you how to detect when the micro:bit is falling. Your goal is to write a program that detects when the micro:bit falls!
|
||||
Welcome! This [guided tutorial](https://live.microbit.co.uk/td/lessons/on-fall/tutorial) will show you how to detect when the @boardname@ is falling. Your goal is to write a program that detects when the @boardname@ falls!
|
||||
|
||||
```
|
||||
input.onFall(() => {
|
||||
@ -61,7 +61,7 @@ input.onFall(() => {
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Create a loop so that the micro:bit alternates between the exclamation point and "X" images when the micro:bit falls. You will need a `forever` loop and a pause at the end of the loop to do this.
|
||||
Create a loop so that the @boardname@ alternates between the exclamation point and "X" images when the @boardname@ falls. You will need a `forever` loop and a pause at the end of the loop to do this.
|
||||
|
||||
## See Also
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# flipping bird challenges
|
||||
|
||||
These challenges will allow you to create and display a flipping image of a bird when the micro:bit is shaken. #docs
|
||||
These challenges will allow you to create and display a flipping image of a bird when the @boardname@ is shaken. #docs
|
||||
|
||||
### Challenge 0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# pong lesson
|
||||
|
||||
code your own game of Pong on the micro:bit. #.
|
||||
code your own game of Pong on the @boardname@. #.
|
||||
|
||||
## Topic
|
||||
|
||||
@ -71,7 +71,7 @@ Learn how to create **functions**, `function()` that perform a specific task and
|
||||
* learn how to repeat code in the background forever
|
||||
* learn how to conditionally run code depending on whether a condition is true or not
|
||||
* learn how to run code when an input button is pressed
|
||||
* learn how to show a string on the micro:bit's LED screen
|
||||
* learn how to show a string on the @boardname@'s LED screen
|
||||
* learn how to turn on a LED light on the LED screen. Learn how to specify which LED using x, y coordinates
|
||||
* learn how to turn off a LED light on the LED screen. Learn how to specify which LED using x, y coordinates
|
||||
* learn how to pause your code for the specified number of milliseconds
|
||||
|
@ -8,7 +8,7 @@ Welcome! This guide will show you how to complete the challenges for the game of
|
||||
|
||||
### Step 16
|
||||
|
||||
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the micro:bit using global variables. Create a global variable to keep track of the wins against the micro:bit. To do so, click on `add new`, then `Data`, and then `Number`.
|
||||
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the @boardname@ using global variables. Create a global variable to keep track of the wins against the @boardname@. To do so, click on `add new`, then `Data`, and then `Number`.
|
||||
|
||||
```
|
||||
var wins: number = 0
|
||||
@ -16,7 +16,7 @@ var wins: number = 0
|
||||
|
||||
### Step 17
|
||||
|
||||
At the beginning of the game, you don't have any wins against the micro:bit. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
|
||||
At the beginning of the game, you don't have any wins against the @boardname@. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
|
||||
|
||||
```
|
||||
wins = 0 // ***
|
||||
@ -78,7 +78,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Step 20
|
||||
|
||||
You have tracked the number of wins you have against the micro:bit. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
|
||||
You have tracked the number of wins you have against the @boardname@. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -100,13 +100,13 @@ input.onButtonPressed(Button.A, () => {
|
||||
})
|
||||
```
|
||||
|
||||
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the micro:bit.
|
||||
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the @boardname@.
|
||||
|
||||
## Challenge 2
|
||||
|
||||
### Step 21
|
||||
|
||||
You have managed to keep score of the number of wins you have against the micro:bit. However, what about losses? Let's begin by creating another global variable to keep track of losses.
|
||||
You have managed to keep score of the number of wins you have against the @boardname@. However, what about losses? Let's begin by creating another global variable to keep track of losses.
|
||||
|
||||
```
|
||||
var losses: number = 0
|
||||
@ -114,7 +114,7 @@ var losses: number = 0
|
||||
|
||||
### Step 22
|
||||
|
||||
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the micro:bit by 1. Let's hope that this button will not be pressed too often!
|
||||
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the @boardname@ by 1. Let's hope that this button will not be pressed too often!
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -167,7 +167,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Step 24
|
||||
|
||||
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the micro:bit.
|
||||
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the @boardname@.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -198,7 +198,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Step 25
|
||||
|
||||
You have managed to keep track of both the wins and losses you have against the micro:bit! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
|
||||
You have managed to keep track of both the wins and losses you have against the @boardname@! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -229,7 +229,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
})
|
||||
```
|
||||
|
||||
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the micro:bit can!
|
||||
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the @boardname@ can!
|
||||
|
||||
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the micro:bit. Challenge your friends to see who can get a better score against the micro:bit.
|
||||
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the @boardname@. Challenge your friends to see who can get a better score against the @boardname@.
|
||||
|
||||
|
@ -8,7 +8,7 @@ Welcome! This guide will show you how to complete the challenges for the game of
|
||||
|
||||
### Step 16
|
||||
|
||||
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the micro:bit using global variables. Create a global variable to keep track of the wins against the micro:bit. To do so, click on `add new`, then `Data`, and then `Number`.
|
||||
Awesome! You have just created your game of rock paper scissors. However, why don't we add a little more to it? We can keep track of your score against the @boardname@ using global variables. Create a global variable to keep track of the wins against the @boardname@. To do so, click on `add new`, then `Data`, and then `Number`.
|
||||
|
||||
```
|
||||
var wins: number = 0
|
||||
@ -16,7 +16,7 @@ var wins: number = 0
|
||||
|
||||
### Step 17
|
||||
|
||||
At the beginning of the game, you don't have any wins against the micro:bit. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
|
||||
At the beginning of the game, you don't have any wins against the @boardname@. As a result, let's set the `data->wins` variable to 0 at the top of your main function.
|
||||
|
||||
```
|
||||
wins = 0 // ***
|
||||
@ -78,7 +78,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Step 20
|
||||
|
||||
You have tracked the number of wins you have against the micro:bit. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
|
||||
You have tracked the number of wins you have against the @boardname@. However, how will you ever know how many wins you have? After we increment `data->wins`, let's display the total number of wins you have.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -100,13 +100,13 @@ input.onButtonPressed(Button.A, () => {
|
||||
})
|
||||
```
|
||||
|
||||
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the micro:bit.
|
||||
* Tap `run` to run the program on the simulator. Notice the number of wins you have against the @boardname@.
|
||||
|
||||
## Challenge 2
|
||||
|
||||
### Step 21
|
||||
|
||||
You have managed to keep score of the number of wins you have against the micro:bit. However, what about losses? Let's begin by creating another global variable to keep track of losses.
|
||||
You have managed to keep score of the number of wins you have against the @boardname@. However, what about losses? Let's begin by creating another global variable to keep track of losses.
|
||||
|
||||
```
|
||||
var losses: number = 0
|
||||
@ -114,7 +114,7 @@ var losses: number = 0
|
||||
|
||||
### Step 22
|
||||
|
||||
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the micro:bit by 1. Let's hope that this button will not be pressed too often!
|
||||
Add a condition for when button `B` is pressed. When this occurs, we will increment your losses against the @boardname@ by 1. Let's hope that this button will not be pressed too often!
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -167,7 +167,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Step 24
|
||||
|
||||
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the micro:bit.
|
||||
Let's also display the score when button `B` is pressed, just as we have done for button `A`. This will help us keep track of the number of wins and losses you have against the @boardname@.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -198,7 +198,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
### Step 25
|
||||
|
||||
You have managed to keep track of both the wins and losses you have against the micro:bit! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
|
||||
You have managed to keep track of both the wins and losses you have against the @boardname@! But did you notice that you haven't updated something? Take a look at condition of `input->on button pressed("A")`.
|
||||
|
||||
```
|
||||
wins = 0
|
||||
@ -229,7 +229,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
})
|
||||
```
|
||||
|
||||
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the micro:bit can!
|
||||
* Tap the `run` button to run your game on the simulator. See if you can get more wins than the @boardname@ can!
|
||||
|
||||
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the micro:bit. Challenge your friends to see who can get a better score against the micro:bit.
|
||||
Congratulations! You have successfully created a fully functional game of rock, paper, scissors against the @boardname@. Challenge your friends to see who can get a better score against the @boardname@.
|
||||
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
Great job! You have successfully completed the [Running Time tutorial](/lessons/running-time/tutorial) . You have a forever loop that declares a variable in it that holds the running time in milliseconds of the micro:bit and then shows the seconds on the LED screen.
|
||||
Great job! You have successfully completed the [Running Time tutorial](/lessons/running-time/tutorial) . You have a forever loop that declares a variable in it that holds the running time in milliseconds of the @boardname@ and then shows the seconds on the LED screen.
|
||||
|
||||
```
|
||||
basic.forever(() => {
|
||||
|
@ -20,7 +20,7 @@ input.onScreenUp(() => {
|
||||
|
||||
**Challenge 1**
|
||||
|
||||
Now have the Micro:bit do something when the screen is moved downward. You can do this by calling the on screen down method. Do not do anything when you call the on screen down method.
|
||||
Now have the @boardname@ do something when the screen is moved downward. You can do this by calling the on screen down method. Do not do anything when you call the on screen down method.
|
||||
|
||||
```
|
||||
input.onScreenUp(() => {
|
||||
@ -39,7 +39,7 @@ input.onScreenDown(() => {
|
||||
|
||||
**Challenge 2**
|
||||
|
||||
When the Micro:bit is moved downward, create and show an image of an upside down heart.
|
||||
When the @boardname@ is moved downward, create and show an image of an upside down heart.
|
||||
|
||||
```
|
||||
input.onScreenUp(() => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
# set brightness challenges
|
||||
|
||||
These challenges will allow you to change the brightness of the micro:bit. docs
|
||||
These challenges will allow you to change the brightness of the @boardname@. docs
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
[This tutorial](/lessons/set-brightness/tutorial) will show you how to set the brightness on the micro:bit.
|
||||
[This tutorial](/lessons/set-brightness/tutorial) will show you how to set the brightness on the @boardname@.
|
||||
|
||||
```
|
||||
led.setBrightness(255)
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
Welcome! This [guided tutorial](/pxjkww) introduces the basic show string method on the micro:bit.
|
||||
Welcome! This [guided tutorial](/pxjkww) introduces the basic show string method on the @boardname@.
|
||||
|
||||
Let's show the string 'Hello' on the LED screen. The string will scroll one character at a time from left to right.
|
||||
|
||||
|
@ -76,5 +76,5 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
**Challenge 3**
|
||||
|
||||
Give Micro a nickname and display it on the micro:bit!
|
||||
Give Micro a nickname and display it on the @boardname@!
|
||||
|
||||
|
@ -51,7 +51,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:
|
||||
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
This [guided tutorial](/lessons/yes-no/challenges) will show you how to display text on the micro:bit!
|
||||
This [guided tutorial](/lessons/yes-no/challenges) will show you how to display text on the @boardname@!
|
||||
|
||||
```
|
||||
basic.showString("ASK ME A QUESTION", 150)
|
||||
|
Reference in New Issue
Block a user