batch fixing ](/microbit/ -> ](/ links
This commit is contained in:
@ -13,11 +13,11 @@ Set or change the value of a variable
|
||||
|
||||
### Touch Develop
|
||||
|
||||
Use the assignment operator (:=) to set or change the value of a [local variable](/microbit/reference/variables/var) or a [global variable](/microbit/js/data).
|
||||
Use the assignment operator (:=) to set or change the value of a [local variable](/reference/variables/var) or a [global variable](/js/data).
|
||||
|
||||
### Declare a variable
|
||||
|
||||
Declare a new *local* variable using the [var](/microbit/reference/variables/var) statement and the assignment operator (`:=`). Like this:
|
||||
Declare a new *local* variable using the [var](/reference/variables/var) statement and the assignment operator (`:=`). Like this:
|
||||
|
||||
```blocks
|
||||
let num1 = 7
|
||||
@ -28,7 +28,7 @@ The variable's name is on the left of the assignment operator (`:=`) and the var
|
||||
|
||||
*variable name* `:=` *value*
|
||||
|
||||
See [global variable](/microbit/js/data) for info on declaring a global variable.
|
||||
See [global variable](/js/data) for info on declaring a global variable.
|
||||
|
||||
### Change a variable
|
||||
|
||||
@ -42,13 +42,13 @@ num1 = 42
|
||||
### Notes
|
||||
|
||||
* Don't confuse the assignment operator `:=` with the equality operator `=`, which is used to compare values.
|
||||
* You can use the assignment operator `:=` with variables of each of the supported [types](/microbit/js/types).
|
||||
* You can use the assignment operator `:=` with variables of each of the supported [types](/js/types).
|
||||
|
||||
### Lessons
|
||||
|
||||
[counter](/microbit/lessons/counter), [rotation animation](/microbit/lessons/rotation-animation), [digital pet](/microbit/lessons/digital-pet), [offset image](/microbit/lessons/offset-image)
|
||||
[counter](/lessons/counter), [rotation animation](/lessons/rotation-animation), [digital pet](/lessons/digital-pet), [offset image](/lessons/offset-image)
|
||||
|
||||
### See also
|
||||
|
||||
[local variables](/microbit/reference/variables/var), [global variables](/microbit/js/data), [types](/microbit/js/types)
|
||||
[local variables](/reference/variables/var), [global variables](/js/data), [types](/js/types)
|
||||
|
||||
|
@ -6,18 +6,18 @@ Functions in the Bits library.
|
||||
|
||||
The binary numeral system represents numeric values using values 0 and 1. This is how almost all modern computers store data. Each 0 or 1 digit is called a binary digit, or bit for short.
|
||||
|
||||
The Bits library includes functions for bit-level manipulation of integers. In the [Touch Develop editor](/microbit/js/editor), click `bits` to see the following bit functions:
|
||||
The Bits library includes functions for bit-level manipulation of integers. In the [Touch Develop editor](/js/editor), click `bits` to see the following bit functions:
|
||||
|
||||
## Bitwise and, or, and xor functions
|
||||
|
||||
#### Syntax
|
||||
|
||||
bits `->` *and/or/xor* uint32 (x : [Number](/microbit/reference/types/number), y : [Number](/microbit/reference/types/number)) *returns* [Number](/microbit/reference/types/number)
|
||||
bits `->` *and/or/xor* uint32 (x : [Number](/reference/types/number), y : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
|
||||
|
||||
#### Parameters
|
||||
|
||||
* x - an unsigned 32 bit integer [Number](/microbit/reference/types/number)
|
||||
* y - another unsigned 32 bit integer [Number](/microbit/reference/types/number)
|
||||
* x - an unsigned 32 bit integer [Number](/reference/types/number)
|
||||
* y - another unsigned 32 bit integer [Number](/reference/types/number)
|
||||
|
||||
### and uint32
|
||||
|
||||
@ -37,14 +37,14 @@ Rotate bits to the left or the right, by the specified number of positions.
|
||||
|
||||
#### Syntax
|
||||
|
||||
bits `->` rotate left unint32 (x : [Number](/microbit/reference/types/number), bits : [Number](/microbit/reference/types/number)) *returns* [Number](/microbit/reference/types/number)
|
||||
bits `->` rotate left unint32 (x : [Number](/reference/types/number), bits : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
|
||||
|
||||
bits `->` rotate right unint32 (x : [Number](/microbit/reference/types/number), bits : [Number](/microbit/reference/types/number)) *returns* [Number](/microbit/reference/types/number)
|
||||
bits `->` rotate right unint32 (x : [Number](/reference/types/number), bits : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
|
||||
|
||||
#### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number);
|
||||
* bits - [Number](/microbit/reference/types/number);
|
||||
* x - [Number](/reference/types/number);
|
||||
* bits - [Number](/reference/types/number);
|
||||
|
||||
## Shift left and shift right
|
||||
|
||||
@ -52,16 +52,16 @@ Shift bits to the left or the right, by the specified number of positions.
|
||||
|
||||
#### Syntax
|
||||
|
||||
bits `->` shift left unint32 (x : [Number](/microbit/reference/types/number), bits : [Number](/microbit/reference/types/number)) *returns* [Number](/microbit/reference/types/number)
|
||||
bits `->` shift left unint32 (x : [Number](/reference/types/number), bits : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
|
||||
|
||||
bits `->` shift right unint32 (x : [Number](/microbit/reference/types/number), bits : [Number](/microbit/reference/types/number)) *returns* [Number](/microbit/reference/types/number)
|
||||
bits `->` shift right unint32 (x : [Number](/reference/types/number), bits : [Number](/reference/types/number)) *returns* [Number](/reference/types/number)
|
||||
|
||||
#### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number);
|
||||
* bits - [Number](/microbit/reference/types/number);
|
||||
* x - [Number](/reference/types/number);
|
||||
* bits - [Number](/reference/types/number);
|
||||
|
||||
### See also
|
||||
|
||||
[statements and operators](/microbit/js/statements), [math functions](/microbit/js/math), [Number](/microbit/reference/types/number)
|
||||
[statements and operators](/js/statements), [math functions](/js/math), [Number](/reference/types/number)
|
||||
|
||||
|
@ -4,7 +4,7 @@ true or false.
|
||||
|
||||
### @parent js/language
|
||||
|
||||
A Boolean has one of two possible values: `true`; `false`. Boolean (logical) operators (*and*, *or*, *not*) take Boolean inputs and yields a Boolean value. Comparison operators on other types ([numbers](/microbit/reference/types/number), [strings](/microbit/reference/types/string)) yields a Boolean value.
|
||||
A Boolean has one of two possible values: `true`; `false`. Boolean (logical) operators (*and*, *or*, *not*) take Boolean inputs and yields a Boolean value. Comparison operators on other types ([numbers](/reference/types/number), [strings](/reference/types/string)) yields a Boolean value.
|
||||
|
||||
### Block Editor
|
||||
|
||||
@ -16,7 +16,7 @@ The next three blocks represent the three Boolean (logic) operators:
|
||||
|
||||

|
||||
|
||||
The next six blocks represent comparison operators that yield a Boolean value. Most comparisons you will do involve [numbers](/microbit/reference/types/number):
|
||||
The next six blocks represent comparison operators that yield a Boolean value. Most comparisons you will do involve [numbers](/reference/types/number):
|
||||
|
||||

|
||||
|
||||
@ -31,7 +31,7 @@ let condition2 = true
|
||||
|
||||
### ~
|
||||
|
||||
Boolean values and operators are often used with an [if](/microbit/reference/logic/if) or [while](/microbit/js/while) statement to determine which code will execute next. For example:
|
||||
Boolean values and operators are often used with an [if](/reference/logic/if) or [while](/js/while) statement to determine which code will execute next. For example:
|
||||
|
||||
```
|
||||
if (condition && condition2) {
|
||||
@ -110,13 +110,13 @@ if (x < 5) {
|
||||
}
|
||||
```
|
||||
|
||||
See the documentation on [Numbers](/microbit/reference/types/number) for more information on comparing two Numbers. You can also [compare strings](/microbit/reference/types/string-functions) using the `equals` function.
|
||||
See the documentation on [Numbers](/reference/types/number) for more information on comparing two Numbers. You can also [compare strings](/reference/types/string-functions) using the `equals` function.
|
||||
|
||||
### Lessons
|
||||
|
||||
[rotation animation](/microbit/lessons/rotation-animation), [digi yoyo](/microbit/lessons/digi-yoyo), [love meter](/microbit/lessons/love-meter), [zoomer](/microbit/lessons/zoomer)
|
||||
[rotation animation](/lessons/rotation-animation), [digi yoyo](/lessons/digi-yoyo), [love meter](/lessons/love-meter), [zoomer](/lessons/zoomer)
|
||||
|
||||
### See also
|
||||
|
||||
[if](/microbit/reference/logic/if), [while](/microbit/js/while), [number](/microbit/reference/types/number)
|
||||
[if](/reference/logic/if), [while](/js/while), [number](/reference/types/number)
|
||||
|
||||
|
@ -5,7 +5,7 @@ Break statement; exit a for or while loop.
|
||||
### @parent js/language
|
||||
|
||||
|
||||
Exit a [while](/microbit/js/while) or [for](/microbit/reference/loops/for) loop before the loop is complete.
|
||||
Exit a [while](/js/while) or [for](/reference/loops/for) loop before the loop is complete.
|
||||
|
||||
### Touch Develop syntax
|
||||
|
||||
@ -29,9 +29,9 @@ for (let i = 0; i < 10; i++) {
|
||||
|
||||
### Lessons
|
||||
|
||||
[jailbreak](/microbit/lessons/jailbreak)
|
||||
[jailbreak](/lessons/jailbreak)
|
||||
|
||||
### See also
|
||||
|
||||
[for](/microbit/reference/loops/for), [while](/microbit/js/while)
|
||||
[for](/reference/loops/for), [while](/js/while)
|
||||
|
||||
|
@ -5,11 +5,11 @@ How to call a function in your code.
|
||||
### @parent js/language
|
||||
|
||||
|
||||
Type a function name in your code to call an existing [function](/microbit/js/function) in your script.
|
||||
Type a function name in your code to call an existing [function](/js/function) in your script.
|
||||
|
||||
### Call a function
|
||||
|
||||
1. In the Touch Develop editor, click a line of code to open the on-screen [Code Keyboard](/microbit/js/editor).
|
||||
1. In the Touch Develop editor, click a line of code to open the on-screen [Code Keyboard](/js/editor).
|
||||
|
||||
2. Click `code` to see the functions in your script.
|
||||
|
||||
@ -19,7 +19,7 @@ Type a function name in your code to call an existing [function](/microbit/js/fu
|
||||
|
||||
### Example: the square function
|
||||
|
||||
Here's a function called `square`, with a [Number](/microbit/reference/types/number) input parameter:
|
||||
Here's a function called `square`, with a [Number](/reference/types/number) input parameter:
|
||||
|
||||
```
|
||||
/**
|
||||
@ -59,5 +59,5 @@ To see a list of the functions in a script, open the script and then click `scri
|
||||
|
||||
### See also
|
||||
|
||||
[function parameters](/microbit/js/functionparameters), [create a function](/microbit/js/function), [return statement](/microbit/js/return)
|
||||
[function parameters](/js/functionparameters), [create a function](/js/function), [return statement](/js/return)
|
||||
|
||||
|
@ -9,7 +9,7 @@ To add a **functions** to your script, click the `script` button, then click the
|
||||
|
||||
### functions
|
||||
|
||||
A **function** takes [inputs](/microbit/actionparameters), runs code and (optionally) returns an output.
|
||||
A **function** takes [inputs](/actionparameters), runs code and (optionally) returns an output.
|
||||
|
||||
TouchDevelop functions are similar to `mathematical functions`. Consider the function that computes the square of `x`: `square(x) = x*x`. In code, it would look like this:
|
||||
|
||||
@ -27,5 +27,5 @@ An function can be marked as **private** in the properties. A private function i
|
||||
|
||||
### documentation
|
||||
|
||||
The comment(s) at the beginning of a function used to provide a description of its purpose. This text will show in the help area when the function is called from the code editor. This is particularly useful for [libraries](/microbit/libraries).
|
||||
The comment(s) at the beginning of a function used to provide a description of its purpose. This text will show in the help area when the function is called from the code editor. This is particularly useful for [libraries](/libraries).
|
||||
|
||||
|
@ -23,7 +23,7 @@ To insert a comment in a Touch Develop script:
|
||||
|
||||
### ~hint
|
||||
|
||||
To find out how to insert comments using the Blocks editor, see [the Blocks editor](/microbit/blocks/editor).
|
||||
To find out how to insert comments using the Blocks editor, see [the Blocks editor](/blocks/editor).
|
||||
|
||||
### ~
|
||||
|
||||
@ -46,7 +46,7 @@ export function square(x: number) : number {
|
||||
|
||||
### Formatting
|
||||
|
||||
Use [markdown syntax](/microbit/js/markdown) to format your comments (for example, **bold** and *italic* formatting).
|
||||
Use [markdown syntax](/js/markdown) to format your comments (for example, **bold** and *italic* formatting).
|
||||
|
||||
### Commenting out code
|
||||
|
||||
@ -58,7 +58,7 @@ To comment out a block of code:
|
||||
|
||||
2. Press and hold the Shift key, and then press the Down arrow key to select a block of code.
|
||||
|
||||
3. In the block editing window, scroll down to **surround with** and click `comment out`. This adds an [if](/microbit/reference/logic/if) statement around your code, like this:
|
||||
3. In the block editing window, scroll down to **surround with** and click `comment out`. This adds an [if](/reference/logic/if) statement around your code, like this:
|
||||
|
||||
```
|
||||
if (false) {
|
||||
@ -70,10 +70,10 @@ When you want to uncomment your code, click the `if false then` statement in you
|
||||
|
||||
### Library and function comments
|
||||
|
||||
* Use [comments](/microbit/js/comment) at the beginning of a library to describe the library
|
||||
* Use [comments](/microbit/js/comment) at the beginning of a [function](/microbit/js/function) to describe a function. The comment will appear in the help area of the Touch Develop editor when you insert the function
|
||||
* Use [comments](/js/comment) at the beginning of a library to describe the library
|
||||
* Use [comments](/js/comment) at the beginning of a [function](/js/function) to describe a function. The comment will appear in the help area of the Touch Develop editor when you insert the function
|
||||
|
||||
### See also
|
||||
|
||||
[markdown syntax](/microbit/js/markdown), [Touch Develop editor](/microbit/js/editor), [Block editor](/microbit/blocks/editor)
|
||||
[markdown syntax](/js/markdown), [Touch Develop editor](/js/editor), [Block editor](/blocks/editor)
|
||||
|
||||
|
@ -16,9 +16,9 @@ JavaScript docs for the micro:bit
|
||||
|
||||
Welcome to the Touch Develop home page for the BBC micro:bit. Below you will find resources about the Touch Develop programming language and code editor. Good places to start include:
|
||||
|
||||
* [the Touch Develop Editor](/microbit/js/editor)
|
||||
* [30+ BBC micro:bit lessons](/microbit/lessonss)
|
||||
* [offline support](/microbit/offline)
|
||||
* [the Touch Develop Editor](/js/editor)
|
||||
* [30+ BBC micro:bit lessons](/lessonss)
|
||||
* [offline support](/offline)
|
||||
|
||||
### ~column
|
||||
|
||||
@ -26,67 +26,67 @@ Welcome to the Touch Develop home page for the BBC micro:bit. Below you will fin
|
||||
|
||||
### Variables
|
||||
|
||||
* [local variables](/microbit/reference/variables/var)
|
||||
* [global variables ](/microbit/js/data)
|
||||
* [local variables](/reference/variables/var)
|
||||
* [global variables ](/js/data)
|
||||
|
||||
### Types
|
||||
|
||||
* [Number](/microbit/reference/types/number)
|
||||
* [Boolean](/microbit/reference/types/boolean)
|
||||
* [String](/microbit/reference/types/string)
|
||||
* [Image](/microbit/reference/image/image)
|
||||
* [Number](/reference/types/number)
|
||||
* [Boolean](/reference/types/boolean)
|
||||
* [String](/reference/types/string)
|
||||
* [Image](/reference/image/image)
|
||||
|
||||
### Statements and control structures
|
||||
|
||||
* [assignment operator](/microbit/reference/variables/assign) `:=`
|
||||
* [if](/microbit/reference/logic/if)
|
||||
* [for](/microbit/reference/loops/for)
|
||||
* [while](/microbit/js/while)
|
||||
* [break](/microbit/js/break)
|
||||
* [forever](/microbit/reference/basic/forever)
|
||||
* [in background](/microbit/reference/control/in-background)
|
||||
* [function](/microbit/js/function)
|
||||
* [return](/microbit/js/return)
|
||||
* [assignment operator](/reference/variables/assign) `:=`
|
||||
* [if](/reference/logic/if)
|
||||
* [for](/reference/loops/for)
|
||||
* [while](/js/while)
|
||||
* [break](/js/break)
|
||||
* [forever](/reference/basic/forever)
|
||||
* [in background](/reference/control/in-background)
|
||||
* [function](/js/function)
|
||||
* [return](/js/return)
|
||||
|
||||
### Maths
|
||||
|
||||
* arithmetic operators (`+`, `-`, `*`, `/`, mod) on [Numbers](/microbit/reference/types/number)
|
||||
* comparison operators (such as `>`, `=`) on [Numbers](/microbit/reference/types/number)
|
||||
* the [math](/microbit/js/math) library
|
||||
* the [bits](/microbit/js/bits) library
|
||||
* arithmetic operators (`+`, `-`, `*`, `/`, mod) on [Numbers](/reference/types/number)
|
||||
* comparison operators (such as `>`, `=`) on [Numbers](/reference/types/number)
|
||||
* the [math](/js/math) library
|
||||
* the [bits](/js/bits) library
|
||||
|
||||
### Logical
|
||||
|
||||
* [Boolean](/microbit/reference/types/boolean) values `true` and `false`
|
||||
* Operations (`not`, `or`, `and`) on [Booleans](/microbit/reference/types/boolean)
|
||||
* [Boolean](/reference/types/boolean) values `true` and `false`
|
||||
* Operations (`not`, `or`, `and`) on [Booleans](/reference/types/boolean)
|
||||
|
||||
### Strings
|
||||
|
||||
* [string functions](/microbit/reference/types/string-functions)
|
||||
* [string functions](/reference/types/string-functions)
|
||||
|
||||
### Functions
|
||||
|
||||
* [create a function](/microbit/js/function)
|
||||
* [function parameters](/microbit/js/functionparameters)
|
||||
* [call a function](/microbit/js/call)
|
||||
* [create a function](/js/function)
|
||||
* [function parameters](/js/functionparameters)
|
||||
* [call a function](/js/call)
|
||||
|
||||
### Collections
|
||||
|
||||
* read the [collections tutorial](/microbit/js/collections)
|
||||
* read the [collections tutorial](/js/collections)
|
||||
|
||||
### Custom object types
|
||||
|
||||
* see the [object types tutorial](/microbit/js/object-types)
|
||||
* read the [object disclaimer](/microbit/js/object-disclaimer) if you're an advanced user
|
||||
* see the [object types tutorial](/js/object-types)
|
||||
* read the [object disclaimer](/js/object-disclaimer) if you're an advanced user
|
||||
|
||||
### Libraries
|
||||
|
||||
* [create and use libraries](/microbit/js/libraries)
|
||||
* [create and use libraries](/js/libraries)
|
||||
|
||||
### Documentation
|
||||
|
||||
* [comments](/microbit/js/comment)
|
||||
* [markdown syntax](/microbit/js/markdown)
|
||||
* [comments](/js/comment)
|
||||
* [markdown syntax](/js/markdown)
|
||||
|
||||
### ~
|
||||
|
||||
@ -96,97 +96,97 @@ Welcome to the Touch Develop home page for the BBC micro:bit. Below you will fin
|
||||
|
||||
### Basic
|
||||
|
||||
* [clear screen](/microbit/reference/basic/clear-screen)
|
||||
* [forever](/microbit/reference/basic/forever)
|
||||
* [pause](/microbit/reference/basic/pause)
|
||||
* [show leds](/microbit/reference/basic/show-leds)
|
||||
* [show animation](/microbit/reference/basic/show-animation)
|
||||
* [show number](/microbit/reference/basic/show-number)
|
||||
* [show string](/microbit/reference/basic/show-string)
|
||||
* [clear screen](/reference/basic/clear-screen)
|
||||
* [forever](/reference/basic/forever)
|
||||
* [pause](/reference/basic/pause)
|
||||
* [show leds](/reference/basic/show-leds)
|
||||
* [show animation](/reference/basic/show-animation)
|
||||
* [show number](/reference/basic/show-number)
|
||||
* [show string](/reference/basic/show-string)
|
||||
|
||||
### LED
|
||||
|
||||
* [brightness](/microbit/reference/led/brightness)
|
||||
* [fade in](/microbit/reference/led/fade-in)
|
||||
* [fade out](/microbit/reference/led/fade-out)
|
||||
* [plot](/microbit/reference/led/plot)
|
||||
* [plot all](/microbit/reference/led/plot-all)
|
||||
* [point](/microbit/reference/led/point)
|
||||
* [screenshot](/microbit/functions/screenshot)
|
||||
* [set display mode](/microbit/functions/set-display-mode)
|
||||
* [set brightness](/microbit/reference/led/set-brightness)
|
||||
* [stop animation](/microbit/reference/led/stop-animation)
|
||||
* [toggle](/microbit/reference/led/toggle)
|
||||
* [toggle all](/microbit/reference/led/toggle-all)
|
||||
* [unplot](/microbit/reference/led/unplot)
|
||||
* [brightness](/reference/led/brightness)
|
||||
* [fade in](/reference/led/fade-in)
|
||||
* [fade out](/reference/led/fade-out)
|
||||
* [plot](/reference/led/plot)
|
||||
* [plot all](/reference/led/plot-all)
|
||||
* [point](/reference/led/point)
|
||||
* [screenshot](/functions/screenshot)
|
||||
* [set display mode](/functions/set-display-mode)
|
||||
* [set brightness](/reference/led/set-brightness)
|
||||
* [stop animation](/reference/led/stop-animation)
|
||||
* [toggle](/reference/led/toggle)
|
||||
* [toggle all](/reference/led/toggle-all)
|
||||
* [unplot](/reference/led/unplot)
|
||||
|
||||
### Input
|
||||
|
||||
* [acceleration](/microbit/reference/input/acceleration)
|
||||
* [rotation](/microbit/functions/rotation)
|
||||
* [button is pressed](/microbit/reference/input/button-is-pressed)
|
||||
* [compass heading](/microbit/reference/input/compass-heading)
|
||||
* [temperature](/microbit/reference/input/temperature)
|
||||
* [running time](/microbit/reference/input/running-time)
|
||||
* [on shake](/microbit/reference/input/on-gesture)
|
||||
* [on button pressed](/microbit/reference/input/on-button-pressed)
|
||||
* [on logo down](/microbit/functions/on-logo-down)
|
||||
* [on logo up](/microbit/functions/on-logo-up)
|
||||
* [on pin pressed](/microbit/reference/input/on-pin-pressed)
|
||||
* [on screen down](/microbit/functions/on-screen-down)
|
||||
* [on screen up](/microbit/functions/on-screen-up)
|
||||
* [pin is pressed](/microbit/reference/input/pin-is-pressed)
|
||||
* [acceleration](/reference/input/acceleration)
|
||||
* [rotation](/functions/rotation)
|
||||
* [button is pressed](/reference/input/button-is-pressed)
|
||||
* [compass heading](/reference/input/compass-heading)
|
||||
* [temperature](/reference/input/temperature)
|
||||
* [running time](/reference/input/running-time)
|
||||
* [on shake](/reference/input/on-gesture)
|
||||
* [on button pressed](/reference/input/on-button-pressed)
|
||||
* [on logo down](/functions/on-logo-down)
|
||||
* [on logo up](/functions/on-logo-up)
|
||||
* [on pin pressed](/reference/input/on-pin-pressed)
|
||||
* [on screen down](/functions/on-screen-down)
|
||||
* [on screen up](/functions/on-screen-up)
|
||||
* [pin is pressed](/reference/input/pin-is-pressed)
|
||||
|
||||
### Image
|
||||
|
||||
* [create image](/microbit/reference/images/create-image)
|
||||
* [clear](/microbit/reference/basic/clear-screen)
|
||||
* [pixel](/microbit/reference/images/pixel)
|
||||
* [plot frame](/microbit/reference/led/plot-frame)
|
||||
* [plot image](/microbit/reference/led/plot-image)
|
||||
* [scroll image](/microbit/reference/images/scroll-image)
|
||||
* [show frame](/microbit/functions/show-frame)
|
||||
* [set pixel](/microbit/reference/images/set-pixel)
|
||||
* [show image](/microbit/reference/images/show-image)
|
||||
* [width](/microbit/functions/width)
|
||||
* [create image](/reference/images/create-image)
|
||||
* [clear](/reference/basic/clear-screen)
|
||||
* [pixel](/reference/images/pixel)
|
||||
* [plot frame](/reference/led/plot-frame)
|
||||
* [plot image](/reference/led/plot-image)
|
||||
* [scroll image](/reference/images/scroll-image)
|
||||
* [show frame](/functions/show-frame)
|
||||
* [set pixel](/reference/images/set-pixel)
|
||||
* [show image](/reference/images/show-image)
|
||||
* [width](/functions/width)
|
||||
|
||||
### Music
|
||||
|
||||
* [play note](/microbit/functions/play-note)
|
||||
* [note](/microbit/functions/note)
|
||||
* [ring](/microbit/reference/music/ring)
|
||||
* [play note](/functions/play-note)
|
||||
* [note](/functions/note)
|
||||
* [ring](/reference/music/ring)
|
||||
|
||||
### Pins
|
||||
|
||||
* [digital read pin](/microbit/reference/pins/digital-read-pin)
|
||||
* [digital write pin](/microbit/reference/pins/digital-write-pin)
|
||||
* [analog read pin](/microbit/reference/pins/analog-read-pin)
|
||||
* [analog write pin](/microbit/reference/pins/analog-write-pin)
|
||||
* [analog set period](/microbit/reference/pins/analog-set-period)
|
||||
* [analog pitch](/microbit/reference/pins/analog-pitch)
|
||||
* [analog set pitch pin](/microbit/reference/pins/analog-set-pitch-pin)
|
||||
* [servo write pin](/microbit/reference/pins/servo-write-pin)
|
||||
* [servo set pulse](/microbit/reference/pins/servo-set-pulse)
|
||||
* [map](/microbit/functions/map)
|
||||
* [digital read pin](/reference/pins/digital-read-pin)
|
||||
* [digital write pin](/reference/pins/digital-write-pin)
|
||||
* [analog read pin](/reference/pins/analog-read-pin)
|
||||
* [analog write pin](/reference/pins/analog-write-pin)
|
||||
* [analog set period](/reference/pins/analog-set-period)
|
||||
* [analog pitch](/reference/pins/analog-pitch)
|
||||
* [analog set pitch pin](/reference/pins/analog-set-pitch-pin)
|
||||
* [servo write pin](/reference/pins/servo-write-pin)
|
||||
* [servo set pulse](/reference/pins/servo-set-pulse)
|
||||
* [map](/functions/map)
|
||||
|
||||
### Control
|
||||
|
||||
* [in background](/microbit/reference/control/in-background)
|
||||
* [reset](/microbit/functions/reset)
|
||||
* [in background](/reference/control/in-background)
|
||||
* [reset](/functions/reset)
|
||||
|
||||
### Devices
|
||||
|
||||
Functions in this category require to be connected to a remote device.
|
||||
|
||||
* [tell camera to](/microbit/reference/devices/tell-camera-to)
|
||||
* [tell remote control to](/microbit/reference/devices/tell-remote-control-to)
|
||||
* [raise alert to](/microbit/reference/devices/raise-alert-to)
|
||||
* [on notified](/microbit/reference/devices/on-notified)
|
||||
* [tell camera to](/reference/devices/tell-camera-to)
|
||||
* [tell remote control to](/reference/devices/tell-remote-control-to)
|
||||
* [raise alert to](/reference/devices/raise-alert-to)
|
||||
* [on notified](/reference/devices/on-notified)
|
||||
|
||||
### Libraries
|
||||
|
||||
* [game library](/microbit/js/game-library)
|
||||
* [serial library](/microbit/js/serial-library)
|
||||
* [game library](/js/game-library)
|
||||
* [serial library](/js/serial-library)
|
||||
|
||||
### ~
|
||||
|
||||
@ -194,23 +194,23 @@ Functions in this category require to be connected to a remote device.
|
||||
|
||||
## Run
|
||||
|
||||
* [scripts in the browser](/microbit/js/simulator)
|
||||
* [scripts on your BBC micro:bit](/microbit/device/usb)
|
||||
* [scripts in the browser](/js/simulator)
|
||||
* [scripts on your BBC micro:bit](/device/usb)
|
||||
|
||||
## Debugging
|
||||
|
||||
* use the [serial library](/microbit/js/serial-library) to print data from your micro:bit on your computer
|
||||
* learn about the [device error codes](/microbit/device/errors) that are displayed when sad faces occur
|
||||
* use the [serial library](/js/serial-library) to print data from your micro:bit on your computer
|
||||
* learn about the [device error codes](/device/errors) that are displayed when sad faces occur
|
||||
|
||||
## Edit/Publish
|
||||
|
||||
* [the Touch Develop Editor](/microbit/js/editor)
|
||||
* [publish a script](/microbit/js/publishing)
|
||||
* [the Touch Develop Editor](/js/editor)
|
||||
* [publish a script](/js/publishing)
|
||||
|
||||
## Creating Tutorials
|
||||
|
||||
* [create a tutorial](/microbit/js/create-tutorials)
|
||||
* [markdown syntax](/microbit/js/markdown)
|
||||
* [create a tutorial](/js/create-tutorials)
|
||||
* [markdown syntax](/js/markdown)
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -8,7 +8,7 @@ A variable is a place where you can store data so that you can use it later in y
|
||||
|
||||
### Block Editor
|
||||
|
||||
In the Block Editor, all variables are global. See [Block Editor](/microbit/blocks/editor) for info on creating global variables in a Block Editor script. The following block is used to set (assign) global variable's value:
|
||||
In the Block Editor, all variables are global. See [Block Editor](/blocks/editor) for info on creating global variables in a Block Editor script. The following block is used to set (assign) global variable's value:
|
||||
|
||||

|
||||
|
||||
@ -18,23 +18,23 @@ The block below retrieves (gets) the current value of a global variable:
|
||||
|
||||
### Touch Develop
|
||||
|
||||
In Touch Develop variables are either [global](/microbit/js/data) or [local](/microbit/reference/variables/var). Variables have a name, a [type](/microbit/js/types), and value:
|
||||
In Touch Develop variables are either [global](/js/data) or [local](/reference/variables/var). Variables have a name, a [type](/js/types), and value:
|
||||
|
||||
* the *name* is how you'll refer to the variable
|
||||
* the *type* refers to the kind of value a variable can store
|
||||
* the *value* refers to what's stored in the variable
|
||||
|
||||
[Global variables](/microbit/js/data) are variables that are available throughout your script. Unlike [local variables](/microbit/reference/variables/var), global variables are accessible across functions and in nested code blocks.
|
||||
[Global variables](/js/data) are variables that are available throughout your script. Unlike [local variables](/reference/variables/var), global variables are accessible across functions and in nested code blocks.
|
||||
|
||||
### Create a global variable
|
||||
|
||||
To create a new global variable:
|
||||
|
||||
1. In the Touch Develop [editor](/microbit/js/editor), click `script` (to the right of the search box).
|
||||
1. In the Touch Develop [editor](/js/editor), click `script` (to the right of the search box).
|
||||
|
||||
2. Click `+` **add new**.
|
||||
|
||||
3. Click `data->` **data** and then choose a [type](/microbit/js/types).
|
||||
3. Click `data->` **data** and then choose a [type](/js/types).
|
||||
|
||||
4. Enter a name for your global variable and click **OK**.
|
||||
|
||||
@ -42,7 +42,7 @@ To create a new global variable:
|
||||
|
||||
To use a global variable that you've declared (using steps above):
|
||||
|
||||
1. In the Touch Develop [editor](/microbit/js/editor), click `data-> ` **data** or `data->` + *variable name*.
|
||||
1. In the Touch Develop [editor](/js/editor), click `data-> ` **data** or `data->` + *variable name*.
|
||||
|
||||
2. Click `:=` (assignment).
|
||||
|
||||
@ -68,7 +68,7 @@ name2 = "Mike"
|
||||
bool = true
|
||||
```
|
||||
|
||||
(for info on creating image variables, see [Image](/microbit/reference/image/image))
|
||||
(for info on creating image variables, see [Image](/reference/image/image))
|
||||
|
||||
Once you've defined a variable and set it's initial value, use the variable's name whenever you need what's stored in the variable. For example, the following code gets the value stored in the global `counter` variable and shows it on the screen:
|
||||
|
||||
@ -76,7 +76,7 @@ Once you've defined a variable and set it's initial value, use the variable's na
|
||||
basic.showNumber(counter, 100)
|
||||
```
|
||||
|
||||
To change the contents of a variable use the [assignment operator](/microbit/reference/variables/assign) `:=`. The following code increments `counter` by 10:
|
||||
To change the contents of a variable use the [assignment operator](/reference/variables/assign) `:=`. The following code increments `counter` by 10:
|
||||
|
||||
```
|
||||
counter = counter + 10
|
||||
@ -86,7 +86,7 @@ counter = counter + 10
|
||||
|
||||
To **promote** a local variable to a global variable:
|
||||
|
||||
* select the local variable name and click `promote to data`. The [var](/microbit/reference/variables/var) keyword changes to the data symbol `data->`.
|
||||
* select the local variable name and click `promote to data`. The [var](/reference/variables/var) keyword changes to the data symbol `data->`.
|
||||
|
||||
To **demote** a global variable to a local variable:
|
||||
|
||||
@ -104,9 +104,9 @@ To see a list of the global variables in your script:
|
||||
|
||||
### Lessons
|
||||
|
||||
[counter](/microbit/lessons/counter), [rotation animation](/microbit/lessons/rotation-animation), [digital pet](/microbit/lessons/digital-pet), [offset image](/microbit/lessons/offset-image)
|
||||
[counter](/lessons/counter), [rotation animation](/lessons/rotation-animation), [digital pet](/lessons/digital-pet), [offset image](/lessons/offset-image)
|
||||
|
||||
### See also
|
||||
|
||||
[local variables](/microbit/reference/variables/var), [types](/microbit/js/types), [assignment operator](/microbit/reference/variables/assign)
|
||||
[local variables](/reference/variables/var), [types](/js/types), [assignment operator](/reference/variables/assign)
|
||||
|
||||
|
@ -5,7 +5,7 @@ The Touch Develop editor.
|
||||
### @parent js/contents
|
||||
|
||||
|
||||
The Touch Develop editor is where you write and test your code. If you're new to Touch Develop, check out the [Touch Develop editor video](/microbit/getting-started/touchdevelop-editor).
|
||||
The Touch Develop editor is where you write and test your code. If you're new to Touch Develop, check out the [Touch Develop editor video](/getting-started/touchdevelop-editor).
|
||||
|
||||
To create a new Touch Develop script:
|
||||
|
||||
@ -15,7 +15,7 @@ To create a new Touch Develop script:
|
||||
|
||||
3. Type a name for your script and click **create**.
|
||||
|
||||
An empty script with a [function](/microbit/js/function) called `main` is created.
|
||||
An empty script with a [function](/js/function) called `main` is created.
|
||||
|
||||
## The Editor Menu Bar
|
||||
|
||||
@ -24,8 +24,8 @@ The Touch Develop editor has a bar of options above the code area:
|
||||

|
||||
|
||||
* `my scripts` takes you back to a list of your scripts (My Scripts). The open script is automatically saved (in the cloud) when you leave the editor.
|
||||
* `run` executes your script, showing you the results on the on-screen micro:bit device. See [run scripts in the browser](/microbit/js/simulator) for more about this.
|
||||
* `compile` sends your script to an ARM compiler, which creates a file that you can run on your micro:bit. See [run scripts on your micro:bit](/microbit/device/usb) for more info.
|
||||
* `run` executes your script, showing you the results on the on-screen micro:bit device. See [run scripts in the browser](/js/simulator) for more about this.
|
||||
* `compile` sends your script to an ARM compiler, which creates a file that you can run on your micro:bit. See [run scripts on your micro:bit](/device/usb) for more info.
|
||||
* `undo` undoes changes that you made to your script.
|
||||
* `search code...` search for functions in libraries such as the micro:bit library.
|
||||
* `script` opens script options, where you can do things like publish and preview. See **script options** below.
|
||||
@ -34,7 +34,7 @@ Many of the above buttons aren't much use until you've written some code, so let
|
||||
|
||||
## Code Keyboard
|
||||
|
||||
The Code Keyboard makes it easy to write code on a touch screen device or by using your mouse. You can also type code using your computer keyboard if you know what function or statement you want (see [Touch Develop documentation](/microbit/js/contents) for a complete list).
|
||||
The Code Keyboard makes it easy to write code on a touch screen device or by using your mouse. You can also type code using your computer keyboard if you know what function or statement you want (see [Touch Develop documentation](/js/contents) for a complete list).
|
||||
|
||||
To open the Code Keyboard, click on a line of code:
|
||||
|
||||
@ -44,13 +44,13 @@ An on-screen keyboard appears, with buttons that vary depending on what's select
|
||||
|
||||
### Statements
|
||||
|
||||
The first row of the Code Keyboard has Touch Develop [statements](/microbit/js/statements) that you can insert into your code. These buttons are blue and include things like [var](/microbit/reference/variables/var), [if](/microbit/reference/logic/if), [for](/microbit/reference/loops/for) , and [while](/microbit/js/while). Click `more` to see additional statements.
|
||||
The first row of the Code Keyboard has Touch Develop [statements](/js/statements) that you can insert into your code. These buttons are blue and include things like [var](/reference/variables/var), [if](/reference/logic/if), [for](/reference/loops/for) , and [while](/js/while). Click `more` to see additional statements.
|
||||
|
||||
### The BBC micro:bit, math, and code buttons
|
||||
|
||||
* `micro:bit`: click to see all the [micro:bit functions](/microbit/js/contents); click `more` to scroll left to right. The micro:bit functions are also grouped together behind the following category buttons: `basic`, `control`, `input`, `image`, `led`, and`pins`
|
||||
* `code`: click to access functions you've written (see [call a function](/microbit/js/call) for more info)
|
||||
* `math`: click to see [math functions](/microbit/js/math); such as `abs` and `round`
|
||||
* `micro:bit`: click to see all the [micro:bit functions](/js/contents); click `more` to scroll left to right. The micro:bit functions are also grouped together behind the following category buttons: `basic`, `control`, `input`, `image`, `led`, and`pins`
|
||||
* `code`: click to access functions you've written (see [call a function](/js/call) for more info)
|
||||
* `math`: click to see [math functions](/js/math); such as `abs` and `round`
|
||||
* `bits`: click to see functions for bit-level manipulation of integers
|
||||
|
||||
### Editing code: add, copy, paste, and cut
|
||||
@ -68,7 +68,7 @@ To copy, cut, or comment out a block of code (more than one line):
|
||||
|
||||
2. Press and hold the `Shift` key, and then press the `Up arrow` or `Down arrow` key on your keyboard (this selects multiple lines).
|
||||
|
||||
3. Choose a block editing option like copy, cut, or [comment out](/microbit/js/comment).
|
||||
3. Choose a block editing option like copy, cut, or [comment out](/js/comment).
|
||||
|
||||
### Script options
|
||||
|
||||
@ -79,12 +79,12 @@ Click `script` (in the upper-right corner) to open the script options:
|
||||
Here you'll find options like...
|
||||
|
||||
* `script properties`: the script name, description, and whether or not the script is a library (more info below)
|
||||
* `publish`: share a script with other users by [publishing](/microbit/js/publishing) it
|
||||
* `share`: share a link to a published script (see [publish as script](/microbit/js/publishing) for more info)
|
||||
* `publish`: share a script with other users by [publishing](/js/publishing) it
|
||||
* `share`: share a link to a published script (see [publish as script](/js/publishing) for more info)
|
||||
* `preview`: preview a documentation script
|
||||
* `+` `add new`: add a new [function](/microbit/js/function), [global variable](/microbit/js/data), picture, or library to a script
|
||||
* `+` `add new`: add a new [function](/js/function), [global variable](/js/data), picture, or library to a script
|
||||
* *code*: the functions in your script; click a function to open it in the editor
|
||||
* *global vars*: the [global variables](/microbit/js/data) in your script; click a variable to go to that variable
|
||||
* *global vars*: the [global variables](/js/data) in your script; click a variable to go to that variable
|
||||
* *libraries*: the libraries added to your script
|
||||
* *art*: picture and video resources added to your script
|
||||
|
||||
@ -100,13 +100,13 @@ To edit a script's properties, click `script` (in the upper-right corner), and t
|
||||
|
||||
### Comments
|
||||
|
||||
Comments are notes within your scripts. To learn how to insert comments into your scripts, see [Comments](/microbit/js/comment). You can format your comments using [markdown syntax](/microbit/js/markdown).
|
||||
Comments are notes within your scripts. To learn how to insert comments into your scripts, see [Comments](/js/comment). You can format your comments using [markdown syntax](/js/markdown).
|
||||
|
||||
### Share your scripts
|
||||
|
||||
Share your scripts with other people by publishing them. See [publish a script](/microbit/js/publishing) for more info.
|
||||
Share your scripts with other people by publishing them. See [publish a script](/js/publishing) for more info.
|
||||
|
||||
### See also
|
||||
|
||||
[publish a script](/microbit/js/publishing), [Touch Develop documentation](/microbit/js/contents)
|
||||
[publish a script](/js/publishing), [Touch Develop documentation](/js/contents)
|
||||
|
||||
|
@ -51,9 +51,9 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### To learn more
|
||||
|
||||
To learn more about how the BBC micro:bit queues up and schedules event handlers, see [the BBC micro:bit - a reactive system](/microbit/device/reactive)
|
||||
To learn more about how the BBC micro:bit queues up and schedules event handlers, see [the BBC micro:bit - a reactive system](/device/reactive)
|
||||
|
||||
### see also
|
||||
|
||||
[on button pressed](/microbit/reference/input/on-button-pressed), [on logo up](/microbit/functions/on-logo-up), [on logo down](/microbit/functions/on-logo-down), [on screen up](/microbit/functions/on-screen-up), [on screen down](/microbit/functions/on-screen-down), [on shake](/microbit/reference/input/on-gesture), [on pin pressed](/microbit/reference/input/on-pin-pressed)
|
||||
[on button pressed](/reference/input/on-button-pressed), [on logo up](/functions/on-logo-up), [on logo down](/functions/on-logo-down), [on screen up](/functions/on-screen-up), [on screen down](/functions/on-screen-down), [on shake](/reference/input/on-gesture), [on pin pressed](/reference/input/on-pin-pressed)
|
||||
|
||||
|
@ -55,7 +55,7 @@ for (let i = 0; i < 5; i++) {
|
||||
|
||||
### Example: draw a box
|
||||
|
||||
The [LED screen](/microbit/device/screen) has a fixed number of rows and columns (5x5), which is ideal for a for loop. This example uses a for loop to turn on the LEDs along the edge of the screen, making a square.
|
||||
The [LED screen](/device/screen) has a fixed number of rows and columns (5x5), which is ideal for a for loop. This example uses a for loop to turn on the LEDs along the edge of the screen, making a square.
|
||||
|
||||
```
|
||||
for (let i1 = 0; i1 < 5; i1++) {
|
||||
@ -69,15 +69,15 @@ for (let i1 = 0; i1 < 5; i1++) {
|
||||
|
||||
### ~hint
|
||||
|
||||
Want to exit a loop early? The [break](/microbit/js/break) statement exits a loop before the end value is reached.
|
||||
Want to exit a loop early? The [break](/js/break) statement exits a loop before the end value is reached.
|
||||
|
||||
### ~
|
||||
|
||||
### Lessons
|
||||
|
||||
[looper](/microbit/lessons/looper), [strobe light](/microbit/lessons/strobe-light)
|
||||
[looper](/lessons/looper), [strobe light](/lessons/strobe-light)
|
||||
|
||||
### See also
|
||||
|
||||
[while](/microbit/js/while), [break](/microbit/js/break), [if](/microbit/reference/logic/if)
|
||||
[while](/js/while), [break](/js/break), [if](/reference/logic/if)
|
||||
|
||||
|
@ -7,7 +7,7 @@ How to define a function with input and output parameters.
|
||||
|
||||
A function is a unit of code that performs a specific task and returns a result.
|
||||
|
||||
Functions are ideal when you need to perform an action multiple times. Instead of repeating a block of code in your script, you can put the code in a function and simply [call the function](/microbit/js/call) when needed.
|
||||
Functions are ideal when you need to perform an action multiple times. Instead of repeating a block of code in your script, you can put the code in a function and simply [call the function](/js/call) when needed.
|
||||
|
||||
*Why use functions?* Functions makes your code easier to read, debug, and update.
|
||||
|
||||
@ -40,10 +40,10 @@ Click the function name to edit the function properties (i.e. change the name or
|
||||
|
||||
Functions have three parts:
|
||||
|
||||
* [input and output parameters](/microbit/js/functionparameters)
|
||||
* [input and output parameters](/js/functionparameters)
|
||||
* the function *body* (the code that performs a task)
|
||||
|
||||
- one or more [return](/microbit/js/return) statements (the output of the function)
|
||||
- one or more [return](/js/return) statements (the output of the function)
|
||||
|
||||
#### Example function
|
||||
|
||||
@ -61,8 +61,8 @@ export function square(x: number) : number {
|
||||
|
||||
In the above code...
|
||||
|
||||
* ``x `` is the [input parameter](/microbit/js/functionparameters) ([Number](/microbit/reference/types/number) type)
|
||||
* ``result`` is the [output parameter](/microbit/js/functionparameters) ([Number](/microbit/reference/types/number) type)
|
||||
* ``x `` is the [input parameter](/js/functionparameters) ([Number](/reference/types/number) type)
|
||||
* ``result`` is the [output parameter](/js/functionparameters) ([Number](/reference/types/number) type)
|
||||
* `return x * x` is the function body (which returns the value of the expression `x * x`)
|
||||
|
||||
### Add function parameters
|
||||
@ -75,7 +75,7 @@ In the above code...
|
||||
|
||||
4. Click **add input parameter** or **add output parameter**. The parameter is added to your function.
|
||||
|
||||
Click the parameter name to rename it and click the [type](/microbit/js/types) to change the variable type. For more info, see [function parameters](/microbit/js/functionparameters).
|
||||
Click the parameter name to rename it and click the [type](/js/types) to change the variable type. For more info, see [function parameters](/js/functionparameters).
|
||||
|
||||
### ~hide
|
||||
|
||||
@ -93,7 +93,7 @@ If you've already written some code that you'd like to have in a function, you c
|
||||
|
||||
### Function documentation
|
||||
|
||||
Use a [comment](/microbit/js/comment) at the beginning of your functions to describe the function. When you insert a function into your code, the comment text appears in the help area of the Code Keyboard.
|
||||
Use a [comment](/js/comment) at the beginning of your functions to describe the function. When you insert a function into your code, the comment text appears in the help area of the Code Keyboard.
|
||||
|
||||
### See all your functions
|
||||
|
||||
@ -109,9 +109,9 @@ If you don't want people to see the code in your function, you can make the func
|
||||
|
||||
### Lessons
|
||||
|
||||
[digital pet](/microbit/lessons/digital-pet)
|
||||
[digital pet](/lessons/digital-pet)
|
||||
|
||||
### See also
|
||||
|
||||
[function parameters](/microbit/js/functionparameters), [call a function](/microbit/js/call), [return from a function](/microbit/js/return)
|
||||
[function parameters](/js/functionparameters), [call a function](/js/call), [return from a function](/js/return)
|
||||
|
||||
|
@ -5,9 +5,9 @@ How to use parameters to pass info in and out of an function.
|
||||
### @parent js/function
|
||||
|
||||
|
||||
A [function](/microbit/js/function) can have multiple input parameters and/or a single output parameter. The parameters must be one of the supported variable [types](/microbit/js/types).
|
||||
A [function](/js/function) can have multiple input parameters and/or a single output parameter. The parameters must be one of the supported variable [types](/js/types).
|
||||
|
||||
When you first [create a function](/microbit/js/function), it looks like this:
|
||||
When you first [create a function](/js/function), it looks like this:
|
||||
```
|
||||
export function doStuff() {
|
||||
}
|
||||
@ -25,18 +25,18 @@ export function doStuff() {
|
||||
|
||||
#### Input parameters
|
||||
|
||||
The default type for an input parameter is [Number](/microbit/reference/types/number):
|
||||
The default type for an input parameter is [Number](/reference/types/number):
|
||||
|
||||
```
|
||||
export function oneInput(p: number) {
|
||||
}
|
||||
```
|
||||
|
||||
To change the default type, click the type ([Number](/microbit/reference/types/number) in this case) and change it to [String](/microbit/reference/types/string), [Boolean](/microbit/reference/types/boolean), or [Image](/microbit/reference/image/image). You can add multiple input parameters to a function.
|
||||
To change the default type, click the type ([Number](/reference/types/number) in this case) and change it to [String](/reference/types/string), [Boolean](/reference/types/boolean), or [Image](/reference/image/image). You can add multiple input parameters to a function.
|
||||
|
||||
#### Output parameter
|
||||
|
||||
the default type for an output parameter is [Number](/microbit/reference/types/number):
|
||||
the default type for an output parameter is [Number](/reference/types/number):
|
||||
|
||||
```
|
||||
export function output() : number {
|
||||
@ -46,7 +46,7 @@ export function output() : number {
|
||||
}
|
||||
```
|
||||
|
||||
To change the default type, click the type ([Number](/microbit/reference/types/number) in this case) and change it to [String](/microbit/reference/types/string), [Boolean](/microbit/reference/types/boolean), or [Image](/microbit/reference/image/image).
|
||||
To change the default type, click the type ([Number](/reference/types/number) in this case) and change it to [String](/reference/types/string), [Boolean](/reference/types/boolean), or [Image](/reference/image/image).
|
||||
|
||||
### Inputs and output function
|
||||
|
||||
@ -62,5 +62,5 @@ export function inputsAndOutput(p: number, q: number) : number {
|
||||
|
||||
### See also
|
||||
|
||||
[call a function](/microbit/js/call), [create a function](/microbit/js/function), [return](/microbit/js/return)
|
||||
[call a function](/js/call), [create a function](/js/function), [return](/js/return)
|
||||
|
||||
|
@ -9,34 +9,34 @@ Overview of Touch Develop lessons for the BBC micro:bit.
|
||||
|
||||
## Maker
|
||||
|
||||
* [Telegraph](/microbit/pzeagwoudd), play the telegraph game between 2 BBC micro:bits
|
||||
* [Ornament Chain](/microbit/rnvpgo), play the ornament chain game between 2 BBC micro:bits
|
||||
* [Telegraph](/pzeagwoudd), play the telegraph game between 2 BBC micro:bits
|
||||
* [Ornament Chain](/rnvpgo), play the ornament chain game between 2 BBC micro:bits
|
||||
|
||||
### ~hide
|
||||
|
||||
* [The Watch](/microbit/lessons/the-watch), design and create The Watch
|
||||
* [Hack your headphones](/microbit/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/microbit/lessons/banana-keyboard), create music with fruits
|
||||
* [The Watch](/lessons/the-watch), design and create The Watch
|
||||
* [Hack your headphones](/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/lessons/banana-keyboard), create music with fruits
|
||||
|
||||
### ~
|
||||
|
||||
## Beginner
|
||||
|
||||
* [Night light](/microbit/vltwrzuqto), dim the LEDs with set brightness
|
||||
* [Beautiful image](/microbit/nudwzmphyx), show a beautiful image with show LEDs
|
||||
* [Smiley,](/microbit/zsohipimef) smiley and frowney with show animation
|
||||
* [Lucky 7](/microbit/rqhxxqppqu), show a number on the LED screen with show number
|
||||
* [Answering machine](/microbit/bnkmeqymuh), show a text message with show string
|
||||
* [Snowflake fall](/microbit/zhcfmiejlg), repeat an animation with forever
|
||||
* [Screen wipe](/microbit/hlnitnqjjk), turn off the LEDs with clear screen
|
||||
* [Flashing heart](/microbit/bwmxfwqswx), display images with a pause
|
||||
* [Blink](/microbit/jbbutifslm), turn an LED on and off with plot
|
||||
* [Night light](/vltwrzuqto), dim the LEDs with set brightness
|
||||
* [Beautiful image](/nudwzmphyx), show a beautiful image with show LEDs
|
||||
* [Smiley,](/zsohipimef) smiley and frowney with show animation
|
||||
* [Lucky 7](/rqhxxqppqu), show a number on the LED screen with show number
|
||||
* [Answering machine](/bnkmeqymuh), show a text message with show string
|
||||
* [Snowflake fall](/zhcfmiejlg), repeat an animation with forever
|
||||
* [Screen wipe](/hlnitnqjjk), turn off the LEDs with clear screen
|
||||
* [Flashing heart](/bwmxfwqswx), display images with a pause
|
||||
* [Blink](/jbbutifslm), turn an LED on and off with plot
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Bounce image](/microbit/lessons/bounce-image), scroll an image across the screen on shake
|
||||
* [Magic logo](/microbit/lessons/magic-logo), show an image on logo up
|
||||
* [Glowing sword](/microbit/lessons/glowing-sword), make a glowing sword with fade in and fade out
|
||||
* [Bounce image](/lessons/bounce-image), scroll an image across the screen on shake
|
||||
* [Magic logo](/lessons/magic-logo), show an image on logo up
|
||||
* [Glowing sword](/lessons/glowing-sword), make a glowing sword with fade in and fade out
|
||||
|
||||
### ~
|
||||
|
||||
@ -44,24 +44,24 @@ Overview of Touch Develop lessons for the BBC micro:bit.
|
||||
|
||||
## Intermediate
|
||||
|
||||
* [Zoomer](/microbit/fwrohhjqql), measure the force with acceleration
|
||||
* [Strobe light](/microbit/jguqlzeayr), develop shapes with a nested for loops
|
||||
* [Digi yoyo](/microbit/lppocrbpys), create a counter with a while loop
|
||||
* [Die roll](/microbit/lzblatmknq), spin with more if statements
|
||||
* [Spinner](/microbit/dzijduruek), spin the arrow with multiple if statements
|
||||
* [Truth or dare](/microbit/filuzbwauo), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Love meter](/microbit/rrmlrvojfa), create a love meter with on pin pressed
|
||||
* [Guess the number](/microbit/ftsenbvqwz), guess a random number with random
|
||||
* [Magic 8](/microbit/fyjinpjuqu), a fortune teller game with the BBC micro:bit
|
||||
* [Counter](/microbit/rerlmjgjut), display a number with a variable
|
||||
* [Glowing pendulum](/microbit/xrnsveuwxj), construct a pendulum that glows using acceleration
|
||||
* [Looper](/microbit/nxcddtbizi), display a series of numbers with a for loop index
|
||||
* [Zoomer](/fwrohhjqql), measure the force with acceleration
|
||||
* [Strobe light](/jguqlzeayr), develop shapes with a nested for loops
|
||||
* [Digi yoyo](/lppocrbpys), create a counter with a while loop
|
||||
* [Die roll](/lzblatmknq), spin with more if statements
|
||||
* [Spinner](/dzijduruek), spin the arrow with multiple if statements
|
||||
* [Truth or dare](/filuzbwauo), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Love meter](/rrmlrvojfa), create a love meter with on pin pressed
|
||||
* [Guess the number](/ftsenbvqwz), guess a random number with random
|
||||
* [Magic 8](/fyjinpjuqu), a fortune teller game with the BBC micro:bit
|
||||
* [Counter](/rerlmjgjut), display a number with a variable
|
||||
* [Glowing pendulum](/xrnsveuwxj), construct a pendulum that glows using acceleration
|
||||
* [Looper](/nxcddtbizi), display a series of numbers with a for loop index
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Rotation animation](/microbit/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Offset image](/microbit/lessons/offset-image), shift an image horizontally with image offset
|
||||
* [Compass](/microbit/lessons/compass), displays the direction the BBC micro:bit is pointing
|
||||
* [Rotation animation](/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Offset image](/lessons/offset-image), shift an image horizontally with image offset
|
||||
* [Compass](/lessons/compass), displays the direction the BBC micro:bit is pointing
|
||||
|
||||
### ~
|
||||
|
||||
@ -69,38 +69,38 @@ Overview of Touch Develop lessons for the BBC micro:bit.
|
||||
|
||||
## Advanced
|
||||
|
||||
* [Rock paper scissors](/microbit/tnmtbvyyma), use image offsets with local variables
|
||||
* [Digital pet](/microbit/vefocoajpb), a display of pet images with sub-functions
|
||||
* [Catch the egg](/microbit/reczlreqob), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/microbit/bzrusu), create a charades game with a collection of strings that hold the words
|
||||
* [Prank WiFi](/microbit/dceikq), create fake WiFi to trick your friends
|
||||
* [Flipping bird](/microbit/lbhvywjzkv), use modulo with a conditional
|
||||
* [Runaway pac man](/microbit/loafab), construct the game pac man with the BBC micro:bit
|
||||
* [Line of Fire](/microbit/fzcoly), make a game to test hand-eye coordination
|
||||
* [The hat game](/microbit/njynsd), make a game to test your focus on the moving ball
|
||||
* [Pong](/microbit/xcenyy), a light bouncing from left to right
|
||||
* [Meteorite](/microbit/zaidka), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/microbit/jaeeve), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/microbit/zlpndm), a game where you have to keep up with the commands
|
||||
* [Letter Up](/microbit/ftlqjo), a guessing game with string operators with string at
|
||||
* [Racing Buttons](/microbit/hcuxid), racing game to determine if player 1 presses Button A faster or if player 2 presses Button B faster
|
||||
* [Rock paper scissors](/tnmtbvyyma), use image offsets with local variables
|
||||
* [Digital pet](/vefocoajpb), a display of pet images with sub-functions
|
||||
* [Catch the egg](/reczlreqob), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/bzrusu), create a charades game with a collection of strings that hold the words
|
||||
* [Prank WiFi](/dceikq), create fake WiFi to trick your friends
|
||||
* [Flipping bird](/lbhvywjzkv), use modulo with a conditional
|
||||
* [Runaway pac man](/loafab), construct the game pac man with the BBC micro:bit
|
||||
* [Line of Fire](/fzcoly), make a game to test hand-eye coordination
|
||||
* [The hat game](/njynsd), make a game to test your focus on the moving ball
|
||||
* [Pong](/xcenyy), a light bouncing from left to right
|
||||
* [Meteorite](/zaidka), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/jaeeve), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/zlpndm), a game where you have to keep up with the commands
|
||||
* [Letter Up](/ftlqjo), a guessing game with string operators with string at
|
||||
* [Racing Buttons](/hcuxid), racing game to determine if player 1 presses Button A faster or if player 2 presses Button B faster
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Transformers](/microbit/lessons/transformers), use functions to return values
|
||||
* [Speed button](/microbit/lessons/speed-button), code a speed game with running time
|
||||
* [Jailbreak](/microbit/lessons/jailbreak), break out of a counting loop by pressing button "A"
|
||||
* [2 player pong](/microbit/bzycll), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
* [Transformers](/lessons/transformers), use functions to return values
|
||||
* [Speed button](/lessons/speed-button), code a speed game with running time
|
||||
* [Jailbreak](/lessons/jailbreak), break out of a counting loop by pressing button "A"
|
||||
* [2 player pong](/bzycll), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
|
||||
### ~
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Number psych](/microbit/lessons/number-psych), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
* [Number psych](/lessons/number-psych), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
|
||||
### ~
|
||||
|
||||
### @section full
|
||||
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/microbit/lessons/teach)
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/lessons/teach)
|
||||
|
||||
|
@ -15,7 +15,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
game.startCountdown(10000)
|
||||
```
|
||||
|
||||
### [Countdown](/microbit/js/game-library/start-countdown)
|
||||
### [Countdown](/js/game-library/start-countdown)
|
||||
|
||||
If your game has a time limit, you can start a countdown in which case `game->current time` returns the remaining time.
|
||||
|
||||
@ -25,7 +25,7 @@ If your game has a time limit, you can start a countdown in which case `game->cu
|
||||
export function startCountdown(ms: number)
|
||||
```
|
||||
|
||||
### [Game over](/microbit/js/game-library/game-over)
|
||||
### [Game over](/js/game-library/game-over)
|
||||
|
||||
If the `life` reaches zero or the time expires (see countdown), the game enters the **game over** mode. When the game is over, `game->is running` returns false
|
||||
|
||||
@ -51,7 +51,7 @@ export function gameOver()
|
||||
|
||||
When a player achieves a goal, you can increase the game score
|
||||
|
||||
[Add Point to Score](/microbit/js/game-library/add-point-to-score)
|
||||
[Add Point to Score](/js/game-library/add-point-to-score)
|
||||
|
||||
* add score points to the current score
|
||||
|
||||
@ -59,7 +59,7 @@ When a player achieves a goal, you can increase the game score
|
||||
export function addScore(points: number)
|
||||
```
|
||||
|
||||
[Score](/microbit/js/game-library/score)
|
||||
[Score](/js/game-library/score)
|
||||
|
||||
* set the current score to a particular value.
|
||||
|
||||
@ -151,5 +151,5 @@ export function setBlink(sprite: micro_bitSprites.LedSprite, ms: number)
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/microbit/lessons/bop-it) | [game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
|
||||
|
@ -39,5 +39,5 @@ export function score() : number
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/microbit/lessons/bop-it) | [game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
|
||||
|
@ -39,5 +39,5 @@ export function score() : number
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/microbit/lessons/bop-it) | [game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
|
||||
|
@ -20,5 +20,5 @@ game.gameOver()
|
||||
|
||||
### Lessons
|
||||
|
||||
[game of chance](/microbit/lessons/game-of-chance)
|
||||
[game of chance](/lessons/game-of-chance)
|
||||
|
||||
|
@ -55,5 +55,5 @@ export function startCountdown(ms: number)
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/microbit/lessons/bop-it) | [game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
|
||||
|
@ -53,5 +53,5 @@ export function startCountdown(ms: number)
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/microbit/lessons/bop-it) | [game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
|
||||
|
@ -8,49 +8,49 @@ Overview of Games for the BBC micro:bit.
|
||||
|
||||
## Beginner Games
|
||||
|
||||
* [The Watch](/microbit/lessons/the-watch/activity), design and create The Watch
|
||||
* [Banana Keyboard](/microbit/lessons/banana-keyboard), create music with fruits
|
||||
* [The Watch](/lessons/the-watch/activity), design and create The Watch
|
||||
* [Banana Keyboard](/lessons/banana-keyboard), create music with fruits
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Smiley,](/microbit/lessons/smiley) smiley and frowney with show animation
|
||||
* [Lucky 7](/microbit/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Snowflake fall](/microbit/lessons/snowflake-fall), repeat an animation with forever
|
||||
* [Answering machine](/microbit/lessons/answering-machine), show a text message with show string
|
||||
* [Bounce image](/microbit/lessons/bounce-image), scroll an image across the screen on shake
|
||||
* [Magic logo](/microbit/lessons/magic-logo), show an image on logo up
|
||||
* [Screen wipe](/microbit/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Blink](/microbit/lessons/blink), turn an LED on and off with plot
|
||||
* [Flashing heart](/microbit/lessons/flashing-heart/tutorial), display images with a pause
|
||||
* [Smiley,](/lessons/smiley) smiley and frowney with show animation
|
||||
* [Lucky 7](/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Snowflake fall](/lessons/snowflake-fall), repeat an animation with forever
|
||||
* [Answering machine](/lessons/answering-machine), show a text message with show string
|
||||
* [Bounce image](/lessons/bounce-image), scroll an image across the screen on shake
|
||||
* [Magic logo](/lessons/magic-logo), show an image on logo up
|
||||
* [Screen wipe](/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Blink](/lessons/blink), turn an LED on and off with plot
|
||||
* [Flashing heart](/lessons/flashing-heart/tutorial), display images with a pause
|
||||
|
||||
### ~
|
||||
|
||||
* [Night light](/microbit/lessons/night-light/tutorial), dim the LEDs with set brightness
|
||||
* [Glowing sword](/microbit/lessons/glowing-sword/tutorial), make a glowing sword with fade in and fade out
|
||||
* [Guess the number](/microbit/lessons/guess-the-number/tutorial), guess a random number with random
|
||||
* [Rock paper scissors](/microbit/lessons/rock-paper-scissors/tutorial), use image offsets with local variables
|
||||
* [Counter](/microbit/lessons/counter/tutorial), display a number with a variable
|
||||
* [Love meter](/microbit/lessons/love-meter/tutorial), create a love meter with on pin pressed
|
||||
* [Night light](/lessons/night-light/tutorial), dim the LEDs with set brightness
|
||||
* [Glowing sword](/lessons/glowing-sword/tutorial), make a glowing sword with fade in and fade out
|
||||
* [Guess the number](/lessons/guess-the-number/tutorial), guess a random number with random
|
||||
* [Rock paper scissors](/lessons/rock-paper-scissors/tutorial), use image offsets with local variables
|
||||
* [Counter](/lessons/counter/tutorial), display a number with a variable
|
||||
* [Love meter](/lessons/love-meter/tutorial), create a love meter with on pin pressed
|
||||
|
||||
### ~column
|
||||
|
||||
## Intermediate Games
|
||||
|
||||
* [Truth or dare](/microbit/lessons/truth-or-dare/tutorial), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/microbit/lessons/spinner/tutorial), spin the arrow with multiple if statements
|
||||
* [Die roll](/microbit/lessons/die-roll/tutorial), spin with more if statements
|
||||
* [Looper](/microbit/lessons/looper/tutorial), display a series of numbers with a for loop index
|
||||
* [Strobe light](/microbit/lessons/strobe-light/tutorial), develop shapes with a nested for loops
|
||||
* [Digi yoyo](/microbit/lessons/digi-yoyo/tutorial), create a counter with a while loop
|
||||
* [Magic 8](/microbit/lessons/magic-8/tutorial), a fortune teller game with the BBC micro:bit
|
||||
* [Compass](/microbit/lessons/compass/tutorial), displays the direction the BBC micro:bit is pointing
|
||||
* [Speed button](/microbit/lessons/speed-button/tutorial), code a speed game with running time
|
||||
* [Truth or dare](/lessons/truth-or-dare/tutorial), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/lessons/spinner/tutorial), spin the arrow with multiple if statements
|
||||
* [Die roll](/lessons/die-roll/tutorial), spin with more if statements
|
||||
* [Looper](/lessons/looper/tutorial), display a series of numbers with a for loop index
|
||||
* [Strobe light](/lessons/strobe-light/tutorial), develop shapes with a nested for loops
|
||||
* [Digi yoyo](/lessons/digi-yoyo/tutorial), create a counter with a while loop
|
||||
* [Magic 8](/lessons/magic-8/tutorial), a fortune teller game with the BBC micro:bit
|
||||
* [Compass](/lessons/compass/tutorial), displays the direction the BBC micro:bit is pointing
|
||||
* [Speed button](/lessons/speed-button/tutorial), code a speed game with running time
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Zoomer](/microbit/lessons/zoomer/tutorial), measure the force with acceleration
|
||||
* [Rotation animation](/microbit/lessons/rotation-animation/tutorial), control an animation with a boolean variable
|
||||
* [Offset image](/microbit/lessons/offset-image/tutorial), shift an image horizontally with image offset
|
||||
* [Zoomer](/lessons/zoomer/tutorial), measure the force with acceleration
|
||||
* [Rotation animation](/lessons/rotation-animation/tutorial), control an animation with a boolean variable
|
||||
* [Offset image](/lessons/offset-image/tutorial), shift an image horizontally with image offset
|
||||
|
||||
### ~
|
||||
|
||||
@ -60,30 +60,30 @@ Overview of Games for the BBC micro:bit.
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Digital pet](/microbit/lessons/digital-pet/tutorial), a display of pet images with sub-functions
|
||||
* [Jailbreak](/microbit/lessons/jailbreak/tutorial), break out of a counting loop by pressing button "A"
|
||||
* [Transformers](/microbit/lessons/transformers/tutorial), use functions to return values
|
||||
* [Flipping bird](/microbit/lessons/flipping-bird/tutorial), use modulo with a conditional
|
||||
* [Digital pet](/lessons/digital-pet/tutorial), a display of pet images with sub-functions
|
||||
* [Jailbreak](/lessons/jailbreak/tutorial), break out of a counting loop by pressing button "A"
|
||||
* [Transformers](/lessons/transformers/tutorial), use functions to return values
|
||||
* [Flipping bird](/lessons/flipping-bird/tutorial), use modulo with a conditional
|
||||
|
||||
### ~
|
||||
|
||||
* [Catch the egg](/microbit/lessons/catch-the-egg-game/tutorial), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/microbit/lessons/headbands/tutorial), create a charades game with a collection of strings that hold the words
|
||||
* [Pong](/microbit/lessons/pong/tutorial), a light bouncing from left to right
|
||||
* [Meteorite](/microbit/lessons/meteorite/tutorial), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/microbit/lessons/minesweeper/tutorial), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/microbit/lessons/bop-it/tutorial), a game where you have to keep up with the commands
|
||||
* [Letter Up](/microbit/lessons/letter-up/tutorial), a guessing game with string operators with string at
|
||||
* [Prank WiFi](/microbit/lessons/prank-wifi/tutorial), create fake WiFi to trick your friends
|
||||
* [Runaway pac man](/microbit/lessons/runaway-pacman/tutorial), construct the game pac man with the BBC micro:bit
|
||||
* [The hat game](/microbit/lessons/the-hat-game/tutorial), make a game to test your focus on the moving ball
|
||||
* [2 player pong](/microbit/lessons/2-player-pong/tutorial), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
* [Catch the egg](/lessons/catch-the-egg-game/tutorial), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/lessons/headbands/tutorial), create a charades game with a collection of strings that hold the words
|
||||
* [Pong](/lessons/pong/tutorial), a light bouncing from left to right
|
||||
* [Meteorite](/lessons/meteorite/tutorial), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/lessons/minesweeper/tutorial), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/lessons/bop-it/tutorial), a game where you have to keep up with the commands
|
||||
* [Letter Up](/lessons/letter-up/tutorial), a guessing game with string operators with string at
|
||||
* [Prank WiFi](/lessons/prank-wifi/tutorial), create fake WiFi to trick your friends
|
||||
* [Runaway pac man](/lessons/runaway-pacman/tutorial), construct the game pac man with the BBC micro:bit
|
||||
* [The hat game](/lessons/the-hat-game/tutorial), make a game to test your focus on the moving ball
|
||||
* [2 player pong](/lessons/2-player-pong/tutorial), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Glowing pendulum](/microbit/lessons/glowing-pendulum/tutorial), construct a pendulum that glows using acceleration
|
||||
* [Line of Fire](/microbit/lessons/line-of-fire/tutorial), make a game to test hand-eye coordination
|
||||
* [Number psych](/microbit/lessons/number-psych/tutorial), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
* [Glowing pendulum](/lessons/glowing-pendulum/tutorial), construct a pendulum that glows using acceleration
|
||||
* [Line of Fire](/lessons/line-of-fire/tutorial), make a game to test hand-eye coordination
|
||||
* [Number psych](/lessons/number-psych/tutorial), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### Challenge 0
|
||||
|
||||
You have successfully following the [blink tutorial](/microbit/hcwxud). If not, then let's start the tutorial now. Your micro:bit script should start by displaying a blinking script on screen. We want to plot the x and y coordinates to 2, 2. Additionally, you will pause by 100 milliseconds then clear the screen of the micro:bit.
|
||||
You have successfully following the [blink tutorial](/hcwxud). If not, then let's start the tutorial now. Your micro:bit script should start by displaying a blinking script on screen. We want to plot the x and y coordinates to 2, 2. Additionally, you will pause by 100 milliseconds then clear the screen of the micro:bit.
|
||||
|
||||
Let's give it a go!
|
||||
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
This [guided tutorial](/microbit/xuhkviyyxa) introduces how to make an image look like it's scrolling across the micro:bit!
|
||||
This [guided tutorial](/xuhkviyyxa) introduces how to make an image look like it's scrolling across the micro:bit!
|
||||
|
||||
We can use an animation to make an image look like its moving!
|
||||
|
||||
|
@ -8,12 +8,12 @@ Overview of TouchDevelop lessons for the micro:bit.
|
||||
|
||||
### LED screen
|
||||
|
||||
* [plot guided](/microbit/hcwxud) `guided tutorial ` `video available`
|
||||
* [plots an LED](/microbit/njuzbvocit) [guided tutorial]
|
||||
* [blink symbols](/microbit/rfchtfjmag) `docs`
|
||||
* [clear screen](/microbit/jwqywu)
|
||||
* [point](/microbit/reference/led/point)
|
||||
* [set brightness](/microbit/tfrmcgdtxk)
|
||||
* [plot guided](/hcwxud) `guided tutorial ` `video available`
|
||||
* [plots an LED](/njuzbvocit) [guided tutorial]
|
||||
* [blink symbols](/rfchtfjmag) `docs`
|
||||
* [clear screen](/jwqywu)
|
||||
* [point](/reference/led/point)
|
||||
* [set brightness](/tfrmcgdtxk)
|
||||
|
||||
## micro:bit
|
||||
|
||||
@ -21,49 +21,49 @@ Overview of TouchDevelop lessons for the micro:bit.
|
||||
|
||||
### Basic
|
||||
|
||||
* [show number](/microbit/doxhko)
|
||||
* [show string](/microbit/hgsfxg)
|
||||
* [forever - show image](/microbit/bniyze) `guided tutorial`
|
||||
* [forever - show animation - two frames 1a](/microbit/rwsjmubtaa)
|
||||
* [forever - show animation - two frames 1c](/microbit/fomtaxxdkk)
|
||||
* [forever - show animation - two frames 1 d](/microbit/huguhgjmmn)
|
||||
* [forever - show animation - multliple frames](/microbit/tweyhx)
|
||||
* [show number](/doxhko)
|
||||
* [show string](/hgsfxg)
|
||||
* [forever - show image](/bniyze) `guided tutorial`
|
||||
* [forever - show animation - two frames 1a](/rwsjmubtaa)
|
||||
* [forever - show animation - two frames 1c](/fomtaxxdkk)
|
||||
* [forever - show animation - two frames 1 d](/huguhgjmmn)
|
||||
* [forever - show animation - multliple frames](/tweyhx)
|
||||
|
||||
## Language {#pconst}
|
||||
|
||||
### Variables
|
||||
|
||||
* [global variables ](/microbit/nkecii) `guided tutorial`
|
||||
* [local variable - create image, show image](/microbit/dcvnwv)
|
||||
* data types: [number](/microbit/reference/types/number), [boolean](/microbit/reference/types/boolean), [string](/microbit/reference/types/string), [image](/microbit/reference/image/image)
|
||||
* [global variables ](/nkecii) `guided tutorial`
|
||||
* [local variable - create image, show image](/dcvnwv)
|
||||
* data types: [number](/reference/types/number), [boolean](/reference/types/boolean), [string](/reference/types/string), [image](/reference/image/image)
|
||||
|
||||
### Statements and control structures
|
||||
|
||||
* [if](/microbit/reference/logic/if)
|
||||
* [for](/microbit/reference/loops/for)
|
||||
* [for loop nested - plot](/microbit/vpvhdnaqfm) **script**
|
||||
* [while](/microbit/js/while)
|
||||
* [while - show string, show number, show animation](/microbit/bidtzqdips) `docs`
|
||||
* [while - create image ](/microbit/bnqbom)
|
||||
* [return](/microbit/js/return)
|
||||
* [break](/microbit/js/break)
|
||||
* [function](/microbit/js/function)
|
||||
* [assignment operation](/microbit/reference/variables/assign) `:=`
|
||||
* [if](/reference/logic/if)
|
||||
* [for](/reference/loops/for)
|
||||
* [for loop nested - plot](/vpvhdnaqfm) **script**
|
||||
* [while](/js/while)
|
||||
* [while - show string, show number, show animation](/bidtzqdips) `docs`
|
||||
* [while - create image ](/bnqbom)
|
||||
* [return](/js/return)
|
||||
* [break](/js/break)
|
||||
* [function](/js/function)
|
||||
* [assignment operation](/reference/variables/assign) `:=`
|
||||
|
||||
### Maths
|
||||
|
||||
* arithmetic operators (`+`, `-`, `*`, `/`, mod) on [numbers](/microbit/reference/types/number)
|
||||
* comparison operators (such as `>`, `=`) on [numbers](/microbit/reference/types/number)
|
||||
* the [math](/microbit/js/math) library
|
||||
* the [bits](/microbit/js/bits) library
|
||||
* arithmetic operators (`+`, `-`, `*`, `/`, mod) on [numbers](/reference/types/number)
|
||||
* comparison operators (such as `>`, `=`) on [numbers](/reference/types/number)
|
||||
* the [math](/js/math) library
|
||||
* the [bits](/js/bits) library
|
||||
|
||||
### Logical
|
||||
|
||||
* boolean operators (`not`, `or`, `and`) on [booleans](/microbit/reference/types/boolean)
|
||||
* boolean operators (`not`, `or`, `and`) on [booleans](/reference/types/boolean)
|
||||
|
||||
### Strings
|
||||
|
||||
* concat operator combines [strings](/microbit/reference/types/string)
|
||||
* concat operator combines [strings](/reference/types/string)
|
||||
|
||||
### ~
|
||||
|
||||
@ -71,17 +71,17 @@ Overview of TouchDevelop lessons for the micro:bit.
|
||||
|
||||
### Input
|
||||
|
||||
* [button is pressed](/microbit/reference/input/button-is-pressed)
|
||||
* [on button pressed](/microbit/reference/input/on-button-pressed)
|
||||
* [acceleration](/microbit/reference/input/acceleration)
|
||||
* [compass heading](/microbit/reference/input/compass-heading)
|
||||
* [calibrate](/microbit/functions/calibrate)
|
||||
* [running time](/microbit/reference/input/running-time)
|
||||
* [on shake](/microbit/reference/input/on-gesture)
|
||||
* [on screen up](/microbit/functions/on-screen-up)
|
||||
* [on screen down](/microbit/functions/on-screen-down)
|
||||
* [on logo up](/microbit/functions/on-logo-up)
|
||||
* [on logo down](/microbit/functions/on-logo-down)
|
||||
* [button is pressed](/reference/input/button-is-pressed)
|
||||
* [on button pressed](/reference/input/on-button-pressed)
|
||||
* [acceleration](/reference/input/acceleration)
|
||||
* [compass heading](/reference/input/compass-heading)
|
||||
* [calibrate](/functions/calibrate)
|
||||
* [running time](/reference/input/running-time)
|
||||
* [on shake](/reference/input/on-gesture)
|
||||
* [on screen up](/functions/on-screen-up)
|
||||
* [on screen down](/functions/on-screen-down)
|
||||
* [on logo up](/functions/on-logo-up)
|
||||
* [on logo down](/functions/on-logo-down)
|
||||
|
||||
### ~
|
||||
|
||||
@ -89,42 +89,42 @@ Overview of TouchDevelop lessons for the micro:bit.
|
||||
|
||||
### Authoring & Other Bits
|
||||
|
||||
* [TouchDevelop editor](/microbit/js/editor)
|
||||
* [markdown](/microbit/js/markdown)
|
||||
* [creating interactive tutorials](/microbit/js/creatinginteractivetutorials)
|
||||
* [run scripts in a web browser](/microbit/js/simulator)
|
||||
* [run scripts on your micro:bit](/microbit/usb)
|
||||
* [libraries](/microbit/js/libraries)
|
||||
* [TouchDevelop editor](/js/editor)
|
||||
* [markdown](/js/markdown)
|
||||
* [creating interactive tutorials](/js/creatinginteractivetutorials)
|
||||
* [run scripts in a web browser](/js/simulator)
|
||||
* [run scripts on your micro:bit](/usb)
|
||||
* [libraries](/js/libraries)
|
||||
|
||||
### Functions and libraries
|
||||
|
||||
* [creating functions](/microbit/js/function)
|
||||
* [function parameters](/microbit/js/functionparameters)
|
||||
* [calling functions](/microbit/js/call)
|
||||
* [libraries](/microbit/js/libraries)
|
||||
* [creating functions](/js/function)
|
||||
* [function parameters](/js/functionparameters)
|
||||
* [calling functions](/js/call)
|
||||
* [libraries](/js/libraries)
|
||||
|
||||
### Images
|
||||
|
||||
* [create image](/microbit/reference/images/create-image)
|
||||
* [clear](/microbit/reference/basic/clear-screen)
|
||||
* [set pixel](/microbit/reference/images/set-pixel)
|
||||
* [pixel](/microbit/reference/images/pixel)
|
||||
* [show image](/microbit/reference/images/show-image)
|
||||
* [scroll image](/microbit/reference/images/scroll-image)
|
||||
* [width](/microbit/functions/width)
|
||||
* [show animation](/microbit/reference/basic/show-animation)
|
||||
* [create image](/reference/images/create-image)
|
||||
* [clear](/reference/basic/clear-screen)
|
||||
* [set pixel](/reference/images/set-pixel)
|
||||
* [pixel](/reference/images/pixel)
|
||||
* [show image](/reference/images/show-image)
|
||||
* [scroll image](/reference/images/scroll-image)
|
||||
* [width](/functions/width)
|
||||
* [show animation](/reference/basic/show-animation)
|
||||
|
||||
### Pins
|
||||
|
||||
* [analog read pin](/microbit/reference/pins/analog-read-pin)
|
||||
* [analog write pin](/microbit/reference/pins/analog-write-pin)
|
||||
* [digital read pin](/microbit/reference/pins/digital-read-pin)
|
||||
* [digital write pin](/microbit/reference/pins/digital-write-pin)
|
||||
* [analog read pin](/reference/pins/analog-read-pin)
|
||||
* [analog write pin](/reference/pins/analog-write-pin)
|
||||
* [digital read pin](/reference/pins/digital-read-pin)
|
||||
* [digital write pin](/reference/pins/digital-write-pin)
|
||||
|
||||
### Accessories
|
||||
|
||||
* [forever](/microbit/reference/basic/forever)
|
||||
* [in background](/microbit/reference/control/in-background)
|
||||
* [forever](/reference/basic/forever)
|
||||
* [in background](/reference/control/in-background)
|
||||
|
||||
## Tutorials
|
||||
|
||||
|
@ -30,22 +30,22 @@ The BBC micro:bit can be used to run an Hour Of Code™ events for beginner of a
|
||||
|
||||
Print the following **activities** (1 handout per student):
|
||||
|
||||
* [answering machine](/microbit/lessons/answering-machine/activity)
|
||||
* [happy birthday](/microbit/lessons/happy-birthday/activity)
|
||||
* [love meter](/microbit/lessons/love-meter/activity)
|
||||
* [answering machine](/lessons/answering-machine/activity)
|
||||
* [happy birthday](/lessons/happy-birthday/activity)
|
||||
* [love meter](/lessons/love-meter/activity)
|
||||
|
||||
Print the following **challenges** (1 handout per student):
|
||||
|
||||
* [answering machine](/microbit/lessons/answering-machine/challenges)
|
||||
* [happy birthday](/microbit/lessons/happy-birthday/challenges)
|
||||
* [love meter](/microbit/lessons/love-meter/challenges)
|
||||
* [answering machine](/lessons/answering-machine/challenges)
|
||||
* [happy birthday](/lessons/happy-birthday/challenges)
|
||||
* [love meter](/lessons/love-meter/challenges)
|
||||
|
||||
## Timeline
|
||||
|
||||
* ``00:00`` students enter the website address (see step 3)
|
||||
* ``10:00`` [answering machine](/microbit/lessons/answering-machine/activity)
|
||||
* ``25:00`` [happy birthday](/microbit/lessons/happy-birthday/activity)
|
||||
* ``35:00`` [love meter](/microbit/lessons/love-meter/activity)
|
||||
* ``10:00`` [answering machine](/lessons/answering-machine/activity)
|
||||
* ``25:00`` [happy birthday](/lessons/happy-birthday/activity)
|
||||
* ``35:00`` [love meter](/lessons/love-meter/activity)
|
||||
* ``55:00`` raffle
|
||||
* ``60:00`` that's it!
|
||||
|
||||
@ -53,7 +53,7 @@ Print the following **challenges** (1 handout per student):
|
||||
|
||||
After your Hour Of Code™, you will want to provide plenty of material for students to continue learning about coding. Here are some good places to start:
|
||||
|
||||
* [more challenges](/microbit/js/games) are available with BBC micro:bit Tutorials
|
||||
* [more challenges](/js/games) are available with BBC micro:bit Tutorials
|
||||
* [the Quick Start Guide for Teachers](http://www.slideshare.net/Microsofteduk/bbc-microbit-guide-from-hodder-education) are available within BBC micro:bit
|
||||
|
||||
The 'Hour of Code™' is a nationwide initiative by [Computer Science Education Week](http://csedweek.org) and [Code.org](http://code.org) to introduce millions of students to one hour of computer science and computer programming.
|
||||
|
@ -20,7 +20,7 @@ Create a classroom in https://www.microbit.co.uk and pre-populate the classroom
|
||||
|
||||
4) Print the activity challenges (1 copy per participant):
|
||||
|
||||
* [hour of code](/microbit/js/hourofcode/challenges)
|
||||
* [hour of code](/js/hourofcode/challenges)
|
||||
|
||||
4) (optional) Raffle tickets and prizes
|
||||
|
||||
@ -33,7 +33,7 @@ Bring more energy in the room by playing music.
|
||||
## Timeline
|
||||
|
||||
* ``00:00`` student sign in using **printed passwords** (see step 3)
|
||||
* ``10:00`` [hour of code tutorial](/microbit/js/hourofcode)
|
||||
* ``10:00`` [hour of code tutorial](/js/hourofcode)
|
||||
* ``40:00`` raffle and demoes
|
||||
* ``50:00`` that's it!
|
||||
|
||||
@ -41,7 +41,7 @@ Bring more energy in the room by playing music.
|
||||
|
||||
After your Hour Of Code™, you will want to provide plenty of material for students to continue learning about coding. Here are some good places to start:
|
||||
|
||||
* [more challenges](/microbit/lessonss) are available for BBC micro:bit
|
||||
* [more challenges](/lessonss) are available for BBC micro:bit
|
||||
* [the Quick Start Guide for Teachers](http://www.slideshare.net/Microsofteduk/bbc-microbit-guide-from-hodder-education) are available within BBC micro:bit
|
||||
|
||||
_The Hour of Code™ is a nationwide initiative by [Computer Science Education Week](http://csedweek.org) and [Code.org](http://code.org) to introduce millions of students to one hour of computer science and computer programming._
|
||||
|
@ -5,7 +5,7 @@ Run code based on a condition.
|
||||
### @parent js/language
|
||||
|
||||
|
||||
Conditionally run code depending on whether a [Boolean](/microbit/reference/types/boolean) condition is true or false.
|
||||
Conditionally run code depending on whether a [Boolean](/reference/types/boolean) condition is true or false.
|
||||
|
||||
### Block Editor
|
||||
|
||||
@ -33,7 +33,7 @@ if (condition) {
|
||||
|
||||
### Example: adjusting screen brightness
|
||||
|
||||
If the screen [brightness](/microbit/reference/led/brightness) is `< 100`, this code sets the brightness to `255`:
|
||||
If the screen [brightness](/reference/led/brightness) is `< 100`, this code sets the brightness to `255`:
|
||||
|
||||
```
|
||||
if (led.brightness() < 100) {
|
||||
@ -68,7 +68,7 @@ else {
|
||||
|
||||
### Example: compass heading
|
||||
|
||||
The following example gets the [compass heading](/microbit/reference/input/compass-heading) and then uses ``if-then-else`` statements to display a letter on the screen (N for north, E for East, S for South, and W for West).
|
||||
The following example gets the [compass heading](/reference/input/compass-heading) and then uses ``if-then-else`` statements to display a letter on the screen (N for north, E for East, S for South, and W for West).
|
||||
|
||||
```
|
||||
while (true) {
|
||||
@ -93,9 +93,9 @@ You can move an entire ``if`` block by clicking the ``if`` keyword and dragging
|
||||
|
||||
### Lessons
|
||||
|
||||
[love meter](/microbit/lessons/love-meter), [zoomer](/microbit/lessons/zoomer), [offset image](/microbit/lessons/offset-image)
|
||||
[love meter](/lessons/love-meter), [zoomer](/lessons/zoomer), [offset image](/lessons/offset-image)
|
||||
|
||||
### See also
|
||||
|
||||
[while loop](/microbit/js/while), [for](/microbit/reference/loops/for), [boolean](/microbit/reference/types/boolean)
|
||||
[while loop](/js/while), [for](/reference/loops/for), [boolean](/reference/types/boolean)
|
||||
|
||||
|
@ -4,11 +4,11 @@ An image for the micro:bit screen.
|
||||
|
||||
### @parent js/language
|
||||
|
||||
An *Image* is a matrix of pixels to show on the [LED screen](/microbit/device/screen)
|
||||
An *Image* is a matrix of pixels to show on the [LED screen](/device/screen)
|
||||
|
||||
### Touch Develop editor: plot an image
|
||||
|
||||
To display an image using the [Touch Develop editor](/microbit/js/editor):
|
||||
To display an image using the [Touch Develop editor](/js/editor):
|
||||
|
||||
* click `image` , `plot image`, and then `edit`
|
||||
* click the rectangles to create an image
|
||||
@ -30,11 +30,11 @@ basic.plotImage(`
|
||||
|
||||
### Creating an image
|
||||
|
||||
To create an image that you can later modify, see the [create image](/microbit/reference/images/create-image) function.
|
||||
To create an image that you can later modify, see the [create image](/reference/images/create-image) function.
|
||||
|
||||
### Block editor: create and show images
|
||||
|
||||
To create images using the [Block editor](/microbit/blocks/editor):
|
||||
To create images using the [Block editor](/blocks/editor):
|
||||
|
||||
1. Click the **Images** category on the left.
|
||||
|
||||
@ -46,26 +46,26 @@ To create images using the [Block editor](/microbit/blocks/editor):
|
||||
|
||||
### Global image variables
|
||||
|
||||
Images that you create in the [Touch Develop editor](/microbit/js/editor) are [local variables](/microbit/reference/variables/var). To promote a local image variable to a global variable, select the local image variable and click `promote to data`. The *var* keyword changes to the [data](/microbit/js/data) symbol `data->`.
|
||||
Images that you create in the [Touch Develop editor](/js/editor) are [local variables](/reference/variables/var). To promote a local image variable to a global variable, select the local image variable and click `promote to data`. The *var* keyword changes to the [data](/js/data) symbol `data->`.
|
||||
|
||||
### Image functions
|
||||
|
||||
* [create image](/microbit/reference/images/create-image): create an image from a series of on/off LED states
|
||||
* [clear](/microbit/reference/basic/clear-screen): turn off all the pixels in an image
|
||||
* [set pixel](/microbit/reference/images/set-pixel): set the state of a pixel in an image
|
||||
* [pixel](/microbit/reference/images/pixel): get the state of a pixel in an image
|
||||
* [plot-image](/microbit/reference/led/plot-image): show a single-frame image on the LED screen
|
||||
* [show animation](/microbit/reference/basic/show-animation): show a series of image frames
|
||||
* [show image](/microbit/reference/images/show-image): show an image on the screen
|
||||
* [scroll image](/microbit/reference/images/scroll-image): scroll an image on the screen
|
||||
* [width](/microbit/functions/width): get the width of an image
|
||||
* [create image](/reference/images/create-image): create an image from a series of on/off LED states
|
||||
* [clear](/reference/basic/clear-screen): turn off all the pixels in an image
|
||||
* [set pixel](/reference/images/set-pixel): set the state of a pixel in an image
|
||||
* [pixel](/reference/images/pixel): get the state of a pixel in an image
|
||||
* [plot-image](/reference/led/plot-image): show a single-frame image on the LED screen
|
||||
* [show animation](/reference/basic/show-animation): show a series of image frames
|
||||
* [show image](/reference/images/show-image): show an image on the screen
|
||||
* [scroll image](/reference/images/scroll-image): scroll an image on the screen
|
||||
* [width](/functions/width): get the width of an image
|
||||
|
||||
### Lessons
|
||||
|
||||
* [bounce image ](/microbit/lessons/bounce-image)
|
||||
* [offset image](/microbit/lessons/offset-image)
|
||||
* [bounce image ](/lessons/bounce-image)
|
||||
* [offset image](/lessons/offset-image)
|
||||
|
||||
### See also
|
||||
|
||||
[plot image](/microbit/reference/led/plot-image), [create image](/microbit/reference/images/create-image), [show image](/microbit/reference/images/show-image), [LED screen](/microbit/device/screen)
|
||||
[plot image](/reference/led/plot-image), [create image](/reference/images/create-image), [show image](/reference/images/show-image), [LED screen](/device/screen)
|
||||
|
||||
|
@ -8,53 +8,53 @@ Overview of Touch Develop lessons for the BBC micro:bit.
|
||||
|
||||
## Maker
|
||||
|
||||
* [The Watch](/microbit/lessons/the-watch), design and create The Watch
|
||||
* [Hack your Headphones](/microbit/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/microbit/lessons/banana-keyboard), create music with fruits
|
||||
* [Telegraph](/microbit/lessons/telegraph), play the telegraph game between 2 BBC micro:bits
|
||||
* [Ornament Chain](/microbit/lessons/ornament-chain), play the ornament chain game between 2 BBC micro:bits
|
||||
* [The Watch](/lessons/the-watch), design and create The Watch
|
||||
* [Hack your Headphones](/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/lessons/banana-keyboard), create music with fruits
|
||||
* [Telegraph](/lessons/telegraph), play the telegraph game between 2 BBC micro:bits
|
||||
* [Ornament Chain](/lessons/ornament-chain), play the ornament chain game between 2 BBC micro:bits
|
||||
|
||||
## Beginner
|
||||
|
||||
* [Beautiful Image](/microbit/lessons/beautiful-image), show a beautiful image with show LEDs
|
||||
* [Smiley,](/microbit/lessons/smiley) smiley and frowney with show animation
|
||||
* [Lucky 7](/microbit/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Answering Machine](/microbit/lessons/answering-machine), show a text message with show string
|
||||
* [Snowflake Fall](/microbit/lessons/snowflake-fall), repeat an animation with forever
|
||||
* [Beautiful Image](/lessons/beautiful-image), show a beautiful image with show LEDs
|
||||
* [Smiley,](/lessons/smiley) smiley and frowney with show animation
|
||||
* [Lucky 7](/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Answering Machine](/lessons/answering-machine), show a text message with show string
|
||||
* [Snowflake Fall](/lessons/snowflake-fall), repeat an animation with forever
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Bounce Image](/microbit/lessons/bounce-image), scroll an image across the screen on shake
|
||||
* [Bounce Image](/lessons/bounce-image), scroll an image across the screen on shake
|
||||
|
||||
### ~
|
||||
|
||||
* [Magic Logo](/microbit/lessons/magic-logo), show an image on logo up
|
||||
* [Screen Wipe](/microbit/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Flashing Heart](/microbit/lessons/flashing-heart), display images with a pause
|
||||
* [Blink](/microbit/lessons/blink), turn an LED on and off with plot
|
||||
* [Night Light](/microbit/lessons/night-light), dim the LEDs with set brightness
|
||||
* [Glowing Sword](/microbit/lessons/glowing-sword), make a glowing sword with fade in and fade out
|
||||
* [Magic Logo](/lessons/magic-logo), show an image on logo up
|
||||
* [Screen Wipe](/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Flashing Heart](/lessons/flashing-heart), display images with a pause
|
||||
* [Blink](/lessons/blink), turn an LED on and off with plot
|
||||
* [Night Light](/lessons/night-light), dim the LEDs with set brightness
|
||||
* [Glowing Sword](/lessons/glowing-sword), make a glowing sword with fade in and fade out
|
||||
|
||||
### ~column
|
||||
|
||||
## Intermediate
|
||||
|
||||
* [Magic 8](/microbit/lessons/magic-8), a fortune teller game with the BBC micro:bit
|
||||
* [Guess the Number](/microbit/lessons/guess-the-number), guess a random number with random
|
||||
* [Rock Paper Scissors](/microbit/lessons/rock-paper-scissors), use image offsets with local variables
|
||||
* [Counter](/microbit/lessons/counter), display a number with a variable
|
||||
* [Love meter](/microbit/lessons/love-meter), create a love meter with on pin pressed
|
||||
* [Zoomer](/microbit/lessons/zoomer), measure the force with acceleration
|
||||
* [Glowing Pendulum](/microbit/lessons/glowing-pendulum), construct a pendulum that glows using acceleration
|
||||
* [Truth or Dare](/microbit/lessons/truth-or-dare), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/microbit/lessons/spinner), spin the arrow with multiple if statements
|
||||
* [Die Roll](/microbit/lessons/die-roll), spin with more if statements
|
||||
* [Looper](/microbit/lessons/looper), display a series of numbers with a for loop index
|
||||
* [Strobe Light](/microbit/lessons/strobe-light), develop shapes with a nested for loops
|
||||
* [Digi Yoyo](/microbit/lessons/digi-yoyo), create a counter with a while loop
|
||||
* [Rotation Animation](/microbit/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Offset Image](/microbit/lessons/offset-image), shift an image horizontally with image offset
|
||||
* [Compass](/microbit/lessons/compass), displays the direction the BBC micro:bit is pointing
|
||||
* [Magic 8](/lessons/magic-8), a fortune teller game with the BBC micro:bit
|
||||
* [Guess the Number](/lessons/guess-the-number), guess a random number with random
|
||||
* [Rock Paper Scissors](/lessons/rock-paper-scissors), use image offsets with local variables
|
||||
* [Counter](/lessons/counter), display a number with a variable
|
||||
* [Love meter](/lessons/love-meter), create a love meter with on pin pressed
|
||||
* [Zoomer](/lessons/zoomer), measure the force with acceleration
|
||||
* [Glowing Pendulum](/lessons/glowing-pendulum), construct a pendulum that glows using acceleration
|
||||
* [Truth or Dare](/lessons/truth-or-dare), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/lessons/spinner), spin the arrow with multiple if statements
|
||||
* [Die Roll](/lessons/die-roll), spin with more if statements
|
||||
* [Looper](/lessons/looper), display a series of numbers with a for loop index
|
||||
* [Strobe Light](/lessons/strobe-light), develop shapes with a nested for loops
|
||||
* [Digi Yoyo](/lessons/digi-yoyo), create a counter with a while loop
|
||||
* [Rotation Animation](/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Offset Image](/lessons/offset-image), shift an image horizontally with image offset
|
||||
* [Compass](/lessons/compass), displays the direction the BBC micro:bit is pointing
|
||||
|
||||
### ~
|
||||
|
||||
@ -62,36 +62,36 @@ Overview of Touch Develop lessons for the BBC micro:bit.
|
||||
|
||||
## Advanced
|
||||
|
||||
* [Digital Pet](/microbit/lessons/digital-pet), a display of pet images with sub-functions
|
||||
* [Transformers](/microbit/lessons/transformers), use functions to return values
|
||||
* [Speed Button](/microbit/lessons/speed-button), code a speed game with running time
|
||||
* [Catch the Egg](/microbit/lessons/catch-the-egg-game), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/microbit/lessons/headbands), create a charades game with a collection of strings that hold the words
|
||||
* [Prank WiFi](/microbit/lessons/prank-wifi), create fake WiFi to trick your friends
|
||||
* [Jailbreak](/microbit/lessons/jailbreak), break out of a counting loop by pressing button "A"
|
||||
* [Flipping Bird](/microbit/lessons/flipping-bird), use modulo with a conditional
|
||||
* [Runaway Pac Man](/microbit/lessons/runaway-pacman), construct the game pac man with the BBC micro:bit
|
||||
* [Line of Fire](/microbit/lessons/line-of-fire), make a game to test hand-eye coordination
|
||||
* [The Hat Game](/microbit/lessons/the-hat-game), make a game to test your focus on the moving ball
|
||||
* [2 Player Pong](/microbit/lessons/2-player-pong), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
* [Digital Pet](/lessons/digital-pet), a display of pet images with sub-functions
|
||||
* [Transformers](/lessons/transformers), use functions to return values
|
||||
* [Speed Button](/lessons/speed-button), code a speed game with running time
|
||||
* [Catch the Egg](/lessons/catch-the-egg-game), catch falling eggs in a basket with an acceleration controller
|
||||
* [Headbands](/lessons/headbands), create a charades game with a collection of strings that hold the words
|
||||
* [Prank WiFi](/lessons/prank-wifi), create fake WiFi to trick your friends
|
||||
* [Jailbreak](/lessons/jailbreak), break out of a counting loop by pressing button "A"
|
||||
* [Flipping Bird](/lessons/flipping-bird), use modulo with a conditional
|
||||
* [Runaway Pac Man](/lessons/runaway-pacman), construct the game pac man with the BBC micro:bit
|
||||
* [Line of Fire](/lessons/line-of-fire), make a game to test hand-eye coordination
|
||||
* [The Hat Game](/lessons/the-hat-game), make a game to test your focus on the moving ball
|
||||
* [2 Player Pong](/lessons/2-player-pong), collaborate with a classmate to develop Pong on multiple BBC micro:bits
|
||||
|
||||
### Games
|
||||
|
||||
* [Pong](/microbit/lessons/pong), a light bouncing from left to right
|
||||
* [Meteorite](/microbit/lessons/meteorite), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/microbit/lessons/minesweeper), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/microbit/lessons/bop-it), a game where you have to keep up with the commands
|
||||
* [Letter up](/microbit/lessons/letter-up), a guessing game with string operators with string at
|
||||
* [Pong](/lessons/pong), a light bouncing from left to right
|
||||
* [Meteorite](/lessons/meteorite), a game where meteorites are coming for you one by one
|
||||
* [Minesweeper](/lessons/minesweeper), make a game to test your memory for placing a LED mine then finding the hidden LED mine
|
||||
* [Bop it](/lessons/bop-it), a game where you have to keep up with the commands
|
||||
* [Letter up](/lessons/letter-up), a guessing game with string operators with string at
|
||||
|
||||
### ~
|
||||
|
||||
### ~hide
|
||||
|
||||
* [Number Psych](/microbit/lessons/number-psych), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
* [Number Psych](/lessons/number-psych), collaborate with multiple classmates to develop a game on multiple BBC micro:bits and a breadboard
|
||||
|
||||
### ~
|
||||
|
||||
### @section full
|
||||
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/microbit/lessons/teach)
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/lessons/teach)
|
||||
|
||||
|
@ -8,7 +8,7 @@ Functions
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/2-player-pong/tutorial)
|
||||
* [tutorial](/lessons/2-player-pong/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -36,15 +36,15 @@ Learn how to create **functions**, `function()` as a unit of code that performs
|
||||
|
||||
## Documentation
|
||||
|
||||
* **functions** : [read more...](/microbit/js/function)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **for** : [read more...](/microbit/reference/loops/for)
|
||||
* **if** : [read more...](/microbit/reference/logic/if)
|
||||
* **show animation** : [read more...](/microbit/reference/basic/show-animation)
|
||||
* **functions** : [read more...](/js/function)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **for** : [read more...](/reference/loops/for)
|
||||
* **if** : [read more...](/reference/logic/if)
|
||||
* **show animation** : [read more...](/reference/basic/show-animation)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/2-player-pong/tutorial)
|
||||
* Activity: [tutorial](/lessons/2-player-pong/tutorial)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -95,7 +95,7 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/2-player-pong/tutorial)
|
||||
* [tutorial](/lessons/2-player-pong/tutorial)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -6,7 +6,7 @@ a two-player game of Pong using TWO BBC micro:bits!.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [2 player pong tutorial](/microbit/lessons/2-player-pong/tutorial)
|
||||
Use this activity document to guide your work in the [2 player pong tutorial](/lessons/2-player-pong/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ a two-player game of Pong using TWO BBC micro:bits!.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [2 player pong tutorial](/microbit/lessons/2-player-pong/tutorial)
|
||||
Use this activity document to guide your work in the [2 player pong tutorial](/lessons/2-player-pong/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,11 +10,11 @@ Show String
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/answering-machine/activity)
|
||||
* [quiz](/microbit/lessons/answering-machine/quiz)
|
||||
* [quiz answers](/microbit/lessons/answering-machine/quiz-answers)
|
||||
* [challenges](/microbit/lessons/answering-machine/challenges)
|
||||
* [tutorial](/microbit/lessons/answering-machine/tutorial)
|
||||
* [activity](/lessons/answering-machine/activity)
|
||||
* [quiz](/lessons/answering-machine/quiz)
|
||||
* [quiz answers](/lessons/answering-machine/quiz-answers)
|
||||
* [challenges](/lessons/answering-machine/challenges)
|
||||
* [tutorial](/lessons/answering-machine/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -26,8 +26,8 @@ Learn how to creating a message with a **string**, `basic->show string` to write
|
||||
|
||||
## Documentation
|
||||
|
||||
* **show string** : [read more...](/microbit/reference/basic/show-string)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **show string** : [read more...](/reference/basic/show-string)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -67,15 +67,15 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/answering-machine/activity)
|
||||
* [quiz](/microbit/lessons/answering-machine/quiz)
|
||||
* [activity](/lessons/answering-machine/activity)
|
||||
* [quiz](/lessons/answering-machine/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/answering-machine/challenges)
|
||||
* [challenges](/lessons/answering-machine/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/answering-machine/challenges)
|
||||
* Extended Activity: [challenges](/lessons/answering-machine/challenges)
|
||||
|
||||
|
@ -8,7 +8,7 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/banana-keyboard/activity)
|
||||
* [activity](/lessons/banana-keyboard/activity)
|
||||
|
||||
## Class
|
||||
|
||||
|
@ -10,11 +10,11 @@ Show LEDs
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/beautiful-image/activity)
|
||||
* [quiz](/microbit/lessons/beautiful-image/quiz)
|
||||
* [quiz answers](/microbit/lessons/beautiful-image/quiz-answers)
|
||||
* [challenges](/microbit/lessons/beautiful-image/challenges)
|
||||
* [tutorial](/microbit/lessons/beautiful-image/tutorial)
|
||||
* [activity](/lessons/beautiful-image/activity)
|
||||
* [quiz](/lessons/beautiful-image/quiz)
|
||||
* [quiz answers](/lessons/beautiful-image/quiz-answers)
|
||||
* [challenges](/lessons/beautiful-image/challenges)
|
||||
* [tutorial](/lessons/beautiful-image/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -26,8 +26,8 @@ Learn how to **show LEDs**, to show an image on the BBC micro:bit's LED screen.
|
||||
|
||||
## Documentation
|
||||
|
||||
* **show LEDs** : [read more...](/microbit/reference/basic/show-leds)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **show LEDs** : [read more...](/reference/basic/show-leds)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -62,15 +62,15 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/beautiful-image/tutorial)
|
||||
* [quiz](/microbit/lessons/beautiful-image/quiz)
|
||||
* [tutorial](/lessons/beautiful-image/tutorial)
|
||||
* [quiz](/lessons/beautiful-image/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/beautiful-image/challenges)
|
||||
* [challenges](/lessons/beautiful-image/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/beautiful-image/challenges)
|
||||
* Extended Activity: [challenges](/lessons/beautiful-image/challenges)
|
||||
|
||||
|
@ -10,11 +10,11 @@ Plot
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/blink/activity)
|
||||
* [quiz](/microbit/lessons/blink/quiz)
|
||||
* [quiz answers](/microbit/lessons/blink/quiz-answers)
|
||||
* [challenges](/microbit/lessons/blink/challenges)
|
||||
* [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* [activity](/lessons/blink/activity)
|
||||
* [quiz](/lessons/blink/quiz)
|
||||
* [quiz answers](/lessons/blink/quiz-answers)
|
||||
* [challenges](/lessons/blink/challenges)
|
||||
* [tutorial](/lessons/blink/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -36,16 +36,16 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
|
||||
|
||||
## Documentation
|
||||
|
||||
* **plot**: [read more...](/microbit/reference/led/plot)
|
||||
* **unplot**: [read more...](/microbit/reference/led/unplot)
|
||||
* **pause**: [read more...](/microbit/reference/basic/pause)
|
||||
* **forever**: [read more...](/microbit/reference/basic/forever)
|
||||
* **plot**: [read more...](/reference/led/plot)
|
||||
* **unplot**: [read more...](/reference/led/unplot)
|
||||
* **pause**: [read more...](/reference/basic/pause)
|
||||
* **forever**: [read more...](/reference/basic/forever)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/blink/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/blink/challenges)
|
||||
* Activity: [tutorial](/lessons/blink/tutorial)
|
||||
* Activity: [quiz](/lessons/blink/quiz)
|
||||
* Extended Activity: [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -78,18 +78,18 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* [quiz](/microbit/lessons/blink/quiz)
|
||||
* [quiz answers](/microbit/lessons/blink/quiz-answers)
|
||||
* [tutorial](/lessons/blink/tutorial)
|
||||
* [quiz](/lessons/blink/quiz)
|
||||
* [quiz answers](/lessons/blink/quiz-answers)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/blink/challenges)
|
||||
* [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/blink/challenges)
|
||||
* Extended Activity: [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -49,7 +49,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/blink/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/blink/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the blink tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [blink](/microbit/lessons/blink/activity) activity and your code will look like this:
|
||||
Complete the [blink](/lessons/blink/activity) activity and your code will look like this:
|
||||
|
||||
```
|
||||
basic.forever(() => {
|
||||
|
@ -10,10 +10,10 @@ Plot - Blinking LED
|
||||
|
||||
## Quick links
|
||||
|
||||
* [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* [quiz](/microbit/js/blink/quiz)
|
||||
* [quiz answers](/microbit/lessons/blink/quiz-answers)
|
||||
* [challenges](/microbit/lessons/blink/challenges)
|
||||
* [tutorial](/lessons/blink/tutorial)
|
||||
* [quiz](/js/blink/quiz)
|
||||
* [quiz answers](/lessons/blink/quiz-answers)
|
||||
* [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -37,16 +37,16 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
|
||||
|
||||
## Documentation
|
||||
|
||||
* **plot**: [read more...](/microbit/reference/led/plot)
|
||||
* **pause**: [read more...](/microbit/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/microbit/reference/basic/clear-screen)
|
||||
* **forever**: [read more...](/microbit/reference/basic/forever)
|
||||
* **plot**: [read more...](/reference/led/plot)
|
||||
* **pause**: [read more...](/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/reference/basic/clear-screen)
|
||||
* **forever**: [read more...](/reference/basic/forever)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/blink/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/blink/challenges)
|
||||
* Activity: [tutorial](/lessons/blink/tutorial)
|
||||
* Activity: [quiz](/lessons/blink/quiz)
|
||||
* Extended Activity: [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -81,19 +81,19 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/blink/tutorial)
|
||||
* [quiz](/microbit/lessons/blink/quiz)
|
||||
* [tutorial](/lessons/blink/tutorial)
|
||||
* [quiz](/lessons/blink/quiz)
|
||||
* assessment opportunities: forever, plot, pause, clear screen
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/blink/challenges)
|
||||
* [challenges](/lessons/blink/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/blink/challenges)
|
||||
* Extended Activity: [challenges](/lessons/blink/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to create a blinking LED script.
|
||||
|
||||
This is the answer key for the [blink quiz](/microbit/lessons/blink/quiz).
|
||||
This is the answer key for the [blink quiz](/lessons/blink/quiz).
|
||||
|
||||
## 1. Describe what `led->plot` does?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking LED script.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [blink tutorial](/microbit/lessons/blink/tutorial).
|
||||
Use this activity document to guide your work in the [blink tutorial](/lessons/blink/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -8,10 +8,10 @@ Game Library
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/bop-it/tutorial)
|
||||
* [quiz](/microbit/lessons/bop-it/quiz)
|
||||
* [quiz answers](/microbit/lessons/bop-it/quiz-answers)
|
||||
* [challenges](/microbit/lessons/bop-it/challenges)
|
||||
* [tutorial](/lessons/bop-it/tutorial)
|
||||
* [quiz](/lessons/bop-it/quiz)
|
||||
* [quiz answers](/lessons/bop-it/quiz-answers)
|
||||
* [challenges](/lessons/bop-it/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -23,18 +23,18 @@ Learn how to create a minesweeper game with **if**, `if condition do` , **global
|
||||
|
||||
## Documentation
|
||||
|
||||
* **game library** : [read more...](/microbit/js/game-library)
|
||||
* **global variables** : [read more...](/microbit/js/data)
|
||||
* **assignment operator** : [read more...](/microbit/reference/variables/assignment)
|
||||
* **functions** : [read more...](/microbit/js/function)
|
||||
* **call** : [read more...](/microbit/js/call)
|
||||
* **math random number** : [read more...](/microbit/js/math)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **on logo down** : [read more...](/microbit/functions/on-logo-down)
|
||||
* **on shake** : [read more...](/microbit/reference/input/on-gesture)
|
||||
* **if** : [read more...](/microbit/reference/logic/if)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **show string** : [read more...](/microbit/reference/basic/show-string)
|
||||
* **game library** : [read more...](/js/game-library)
|
||||
* **global variables** : [read more...](/js/data)
|
||||
* **assignment operator** : [read more...](/reference/variables/assignment)
|
||||
* **functions** : [read more...](/js/function)
|
||||
* **call** : [read more...](/js/call)
|
||||
* **math random number** : [read more...](/js/math)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **on logo down** : [read more...](/functions/on-logo-down)
|
||||
* **on shake** : [read more...](/reference/input/on-gesture)
|
||||
* **if** : [read more...](/reference/logic/if)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
* **show string** : [read more...](/reference/basic/show-string)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -83,15 +83,15 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/bop-it/tutorial)
|
||||
* [quiz](/microbit/lessons/bop-it/quiz)
|
||||
* [tutorial](/lessons/bop-it/tutorial)
|
||||
* [quiz](/lessons/bop-it/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/bop-it/challenges)
|
||||
* [challenges](/lessons/bop-it/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/bop-it/challenges)
|
||||
* Extended Activity: [challenges](/lessons/bop-it/challenges)
|
||||
|
||||
|
@ -10,10 +10,10 @@ Basic- Show Animation
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/bounce-image/tutorial)
|
||||
* [quiz](/microbit/lessons/bounce-image/quiz)
|
||||
* [quiz answers](/microbit/lessons/bounce-image/quiz-answers)
|
||||
* [challenges](/microbit/lessons/bounce-image/challenges)
|
||||
* [tutorial](/lessons/bounce-image/tutorial)
|
||||
* [quiz](/lessons/bounce-image/quiz)
|
||||
* [quiz answers](/lessons/bounce-image/quiz-answers)
|
||||
* [challenges](/lessons/bounce-image/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -39,15 +39,15 @@ Learn how to creating an **animation**, `basic->show animation` to display a ser
|
||||
|
||||
## Documentation
|
||||
|
||||
* **forever** : [read more...](/microbit/reference/basic/forever)
|
||||
* **show animation** : [read more...](/microbit/reference/basic/show-animation)
|
||||
* **on shake** : [read more...](/microbit/reference/input/on-gesture)
|
||||
* **forever** : [read more...](/reference/basic/forever)
|
||||
* **show animation** : [read more...](/reference/basic/show-animation)
|
||||
* **on shake** : [read more...](/reference/input/on-gesture)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/bounce-image/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/bounce-image/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/bounce-image/challenges)
|
||||
* Activity: [tutorial](/lessons/bounce-image/tutorial)
|
||||
* Activity: [quiz](/lessons/bounce-image/quiz)
|
||||
* Extended Activity: [challenges](/lessons/bounce-image/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -90,17 +90,17 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/bounce-image/tutorial)
|
||||
* [quiz](/microbit/lessons/bounce-image/quiz)
|
||||
* [tutorial](/lessons/bounce-image/tutorial)
|
||||
* [quiz](/lessons/bounce-image/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/bounce-image/challenges)
|
||||
* [challenges](/lessons/bounce-image/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/bounce-image/challenges)
|
||||
* Extended Activity: [challenges](/lessons/bounce-image/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the bounce image tutorial. #docs
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/bounce-image/tutorial)
|
||||
* [tutorial](/lessons/bounce-image/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
scroll an image on the BBC micro:bit.
|
||||
|
||||
This is the answer key for the [bounce image quiz](/microbit/lessons/bounce-image/quiz).
|
||||
This is the answer key for the [bounce image quiz](/lessons/bounce-image/quiz).
|
||||
|
||||
## 1. What does it mean to 'add frames' ?
|
||||
|
||||
|
@ -6,7 +6,7 @@ scroll an image on the BBC micro:bit.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this document to guide your work in the [bounce image tutorial](/microbit/lessons/bounce-image/tutorial) !
|
||||
Use this document to guide your work in the [bounce image tutorial](/lessons/bounce-image/tutorial) !
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
My script. #docs
|
||||
|
||||
This [guided tutorial](/microbit/lessons/boxer-mania/tutorial) will help you create an animation!
|
||||
This [guided tutorial](/lessons/boxer-mania/tutorial) will help you create an animation!
|
||||
|
||||
**Challenge 0**
|
||||
|
||||
|
@ -4,7 +4,7 @@ This guide will show you how to use a break statement within a while loop. #docs
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Welcome! This [guided tutorial](/microbit/lessons/break/tutorial) will assist you with this activity.
|
||||
Welcome! This [guided tutorial](/lessons/break/tutorial) will assist you with this activity.
|
||||
|
||||
```
|
||||
count = 0
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Howdy! This [guided tutorial](/microbit/rxqgzy) will help you complete this activity!
|
||||
Howdy! This [guided tutorial](/rxqgzy) will help you complete this activity!
|
||||
|
||||
In this guide, you will learn how to use buttons and show text on the screen. Let's start by adding to respond **when the left button is pressed**.
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking LED script with a for loop.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [light column cascade tutorial](/microbit/js/light-column-cascade/tutorial).
|
||||
Use this activity document to guide your work in the [light column cascade tutorial](/js/light-column-cascade/tutorial).
|
||||
|
||||
Answer the questions below while working on or after you finish the tutorial. Pay attention to the dialogs!
|
||||
|
||||
|
@ -4,7 +4,7 @@ My script. #docs
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Welcome! This [guided tutorial](/microbit/hzckbb) will help you create the script to clear the screen!
|
||||
Welcome! This [guided tutorial](/hzckbb) will help you create the script to clear the screen!
|
||||
|
||||
Your goal is to clear the screen after displaying an animation. Begin by showing and displaying an animation. Remember that the `show animation` is in the `basic` namespace. We then need to detect when the "A" button is pressed. Finally, clear the screen by typing in `basic->clear screen`.
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking LED script with a for loop.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [light column cascade tutorial](/microbit/js/light-column-cascade/tutorial).
|
||||
Use this activity document to guide your work in the [light column cascade tutorial](/js/light-column-cascade/tutorial).
|
||||
|
||||
Answer the questions below while working on or after you finish the tutorial. Pay attention to the dialogs!
|
||||
|
||||
|
@ -4,7 +4,7 @@ These challenges allow you to set the value of a counter to 1 when button B is p
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Welcome! This [guided tutorial](/microbit/lessons/comparison/tutorial) will assist you with using the comparison operator.
|
||||
Welcome! This [guided tutorial](/lessons/comparison/tutorial) will assist you with using the comparison operator.
|
||||
|
||||
```
|
||||
counter = 0
|
||||
|
@ -4,5 +4,5 @@ build a compass app that applies the BBC micro:bit magnetic sensor (magnetometer
|
||||
|
||||
build a compass app that applies the BBC micro:bit magnetic sensor (magnetometer)
|
||||
|
||||
* [tutorial](/microbit/lessons/compass/tutorial)
|
||||
* [challenges](/microbit/lessons/compass/challenges)
|
||||
* [tutorial](/lessons/compass/tutorial)
|
||||
* [challenges](/lessons/compass/challenges)
|
||||
|
@ -6,7 +6,7 @@ Display the direction that the BBC micro:bit is facing using the compass
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/compass/tutorial)
|
||||
* [tutorial](/lessons/compass/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create an actual compass to show your direction: North, South, East, or West
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [compass tutorial](/microbit/lessons/compass/tutorial).
|
||||
Use this activity document to guide your work in the [compass tutorial](/lessons/compass/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create an actual compass to show your direction: North, South, East, or West
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [compass tutorial](/microbit/lessons/compass/tutorial).
|
||||
Use this activity document to guide your work in the [compass tutorial](/lessons/compass/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,11 +10,11 @@ Variables
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/counter/activity)
|
||||
* [challenges](/microbit/lessons/counter/challenges)
|
||||
* [quiz](/microbit/lessons/counter/quiz)
|
||||
* [quiz answers](/microbit/lessons/counter/quiz-answers)
|
||||
* [tutorial](/microbit/lessons/counter/tutorial)
|
||||
* [activity](/lessons/counter/activity)
|
||||
* [challenges](/lessons/counter/challenges)
|
||||
* [quiz](/lessons/counter/quiz)
|
||||
* [quiz answers](/lessons/counter/quiz-answers)
|
||||
* [tutorial](/lessons/counter/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -26,10 +26,10 @@ Learn how to creating a **variable** to keep track of the current count. We will
|
||||
|
||||
## Documentation
|
||||
|
||||
* **variable**: [read more...](/microbit/reference/variables/var)
|
||||
* **arithmetic operators**: [read more...](/microbit/reference/types/number)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **variable**: [read more...](/reference/variables/var)
|
||||
* **arithmetic operators**: [read more...](/reference/types/number)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -65,16 +65,16 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/counter/activity)
|
||||
* [tutorial](/microbit/lessons/counter/tutorial)
|
||||
* [quiz](/microbit/lessons/counter/quiz)
|
||||
* [activity](/lessons/counter/activity)
|
||||
* [tutorial](/lessons/counter/tutorial)
|
||||
* [quiz](/lessons/counter/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/counter/challenges)
|
||||
* [challenges](/lessons/counter/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/counter/challenges)
|
||||
* Extended Activity: [challenges](/lessons/counter/challenges)
|
||||
|
||||
|
@ -10,7 +10,7 @@ Welcome! This tutorial will teach you how to make a counter that increments when
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Let's start by creating a **local variable** `count` to keep track of the current count.
|
||||
|
||||
@ -39,7 +39,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/counter/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/counter/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the counter tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/counter/activity) At the end of the tutorial, your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/counter/activity) At the end of the tutorial, your code should look like this:
|
||||
|
||||
```
|
||||
let count = 0
|
||||
|
@ -30,15 +30,15 @@ Learn how to creating a **variable** to keep track of the current count. We will
|
||||
|
||||
## Documentation
|
||||
|
||||
* **variables**: [read more...](/microbit/reference/variables/var)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **variables**: [read more...](/reference/variables/var)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/counter/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/counter/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/counter/challenges)
|
||||
* Activity: [tutorial](/lessons/counter/tutorial)
|
||||
* Activity: [quiz](/lessons/counter/quiz)
|
||||
* Extended Activity: [challenges](/lessons/counter/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -71,19 +71,19 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/counter/tutorial)
|
||||
* [quiz](/microbit/lessons/counter/quiz)
|
||||
* [tutorial](/lessons/counter/tutorial)
|
||||
* [quiz](/lessons/counter/quiz)
|
||||
* assessment opportunities: forever, plot, pause, clear screen
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/counter/challenges)
|
||||
* [challenges](/lessons/counter/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/counter/challenges)
|
||||
* Extended Activity: [challenges](/lessons/counter/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -8,11 +8,11 @@ If (Conditionals)
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/die-roll/activity)
|
||||
* [challenges](/microbit/lessons/die-roll/challenges)
|
||||
* [quiz](/microbit/lessons/die-roll/quiz)
|
||||
* [quiz answers](/microbit/lessons/die-roll/quiz-answers)
|
||||
* [tutorial](/microbit/lessons/die-roll/tutorial)
|
||||
* [activity](/lessons/die-roll/activity)
|
||||
* [challenges](/lessons/die-roll/challenges)
|
||||
* [quiz](/lessons/die-roll/quiz)
|
||||
* [quiz answers](/lessons/die-roll/quiz-answers)
|
||||
* [tutorial](/lessons/die-roll/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -24,12 +24,12 @@ Learn how to use an if statements to run code run code depending on whether a co
|
||||
|
||||
## Documentation
|
||||
|
||||
* **Variables** : [read more...](/microbit/reference/variables/var)
|
||||
* **If** : [read more...](/microbit/reference/logic/if)
|
||||
* **On Shake** : [read more...](/microbit/reference/input/on-gesture)
|
||||
* **Assignment Operator** : [read more...](/microbit/reference/variables/assign)
|
||||
* **Math Random** : [read more...](/microbit/js/math)
|
||||
* **Show LEDs** : [read more...](/microbit/reference/basic/show-leds)
|
||||
* **Variables** : [read more...](/reference/variables/var)
|
||||
* **If** : [read more...](/reference/logic/if)
|
||||
* **On Shake** : [read more...](/reference/input/on-gesture)
|
||||
* **Assignment Operator** : [read more...](/reference/variables/assign)
|
||||
* **Math Random** : [read more...](/js/math)
|
||||
* **Show LEDs** : [read more...](/reference/basic/show-leds)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -76,16 +76,16 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/die-roll/activity)
|
||||
* [tutorial](/microbit/lessons/die-roll/tutorial)
|
||||
* [quiz](/microbit/lessons/die-roll/quiz)
|
||||
* [activity](/lessons/die-roll/activity)
|
||||
* [tutorial](/lessons/die-roll/tutorial)
|
||||
* [quiz](/lessons/die-roll/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/die-roll/challenges)
|
||||
* [challenges](/lessons/die-roll/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/die-roll/challenges)
|
||||
* Extended Activity: [challenges](/lessons/die-roll/challenges)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Create a die on the BBC micro:bit
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under **KindScript**.
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **KindScript**.
|
||||
|
||||
Let's create a condition for when the BBC micro:bit is shaken.
|
||||
|
||||
@ -124,7 +124,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/die-roll/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/die-roll/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create a die on the BBC micro:bit.
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/die-roll/tutorial)
|
||||
* [tutorial](/lessons/die-roll/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -10,10 +10,10 @@ While Loop
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/digi-yoyo/tutorial)
|
||||
* [quiz](/microbit/lessons/digi-yoyo/quiz)
|
||||
* [quiz answers](/microbit/lessons/digi-yoyo/quiz-answers)
|
||||
* [challenges](/microbit/lessons/digi-yoyo/challenges)
|
||||
* [tutorial](/lessons/digi-yoyo/tutorial)
|
||||
* [quiz](/lessons/digi-yoyo/quiz)
|
||||
* [quiz answers](/lessons/digi-yoyo/quiz-answers)
|
||||
* [challenges](/lessons/digi-yoyo/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -25,12 +25,12 @@ Learn how to creating a **while loop**, `while condition do` to repeat code whil
|
||||
|
||||
## Documentation
|
||||
|
||||
* **local variables** : [read more...](/microbit/reference/variables/var)
|
||||
* **assignment operator** : [read more...](/microbit/reference/variables/assign)
|
||||
* **while loop** : [read more...](/microbit/js/while)
|
||||
* **relational operator ** : [read more...](/microbit/reference/types/number)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **local variables** : [read more...](/reference/variables/var)
|
||||
* **assignment operator** : [read more...](/reference/variables/assign)
|
||||
* **while loop** : [read more...](/js/while)
|
||||
* **relational operator ** : [read more...](/reference/types/number)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -77,15 +77,15 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/digi-yoyo/tutorial)
|
||||
* [quiz](/microbit/lessons/digi-yoyo/quiz)
|
||||
* [tutorial](/lessons/digi-yoyo/tutorial)
|
||||
* [quiz](/lessons/digi-yoyo/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/digi-yoyo/challenges)
|
||||
* [challenges](/lessons/digi-yoyo/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/digi-yoyo/challenges)
|
||||
* Extended Activity: [challenges](/lessons/digi-yoyo/challenges)
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the digi yoyo.
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/digi-yoyo/tutorial)
|
||||
* [tutorial](/lessons/digi-yoyo/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -10,10 +10,10 @@ Functions
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
* [quiz](/microbit/lessons/digital-pet/quiz)
|
||||
* [quiz answers](/microbit/lessons/digital-pet/quiz-answers)
|
||||
* [challenges](/microbit/lessons/digital-pet/challenges)
|
||||
* [tutorial](/lessons/digital-pet/tutorial)
|
||||
* [quiz](/lessons/digital-pet/quiz)
|
||||
* [quiz answers](/lessons/digital-pet/quiz-answers)
|
||||
* [challenges](/lessons/digital-pet/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -43,23 +43,23 @@ Learn how to create **functions**, `function()` that perform a specific task and
|
||||
|
||||
## Documentation
|
||||
|
||||
* **function** : [read more...](/microbit/js/function)
|
||||
* **call** : [read more...](/microbit/js/call)
|
||||
* **global variable** : [read more...](/microbit/js/data)
|
||||
* **assignment operator** : [read more...](/microbit/reference/variables/assign)
|
||||
* **forever** : [read more...](/microbit/reference/basic/forever)
|
||||
* **button is pressed** : [read more...](/microbit/reference/input/button-is-pressed)
|
||||
* **show string** : [read more...](/microbit/reference/basic/show-string)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **create image** : [read more...](/microbit/reference/images/create-image)
|
||||
* **show image** : [read more...](/microbit/reference/images/show-image)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **function** : [read more...](/js/function)
|
||||
* **call** : [read more...](/js/call)
|
||||
* **global variable** : [read more...](/js/data)
|
||||
* **assignment operator** : [read more...](/reference/variables/assign)
|
||||
* **forever** : [read more...](/reference/basic/forever)
|
||||
* **button is pressed** : [read more...](/reference/input/button-is-pressed)
|
||||
* **show string** : [read more...](/reference/basic/show-string)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
* **create image** : [read more...](/reference/images/create-image)
|
||||
* **show image** : [read more...](/reference/images/show-image)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/digital-pet/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/digital-pet/challenges)
|
||||
* Activity: [tutorial](/lessons/digital-pet/tutorial)
|
||||
* Activity: [quiz](/lessons/digital-pet/quiz)
|
||||
* Extended Activity: [challenges](/lessons/digital-pet/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -115,17 +115,17 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
* [quiz](/microbit/lessons/digital-pet/quiz)
|
||||
* [tutorial](/lessons/digital-pet/tutorial)
|
||||
* [quiz](/lessons/digital-pet/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/digital-pet/challenges)
|
||||
* [challenges](/lessons/digital-pet/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/digital-pet/challenges)
|
||||
* Extended Activity: [challenges](/lessons/digital-pet/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the digital pet tutorial.
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
* [tutorial](/lessons/digital-pet/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -6,7 +6,7 @@ A display of pet images for the BBC micro:bit
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [digital pet tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
Use this activity document to guide your work in the [digital pet tutorial](/lessons/digital-pet/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ A display of pet images for the BBC micro:bit
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [digital pet tutorial](/microbit/lessons/digital-pet/tutorial)
|
||||
Use this activity document to guide your work in the [digital pet tutorial](/lessons/digital-pet/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,11 +10,11 @@ Pause
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/flashing-heart/activity)
|
||||
* [quiz](/microbit/lessons/flashing-heart/quiz)
|
||||
* [quiz answers](/microbit/lessons/flashing-heart/quiz-answers)
|
||||
* [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* [tutorial](/microbit/lessons/flashing-heart/tutorial)
|
||||
* [activity](/lessons/flashing-heart/activity)
|
||||
* [quiz](/lessons/flashing-heart/quiz)
|
||||
* [quiz answers](/lessons/flashing-heart/quiz-answers)
|
||||
* [challenges](/lessons/flashing-heart/challenges)
|
||||
* [tutorial](/lessons/flashing-heart/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -36,10 +36,10 @@ Learn how to **plot image** by turning on a series of LED lights on the LED scre
|
||||
|
||||
## Documentation
|
||||
|
||||
* **forever**: [read more...](/microbit/reference/basic/forever)
|
||||
* **plot image** : [read more...](/microbit/reference/led/plot-image)
|
||||
* **pause**: [read more...](/microbit/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/microbit/reference/basic/clear-screen)
|
||||
* **forever**: [read more...](/reference/basic/forever)
|
||||
* **plot image** : [read more...](/reference/led/plot-image)
|
||||
* **pause**: [read more...](/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/reference/basic/clear-screen)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -75,17 +75,17 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Exercise
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/flashing-heart/activity) or [tutorial](/microbit/lessons/flashing-heart/tutorial)
|
||||
* [quiz](/microbit/lessons/flashing-heart/quiz)
|
||||
* [activity](/lessons/flashing-heart/activity) or [tutorial](/lessons/flashing-heart/tutorial)
|
||||
* [quiz](/lessons/flashing-heart/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* [challenges](/lessons/flashing-heart/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* Extended Activity: [challenges](/lessons/flashing-heart/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -57,7 +57,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/flashing-heart/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/flashing-heart/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for flashing heart.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [flashing heart](/microbit/lessons/flashing-heart/activity) activity and your code will look like this:
|
||||
Complete the [flashing heart](/lessons/flashing-heart/activity) activity and your code will look like this:
|
||||
|
||||
```
|
||||
basic.forever(() => {
|
||||
|
@ -30,18 +30,18 @@ Learn how to control a blinking LED image. We will be learning how to create a b
|
||||
|
||||
## Documentation
|
||||
|
||||
* **global variables**: [read more...](/microbit/js/data)
|
||||
* **create image** : [read more...](/microbit/reference/images/create-image)
|
||||
* **show image** : [read more...](/microbit/reference/images/show-image)
|
||||
* **pause**: [read more...](/microbit/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/microbit/reference/basic/clear-screen)
|
||||
* **forever**: [read more...](/microbit/reference/basic/forever)
|
||||
* **global variables**: [read more...](/js/data)
|
||||
* **create image** : [read more...](/reference/images/create-image)
|
||||
* **show image** : [read more...](/reference/images/show-image)
|
||||
* **pause**: [read more...](/reference/basic/pause)
|
||||
* **clear screen**: [read more...](/reference/basic/clear-screen)
|
||||
* **forever**: [read more...](/reference/basic/forever)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/flashing-heart/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/flashing-heart/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* Activity: [tutorial](/lessons/flashing-heart/tutorial)
|
||||
* Activity: [quiz](/lessons/flashing-heart/quiz)
|
||||
* Extended Activity: [challenges](/lessons/flashing-heart/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -82,19 +82,19 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/flashing-heart/tutorial)
|
||||
* [quiz](/microbit/lessons/flashing-heart/quiz)
|
||||
* [tutorial](/lessons/flashing-heart/tutorial)
|
||||
* [quiz](/lessons/flashing-heart/quiz)
|
||||
* assessment opportunities: forever, plot, pause, clear screen
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* [challenges](/lessons/flashing-heart/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* Extended Activity: [challenges](/lessons/flashing-heart/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to create images with global variables.
|
||||
|
||||
This is the answer key for the [flashing heart quiz](/microbit/lessons/flashing-heart/quiz).
|
||||
This is the answer key for the [flashing heart quiz](/lessons/flashing-heart/quiz).
|
||||
|
||||
## 1. Describe what `basic->show leds` does
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking LED script with a variable.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [flashing heart activity](/microbit/lessons/flashing-heart/activity).
|
||||
Use this activity document to guide your work in the [flashing heart activity](/lessons/flashing-heart/activity).
|
||||
|
||||
Answer the questions while completing the activity. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,10 +10,10 @@ Math - Modulo
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/flipping-bird/tutorial)
|
||||
* [quiz](/microbit/lessons/flipping-bird/quiz)
|
||||
* [quiz answers](/microbit/lessons/flipping-bird/quiz-answers)
|
||||
* [challenges](/microbit/lessons/flipping-bird/challenges)
|
||||
* [tutorial](/lessons/flipping-bird/tutorial)
|
||||
* [quiz](/lessons/flipping-bird/quiz)
|
||||
* [quiz answers](/lessons/flipping-bird/quiz-answers)
|
||||
* [challenges](/lessons/flipping-bird/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -36,17 +36,17 @@ Learn how to return the **modulus**, `math->mod` to determine if you will plot i
|
||||
|
||||
## Documentation
|
||||
|
||||
* **global variables** : [read more...](/microbit/js/data)
|
||||
* **on shake** : [read more...](/microbit/reference/input/on-gesture)
|
||||
* **if** : [read more...](/microbit/reference/logic/if)
|
||||
* **math modulo** : [read more...](/microbit/js/math)
|
||||
* **plot image** : [read more...](/microbit/reference/led/plot-image)
|
||||
* **global variables** : [read more...](/js/data)
|
||||
* **on shake** : [read more...](/reference/input/on-gesture)
|
||||
* **if** : [read more...](/reference/logic/if)
|
||||
* **math modulo** : [read more...](/js/math)
|
||||
* **plot image** : [read more...](/reference/led/plot-image)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/flipping-bird/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/flipping-bird/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/flipping-bird/challenges)
|
||||
* Activity: [tutorial](/lessons/flipping-bird/tutorial)
|
||||
* Activity: [quiz](/lessons/flipping-bird/quiz)
|
||||
* Extended Activity: [challenges](/lessons/flipping-bird/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -105,18 +105,18 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/flipping-bird/tutorial)
|
||||
* [quiz](/microbit/lessons/flipping-bird/quiz)
|
||||
* [tutorial](/lessons/flipping-bird/tutorial)
|
||||
* [quiz](/lessons/flipping-bird/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/flipping-bird/challenges)
|
||||
* [challenges](/lessons/flipping-bird/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/flipping-bird/challenges)
|
||||
* Extended Activity: [challenges](/lessons/flipping-bird/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for flipping bird. #docs
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/flipping-bird/tutorial)
|
||||
* [tutorial](/lessons/flipping-bird/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use modulo with a conditional.
|
||||
|
||||
This is the answer key for the [flipping bird quiz](/microbit/lessons/flipping-bird/quiz).
|
||||
This is the answer key for the [flipping bird quiz](/lessons/flipping-bird/quiz).
|
||||
|
||||
## 1. What does "modulo" mean in math?
|
||||
|
||||
|
@ -6,7 +6,7 @@ use modulo with a conditional.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [flipping bird tutorial](/microbit/lessons/flipping-bird/tutorial).
|
||||
Use this activity document to guide your work in the [flipping bird tutorial](/lessons/flipping-bird/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -14,10 +14,10 @@ Basic - Show Number
|
||||
|
||||
## Quick Links TODO:
|
||||
|
||||
* [tutorial](/microbit/lessons/lucky-7/tutorial)
|
||||
* [quiz](/microbit/lessons/lucky-7/quiz)
|
||||
* [quiz answers](/microbit/lessons/lucky-7/quiz-answers)
|
||||
* [challenges](/microbit/lessons/lucky-7/challenges)
|
||||
* [tutorial](/lessons/lucky-7/tutorial)
|
||||
* [quiz](/lessons/lucky-7/quiz)
|
||||
* [quiz answers](/lessons/lucky-7/quiz-answers)
|
||||
* [challenges](/lessons/lucky-7/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -73,13 +73,13 @@ Learn how to creating a **global number variable**, `data->count` to keep track
|
||||
|
||||
## Documentation TODO:
|
||||
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
|
||||
## Resources TODO:
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/lucky-7/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/lucky-7/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/lucky-7/challenges)
|
||||
* Activity: [tutorial](/lessons/lucky-7/tutorial)
|
||||
* Activity: [quiz](/lessons/lucky-7/quiz)
|
||||
* Extended Activity: [challenges](/lessons/lucky-7/challenges)
|
||||
|
||||
## Objectives TODO:
|
||||
|
||||
@ -171,19 +171,19 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity TODO:
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/lucky-7/tutorial)
|
||||
* [quiz](/microbit/lessons/lucky-7/quiz)
|
||||
* [tutorial](/lessons/lucky-7/tutorial)
|
||||
* [quiz](/lessons/lucky-7/quiz)
|
||||
* assessment opportunities: forever, plot, pause, clear screen
|
||||
|
||||
## Extended Activity TODO:
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/lucky-7/challenges)
|
||||
* [challenges](/lessons/lucky-7/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework TODO:
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/lucky-7/challenges)
|
||||
* Extended Activity: [challenges](/lessons/lucky-7/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -4,7 +4,7 @@ These challenges will allow you to create a counter from 0-5 and then from 5-0.
|
||||
|
||||
### Challenge 0
|
||||
|
||||
Welcome! This [guided tutorial](/microbit/bcvgkf) will assist you with the following activity:
|
||||
Welcome! This [guided tutorial](/bcvgkf) will assist you with the following activity:
|
||||
|
||||
```
|
||||
for (let i = 0; i < 6; i++) {
|
||||
|
@ -8,11 +8,11 @@ Acceleration
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/glowing-pendulum/activity)
|
||||
* [challenges](/microbit/lessons/glowing-pendulum/challenges)
|
||||
* [quiz](/microbit/lessons/glowing-pendulum/quiz)
|
||||
* [quiz answers](/microbit/lessons/glowing-pendulum/quiz-answers)
|
||||
* [tutorial](/microbit/lessons/glowing-pendulum/tutorial)
|
||||
* [activity](/lessons/glowing-pendulum/activity)
|
||||
* [challenges](/lessons/glowing-pendulum/challenges)
|
||||
* [quiz](/lessons/glowing-pendulum/quiz)
|
||||
* [quiz answers](/lessons/glowing-pendulum/quiz-answers)
|
||||
* [tutorial](/lessons/glowing-pendulum/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -24,12 +24,12 @@ Learn how to get the acceleration **acceleration**, `input->acceleration` value
|
||||
|
||||
## Documentation
|
||||
|
||||
* **forever** : [read more...](/microbit/reference/basic/forever)
|
||||
* **local variable** : [read more...](/microbit/reference/variables/var)
|
||||
* **acceleration** : [read more...](/microbit/reference/input/acceleration)
|
||||
* **absolute value** : [read more...](/microbit/js/math)
|
||||
* **set brightness** : [read more...](/microbit/reference/led/set-brightness)
|
||||
* **plot** : [read more...](/microbit/reference/led/set-brightness)
|
||||
* **forever** : [read more...](/reference/basic/forever)
|
||||
* **local variable** : [read more...](/reference/variables/var)
|
||||
* **acceleration** : [read more...](/reference/input/acceleration)
|
||||
* **absolute value** : [read more...](/js/math)
|
||||
* **set brightness** : [read more...](/reference/led/set-brightness)
|
||||
* **plot** : [read more...](/reference/led/set-brightness)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -75,16 +75,16 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/glowing-pendulum/activity)
|
||||
* [tutorial](/microbit/lessons/glowing-pendulum/tutorial)
|
||||
* [quiz](/microbit/lessons/glowing-pendulum/quiz)
|
||||
* [activity](/lessons/glowing-pendulum/activity)
|
||||
* [tutorial](/lessons/glowing-pendulum/tutorial)
|
||||
* [quiz](/lessons/glowing-pendulum/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/glowing-pendulum/challenges)
|
||||
* [challenges](/lessons/glowing-pendulum/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/glowing-pendulum/challenges)
|
||||
* Extended Activity: [challenges](/lessons/glowing-pendulum/challenges)
|
||||
|
||||
|
@ -8,7 +8,7 @@ Welcome! This guided activity will teach how to construct a pendulum that glows
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Create a **forever** loop that will constantly display the appropriate brightness on the LED display.
|
||||
|
||||
@ -69,7 +69,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/glowing-pendulum/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/glowing-pendulum/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the glowing pendulum tutorial. #docs
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/glowing-pendulum/tutorial)
|
||||
* [tutorial](/lessons/glowing-pendulum/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -10,11 +10,11 @@ Fade Out
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/glowing-sword/activity)
|
||||
* [quiz](/microbit/lessons/glowing-sword/quiz)
|
||||
* [quiz answers](/microbit/lessons/glowing-sword/quiz-answers)
|
||||
* [challenges](/microbit/lessons/glowing-sword/challenges)
|
||||
* [tutorial](/microbit/lessons/glowing-sword/tutorial)
|
||||
* [activity](/lessons/glowing-sword/activity)
|
||||
* [quiz](/lessons/glowing-sword/quiz)
|
||||
* [quiz answers](/lessons/glowing-sword/quiz-answers)
|
||||
* [challenges](/lessons/glowing-sword/challenges)
|
||||
* [tutorial](/lessons/glowing-sword/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -36,16 +36,16 @@ Learn how to manipulate an image through **fade out**, `led->fade out` to gradua
|
||||
|
||||
## Documentation
|
||||
|
||||
* **plot image** : [read more...](/microbit/reference/led/plot-image)
|
||||
* **fade out** : [read more...](/microbit/reference/led/fade-out)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **fade in** : [read more...](/microbit/reference/led/fade-in)
|
||||
* **plot image** : [read more...](/reference/led/plot-image)
|
||||
* **fade out** : [read more...](/reference/led/fade-out)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
* **fade in** : [read more...](/reference/led/fade-in)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/glowing-sword/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/glowing-sword/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/glowing-sword/challenges)
|
||||
* Activity: [tutorial](/lessons/glowing-sword/tutorial)
|
||||
* Activity: [quiz](/lessons/glowing-sword/quiz)
|
||||
* Extended Activity: [challenges](/lessons/glowing-sword/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -79,17 +79,17 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/glowing-sword/tutorial)
|
||||
* [quiz](/microbit/lessons/lucky-7/quiz)
|
||||
* [tutorial](/lessons/glowing-sword/tutorial)
|
||||
* [quiz](/lessons/lucky-7/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/glowing-sword/challenges)
|
||||
* [challenges](/lessons/glowing-sword/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/glowing-sword/challenges)
|
||||
* Extended Activity: [challenges](/lessons/glowing-sword/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -57,7 +57,7 @@ led.fadeIn(700) // ***
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/glowing-sword/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/glowing-sword/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the glowing sword tutorial. #docs
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [glowing sword](/microbit/lessons/glowing-sword/activity) activity and your code will look like this:
|
||||
Complete the [glowing sword](/lessons/glowing-sword/activity) activity and your code will look like this:
|
||||
|
||||
```
|
||||
basic.plotImage(`
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
The answers for the glowing sword quiz.
|
||||
|
||||
This is the answer key for the [glowing sword quiz](/microbit/lessons/glowing-sword/quiz).
|
||||
This is the answer key for the [glowing sword quiz](/lessons/glowing-sword/quiz).
|
||||
|
||||
## 1. What is "fade out" ?
|
||||
|
||||
|
@ -6,7 +6,7 @@ make a glowing sword.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [glowing sword tutorial](/microbit/lessons/glowing-sword/tutorial)
|
||||
Use this activity document to guide your work in the [glowing sword tutorial](/lessons/glowing-sword/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,11 +10,11 @@ Math - Random Numbers
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/guess-the-number/activity)
|
||||
* [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* [quiz](/microbit/lessons/guess-the-number/quiz)
|
||||
* [quiz answers](/microbit/lessons/guess-the-number/quiz-answers)
|
||||
* [tutorial](/microbit/lessons/guess-the-number/tutorial)
|
||||
* [activity](/lessons/guess-the-number/activity)
|
||||
* [challenges](/lessons/guess-the-number/challenges)
|
||||
* [quiz](/lessons/guess-the-number/quiz)
|
||||
* [quiz answers](/lessons/guess-the-number/quiz-answers)
|
||||
* [tutorial](/lessons/guess-the-number/tutorial)
|
||||
|
||||
## Class
|
||||
|
||||
@ -26,12 +26,12 @@ Learn how to create numbers randomly by using the input of the BBC micro:bit. We
|
||||
|
||||
## Documentation
|
||||
|
||||
* **on button pressed**: [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **local variable **: [read more...](/microbit/reference/variables/var)
|
||||
* **assignment operator**: [read more...](/microbit/reference/variables/assign)
|
||||
* **show number**: [read more...](/microbit/reference/basic/show-number)
|
||||
* **random numbers**: [read more...](/microbit/js/math)
|
||||
* **clear screen**: [read more...](/microbit/reference/basic/clear-screen)
|
||||
* **on button pressed**: [read more...](/reference/input/on-button-pressed)
|
||||
* **local variable **: [read more...](/reference/variables/var)
|
||||
* **assignment operator**: [read more...](/reference/variables/assign)
|
||||
* **show number**: [read more...](/reference/basic/show-number)
|
||||
* **random numbers**: [read more...](/js/math)
|
||||
* **clear screen**: [read more...](/reference/basic/clear-screen)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -69,16 +69,16 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/guess-the-number/activity)
|
||||
* [tutorial](/microbit/lessons/guess-the-number/tutorial)
|
||||
* [quiz](/microbit/lessons/guess-the-number/quiz)
|
||||
* [activity](/lessons/guess-the-number/activity)
|
||||
* [tutorial](/lessons/guess-the-number/tutorial)
|
||||
* [quiz](/lessons/guess-the-number/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* [challenges](/lessons/guess-the-number/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* Extended Activity: [challenges](/lessons/guess-the-number/challenges)
|
||||
|
||||
|
@ -10,7 +10,7 @@ Welcome! This tutorial will help you create a guess the number game! Let's get s
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap New Project under **Touch Develop**.
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap New Project under **Touch Develop**.
|
||||
|
||||
Add an event handler when button `A` is pressed.
|
||||
|
||||
@ -38,7 +38,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/guess-the-number/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/guess-the-number/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the guess the number tutorial. #docs
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/guess-the-number/tutorial)
|
||||
* [tutorial](/lessons/guess-the-number/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -30,15 +30,15 @@ Learn how to create numbers randomly by using the input of the BBC micro:bit. We
|
||||
|
||||
## Documentation
|
||||
|
||||
* **local variables**: [read more...](/microbit/reference/variables/var)
|
||||
* **math**: [read more...](/microbit/js/math)
|
||||
* **on button pressed**: [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **local variables**: [read more...](/reference/variables/var)
|
||||
* **math**: [read more...](/js/math)
|
||||
* **on button pressed**: [read more...](/reference/input/on-button-pressed)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/guess-the-number/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/guess-the-number/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* Activity: [tutorial](/lessons/guess-the-number/tutorial)
|
||||
* Activity: [quiz](/lessons/guess-the-number/quiz)
|
||||
* Extended Activity: [challenges](/lessons/guess-the-number/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -79,19 +79,19 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/guess-the-number/tutorial)
|
||||
* [quiz](/microbit/lessons/guess-the-number/quiz)
|
||||
* [tutorial](/lessons/guess-the-number/tutorial)
|
||||
* [quiz](/lessons/guess-the-number/quiz)
|
||||
* assessment opportunities: forever, plot, pause, clear screen
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* [challenges](/lessons/guess-the-number/challenges)
|
||||
* assessment opportunities: loops, plot, pause, clear screen
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* Extended Activity: [challenges](/lessons/guess-the-number/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -8,7 +8,7 @@ Hack your headphone
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/hack-your-headphones/activity)
|
||||
* [activity](/lessons/hack-your-headphones/activity)
|
||||
|
||||
## Class
|
||||
|
||||
|
@ -52,5 +52,5 @@ You hacked your headphones!
|
||||
|
||||
### Step 6
|
||||
|
||||
Connect your BBC micro:bit to your computer using your USB cable and run the [happy birthday](/microbit/dnnzgd) script on it. Press the reset button to restart your music player!
|
||||
Connect your BBC micro:bit to your computer using your USB cable and run the [happy birthday](/dnnzgd) script on it. Press the reset button to restart your music player!
|
||||
|
||||
|
@ -10,10 +10,10 @@ Break
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [tutorial](/microbit/lessons/jailbreak/tutorial)
|
||||
* [quiz](/microbit/lessons/jailbreak/quiz)
|
||||
* [quiz answers](/microbit/lessons/jailbreak/quiz-answers)
|
||||
* [challenges](/microbit/lessons/jailbreak/challenges)
|
||||
* [tutorial](/lessons/jailbreak/tutorial)
|
||||
* [quiz](/lessons/jailbreak/quiz)
|
||||
* [quiz answers](/lessons/jailbreak/quiz-answers)
|
||||
* [challenges](/lessons/jailbreak/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -25,16 +25,16 @@ Learn how to create a **break**, `break` to exit a while or for loop before the
|
||||
|
||||
## Documentation
|
||||
|
||||
* **Global Variable** : [read more...](/microbit/js/data)
|
||||
* **Boolean** : [read more...](/microbit/reference/types/boolean)
|
||||
* **On Button Pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **While Loop** : [read more...](/microbit/js/while)
|
||||
* **Break** : [read more...](/microbit/js/break)
|
||||
* **If (Conditional)** : [read more...](/microbit/reference/logic/if)
|
||||
* **Show String** : [read more...](/microbit/reference/basic/show-string)
|
||||
* **Plot Image ** : [read more...](/microbit/reference/led/plot-image)
|
||||
* **Show Number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **Pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **Global Variable** : [read more...](/js/data)
|
||||
* **Boolean** : [read more...](/reference/types/boolean)
|
||||
* **On Button Pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **While Loop** : [read more...](/js/while)
|
||||
* **Break** : [read more...](/js/break)
|
||||
* **If (Conditional)** : [read more...](/reference/logic/if)
|
||||
* **Show String** : [read more...](/reference/basic/show-string)
|
||||
* **Plot Image ** : [read more...](/reference/led/plot-image)
|
||||
* **Show Number** : [read more...](/reference/basic/show-number)
|
||||
* **Pause** : [read more...](/reference/basic/pause)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -94,15 +94,15 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/jailbreak/tutorial)
|
||||
* [quiz](/microbit/lessons/jailbreak/quiz)
|
||||
* [tutorial](/lessons/jailbreak/tutorial)
|
||||
* [quiz](/lessons/jailbreak/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/jailbreak/challenges)
|
||||
* [challenges](/lessons/jailbreak/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/jailbreak/challenges)
|
||||
* Extended Activity: [challenges](/lessons/jailbreak/challenges)
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the jailbreak tutorial.#docs
|
||||
|
||||
Complete the following guided tutorial:
|
||||
|
||||
* [tutorial](/microbit/lessons/jailbreak/tutorial)
|
||||
* [tutorial](/lessons/jailbreak/tutorial)
|
||||
|
||||
At the end of the tutorial, click `keep editing`. Your code should look like this:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
break out of a counting loop by pressing button "A".
|
||||
|
||||
This is the answer key for the [jailbreak quiz](/microbit/lessons/jailbreak/quiz).
|
||||
This is the answer key for the [jailbreak quiz](/lessons/jailbreak/quiz).
|
||||
|
||||
## 1. What does a 'break' statement do to a 'loop' ?
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user