batch fixing ](/microbit/ -> ](/ links
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# Brightness
|
||||
|
||||
Set the brightness of the [LED screen](/microbit/device/screen).
|
||||
Set the brightness of the [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
led.brightness();
|
||||
@ -8,7 +8,7 @@ led.brightness();
|
||||
|
||||
### Returns
|
||||
|
||||
* [Number](/microbit/reference/types/number) - returns the LCD screen brightness as a number from 0 to 255. A return value of 255 means the screen brightness is at 100% and 127 is about 50% brightness.
|
||||
* [Number](/reference/types/number) - returns the LCD screen brightness as a number from 0 to 255. A return value of 255 means the screen brightness is at 100% and 127 is about 50% brightness.
|
||||
|
||||
### Example: maximum brightness
|
||||
|
||||
@ -22,5 +22,5 @@ if (led.brightness() < 255) {
|
||||
|
||||
### See also
|
||||
|
||||
[set brightness](/microbit/reference/led/set-brightness), [fade in](/microbit/reference/led/fade-in), [fade out](/microbit/reference/led/fade-out)
|
||||
[set brightness](/reference/led/set-brightness), [fade in](/reference/led/fade-in), [fade out](/reference/led/fade-out)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fade in
|
||||
|
||||
Gradually increase the [LED screen](/microbit/device/screen) brightness until the LED lights are at full brightness.
|
||||
Gradually increase the [LED screen](/device/screen) brightness until the LED lights are at full brightness.
|
||||
|
||||
```sig
|
||||
led.fadeIn(700);
|
||||
@ -8,7 +8,7 @@ led.fadeIn(700);
|
||||
|
||||
### Parameters
|
||||
|
||||
* ms - [Number](/microbit/reference/types/number); the speed by which the screen brightness is increased, expressed in milliseconds (1,000 milliseconds = 1 second). The smaller the number the faster the screen brightness increased.
|
||||
* ms - [Number](/reference/types/number); the speed by which the screen brightness is increased, expressed in milliseconds (1,000 milliseconds = 1 second). The smaller the number the faster the screen brightness increased.
|
||||
|
||||
### Example: fading dot
|
||||
|
||||
@ -26,9 +26,9 @@ for (let i = 0; i < 5; i++) {
|
||||
|
||||
### Lessons
|
||||
|
||||
[glowing sword](/microbit/lessons/glowing-sword)
|
||||
[glowing sword](/lessons/glowing-sword)
|
||||
|
||||
### See also
|
||||
|
||||
[brightness](/microbit/reference/led/brightness), [fade out](/microbit/reference/led/fade-out), [set brightness](/microbit/reference/led/set-brightness)
|
||||
[brightness](/reference/led/brightness), [fade out](/reference/led/fade-out), [set brightness](/reference/led/set-brightness)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Fade out
|
||||
|
||||
Gradually decrease the [LED screen](/microbit/device/screen) brightness until the LED lights are turned off.
|
||||
Gradually decrease the [LED screen](/device/screen) brightness until the LED lights are turned off.
|
||||
|
||||
```sig
|
||||
led.fadeOut(700);
|
||||
@ -8,7 +8,7 @@ led.fadeOut(700);
|
||||
|
||||
### Parameters
|
||||
|
||||
* ms - [Number](/microbit/reference/types/number); the speed that the screen brightness is decreased, expressed in milliseconds (1,000 milliseconds = 1 second). The smaller the number the faster the screen brightness decreased.
|
||||
* ms - [Number](/reference/types/number); the speed that the screen brightness is decreased, expressed in milliseconds (1,000 milliseconds = 1 second). The smaller the number the faster the screen brightness decreased.
|
||||
|
||||
### Example: fade away letter A
|
||||
|
||||
@ -22,9 +22,9 @@ led.fadeOut(1000)
|
||||
|
||||
### Lessons
|
||||
|
||||
[glowing sword](/microbit/lessons/glowing-sword)
|
||||
[glowing sword](/lessons/glowing-sword)
|
||||
|
||||
### See also
|
||||
|
||||
[brightness](/microbit/reference/led/brightness), [fade in](/microbit/reference/led/fade-in), [set brightness](/microbit/reference/led/set-brightness)
|
||||
[brightness](/reference/led/brightness), [fade in](/reference/led/fade-in), [set brightness](/reference/led/set-brightness)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Plot All
|
||||
|
||||
Turn on all the 25 LEDs on the [LED screen](/microbit/device/screen).
|
||||
Turn on all the 25 LEDs on the [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
led.plotAll()
|
||||
@ -8,9 +8,9 @@ led.plotAll()
|
||||
|
||||
### Lessons
|
||||
|
||||
[night light](/microbit/lessons/night-light)
|
||||
[night light](/lessons/night-light)
|
||||
|
||||
### See also
|
||||
|
||||
[LED screen](/microbit/device/screen), [clear screen](/microbit/reference/basic/clear-screen)
|
||||
[LED screen](/device/screen), [clear screen](/reference/basic/clear-screen)
|
||||
|
||||
|
@ -8,7 +8,7 @@ led.plotBarGraph(2, 20);
|
||||
|
||||
### Parameters
|
||||
|
||||
* value: [Number](/microbit/reference/types/number) , high : [Number](/microbit/reference/types/number) displays a vertical bar graph based on the value and high value
|
||||
* value: [Number](/reference/types/number) , high : [Number](/reference/types/number) displays a vertical bar graph based on the value and high value
|
||||
|
||||
### Example: chart acceleration
|
||||
|
||||
@ -21,5 +21,5 @@ basic.forever(() => {
|
||||
|
||||
### See also
|
||||
|
||||
[brightness](/microbit/reference/led/brightness), [fade in](/microbit/reference/led/fade-in), [fade out](/microbit/reference/led/fade-out), [LED screen](/microbit/device/screen), [stop animation](/microbit/reference/led/stop-animation)
|
||||
[brightness](/reference/led/brightness), [fade in](/reference/led/fade-in), [fade out](/reference/led/fade-out), [LED screen](/device/screen), [stop animation](/reference/led/stop-animation)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Plot LEDs
|
||||
|
||||
Display an [Image](/microbit/reference/image/image) on the BBC micro:bit's [LED screen](/microbit/device/screen). NOTE: `basic -> plot image` has been replaced by `basic -> show leds`.
|
||||
Display an [Image](/reference/image/image) on the BBC micro:bit's [LED screen](/device/screen). NOTE: `basic -> plot image` has been replaced by `basic -> show leds`.
|
||||
|
||||
### KindScript syntax
|
||||
|
||||
@ -32,9 +32,9 @@ basic.plotLeds(`
|
||||
|
||||
### Lessons
|
||||
|
||||
[smiley](/microbit/lessons/smiley), [flashing heart](/microbit/lessons/flashing-heart), [magic logo](/microbit/lessons/magic-logo)
|
||||
[smiley](/lessons/smiley), [flashing heart](/lessons/flashing-heart), [magic logo](/lessons/magic-logo)
|
||||
|
||||
### See also
|
||||
|
||||
[show animation](/microbit/reference/basic/show-animation), [image](/microbit/reference/image/image), [show image](/microbit/reference/images/show-image), [scroll image](/microbit/reference/images/scroll-image)
|
||||
[show animation](/reference/basic/show-animation), [image](/reference/image/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Plot
|
||||
|
||||
Turn on a LED light on the [LED screen](/microbit/device/screen). Specify which LED using x, y coordinates. Use [unplot](/microbit/reference/led/unplot) to turn a LED off.
|
||||
Turn on a LED light on the [LED screen](/device/screen). Specify which LED using x, y coordinates. Use [unplot](/reference/led/unplot) to turn a LED off.
|
||||
|
||||
```sig
|
||||
led.plot(0,0);
|
||||
@ -8,14 +8,14 @@ led.plot(0,0);
|
||||
|
||||
### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
|
||||
If a parameter is [out of bounds](/microbit/reference/out-of-bounds) (a value other than 0-4), then this function will do nothing.
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value other than 0-4), then this function will do nothing.
|
||||
|
||||
### x, y coordinates?
|
||||
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
|
||||
|
||||
This code turns on the centre LED:
|
||||
|
||||
@ -25,11 +25,11 @@ led.plot(2, 2)
|
||||
|
||||
### Get the LED on/off state
|
||||
|
||||
Use the [point](/microbit/reference/led/point) function to find out if a LED is on or off.
|
||||
Use the [point](/reference/led/point) function to find out if a LED is on or off.
|
||||
|
||||
### Example: a square
|
||||
|
||||
The following example uses a [for loop](/microbit/reference/loops/for) and the `plot` function to turn on the LED lights along the edge of the screen, making a square:
|
||||
The following example uses a [for loop](/reference/loops/for) and the `plot` function to turn on the LED lights along the edge of the screen, making a square:
|
||||
|
||||
```blocks
|
||||
for (let i = 0; i < 5; i++) {
|
||||
@ -43,9 +43,9 @@ for (let i = 0; i < 5; i++) {
|
||||
|
||||
### Lessons
|
||||
|
||||
[blink](/microbit/lessons/blink), [beautiful image](/microbit/lessons/beautiful-image), [strobe light](/microbit/lessons/strobe-light)
|
||||
[blink](/lessons/blink), [beautiful image](/lessons/beautiful-image), [strobe light](/lessons/strobe-light)
|
||||
|
||||
### See also
|
||||
|
||||
[unplot](/microbit/reference/led/unplot), [point](/microbit/reference/led/point), [LED screen](/microbit/device/screen)
|
||||
[unplot](/reference/led/unplot), [point](/reference/led/point), [LED screen](/device/screen)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Point
|
||||
|
||||
Get the on/off state of a LED on the [LED screen](/microbit/device/screen). Specify the LED using x, y coordinates.
|
||||
Get the on/off state of a LED on the [LED screen](/device/screen). Specify the LED using x, y coordinates.
|
||||
|
||||
```sig
|
||||
led.point(0,0);
|
||||
@ -8,18 +8,18 @@ led.point(0,0);
|
||||
|
||||
### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
|
||||
If a parameter is [out of bounds](/microbit/reference/out-of-bounds) (a value other than 0-4), then this function will return `false`.
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value other than 0-4), then this function will return `false`.
|
||||
|
||||
### Returns
|
||||
|
||||
* [Boolean](/microbit/reference/types/boolean) - `true` if the LED is *on* and `false` if the LED is *off*
|
||||
* [Boolean](/reference/types/boolean) - `true` if the LED is *on* and `false` if the LED is *off*
|
||||
|
||||
### x, y coordinates?
|
||||
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
|
||||
|
||||
### Example: toggle off
|
||||
|
||||
@ -33,5 +33,5 @@ if (led.point(1, 1)) {
|
||||
|
||||
### See also
|
||||
|
||||
[unplot](/microbit/reference/led/unplot), [plot](/microbit/reference/led/plot), [LED screen](/microbit/device/screen), [create image](/microbit/reference/images/create-image)
|
||||
[unplot](/reference/led/unplot), [plot](/reference/led/plot), [LED screen](/device/screen), [create image](/reference/images/create-image)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Screenshot
|
||||
|
||||
Make an [Image](/microbit/reference/image/image) out of the current state of the [LED screen](/microbit/device/screen).
|
||||
Make an [Image](/reference/image/image) out of the current state of the [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
led.screenshot();
|
||||
@ -12,9 +12,9 @@ led.screenshot();
|
||||
|
||||
### Returns
|
||||
|
||||
* an [Image](/microbit/reference/image/image) of what is currently visible on the [LED screen](/microbit/device/screen)
|
||||
* an [Image](/reference/image/image) of what is currently visible on the [LED screen](/device/screen)
|
||||
|
||||
### See also
|
||||
|
||||
[create image](/microbit/reference/images/create-image), [LED screen](/microbit/device/screen),
|
||||
[create image](/reference/images/create-image), [LED screen](/device/screen),
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Set Brightness
|
||||
|
||||
Sets the brightness of the [LED screen](/microbit/device/screen).
|
||||
Sets the brightness of the [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
led.setBrightness(121)
|
||||
@ -8,7 +8,7 @@ led.setBrightness(121)
|
||||
|
||||
### Parameters
|
||||
|
||||
* value : [Number](/microbit/reference/types/number) - the brightness of the LED screen expressed as a number between 0 and 255
|
||||
* value : [Number](/reference/types/number) - the brightness of the LED screen expressed as a number between 0 and 255
|
||||
|
||||
### Example: change brightness
|
||||
|
||||
@ -23,9 +23,9 @@ led.setBrightness(127)
|
||||
|
||||
### Lessons
|
||||
|
||||
[night light](/microbit/lessons/night-light)
|
||||
[night light](/lessons/night-light)
|
||||
|
||||
### See also
|
||||
|
||||
[brightness](/microbit/reference/led/brightness), [fade in](/microbit/reference/led/fade-in), [fade out](/microbit/reference/led/fade-out), [LED screen](/microbit/device/screen)
|
||||
[brightness](/reference/led/brightness), [fade in](/reference/led/fade-in), [fade out](/reference/led/fade-out), [LED screen](/device/screen)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Set Display Mode
|
||||
|
||||
Sets the display mode between black and white and greyscale for rendering [LEDs](/microbit/device/screen).
|
||||
Sets the display mode between black and white and greyscale for rendering [LEDs](/device/screen).
|
||||
|
||||
```sig
|
||||
led.setDisplayMode(DisplayMode.Greyscale)
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Toggle All
|
||||
|
||||
Toggle all the 25 LEDs on the [LED screen](/microbit/device/screen) - if an LED is on before the function is called, it will be off after; if an LED is off before the function is called, it will be on after.
|
||||
Toggle all the 25 LEDs on the [LED screen](/device/screen) - if an LED is on before the function is called, it will be off after; if an LED is off before the function is called, it will be on after.
|
||||
|
||||
```sig
|
||||
led.toggleAll()
|
||||
@ -24,5 +24,5 @@ led.toggleAll()
|
||||
|
||||
### See also
|
||||
|
||||
[toggle](/microbit/reference/led/toggle), [LED screen](/microbit/device/screen), [clear screen](/microbit/reference/basic/clear-screen)
|
||||
[toggle](/reference/led/toggle), [LED screen](/device/screen), [clear screen](/reference/basic/clear-screen)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Toggle
|
||||
|
||||
Toggle a LED light on the [LED screen](/microbit/device/screen), meaning to turn it on (off) if it is off (on). Specify which LED using x, y coordinates.
|
||||
Toggle a LED light on the [LED screen](/device/screen), meaning to turn it on (off) if it is off (on). Specify which LED using x, y coordinates.
|
||||
|
||||
```sig
|
||||
led.toggle(0,0)
|
||||
@ -8,14 +8,14 @@ led.toggle(0,0)
|
||||
|
||||
### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
|
||||
If a parameter is [out of bounds](/microbit/reference/out-of-bounds) (a value other than 0-4), then this function will do nothing.
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value other than 0-4), then this function will do nothing.
|
||||
|
||||
### x, y coordinates?
|
||||
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
|
||||
|
||||
### Example
|
||||
|
||||
@ -27,5 +27,5 @@ led.toggle(2, 2)
|
||||
|
||||
### See also
|
||||
|
||||
[toggle all](/microbit/reference/led/toggle-all), [plot](/microbit/reference/led/plot), [unplot](/microbit/reference/led/unplot), [point](/microbit/reference/led/point), [LED screen](/microbit/device/screen),
|
||||
[toggle all](/reference/led/toggle-all), [plot](/reference/led/plot), [unplot](/reference/led/unplot), [point](/reference/led/point), [LED screen](/device/screen),
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Unplot
|
||||
|
||||
Turn off a LED light on the [LED screen](/microbit/device/screen). Specify which LED using x, y coordinates. Use [plot](/microbit/reference/led/plot) to turn a LED on.
|
||||
Turn off a LED light on the [LED screen](/device/screen). Specify which LED using x, y coordinates. Use [plot](/reference/led/plot) to turn a LED on.
|
||||
|
||||
```sig
|
||||
led.unplot(0,0)
|
||||
@ -8,14 +8,14 @@ led.unplot(0,0)
|
||||
|
||||
### Parameters
|
||||
|
||||
* x - [Number](/microbit/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/microbit/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
* x - [Number](/reference/types/number); the *x coordinate* or horizontal position (0, 1, 2, 3, 4)
|
||||
* y - [Number](/reference/types/number); the *y coordinate* or vertical position (0, 1, 2, 3, 4)
|
||||
|
||||
If a parameter is [out of bounds](/microbit/reference/out-of-bounds) (a value other than 0-4), this function will do nothing.
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value other than 0-4), this function will do nothing.
|
||||
|
||||
### x, y coordinates?
|
||||
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/microbit/device/screen).
|
||||
The LED screen is made up of 25 LEDs arranged in a 5x5 grid. To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen).
|
||||
|
||||
This code turns off centre LED:
|
||||
|
||||
@ -25,7 +25,7 @@ led.unplot(2, 2)
|
||||
|
||||
### Get the LED on/off state
|
||||
|
||||
Use the [point](/microbit/reference/led/point) function to find out if a LED is on or off.
|
||||
Use the [point](/reference/led/point) function to find out if a LED is on or off.
|
||||
|
||||
### Example: toggle off
|
||||
|
||||
@ -45,9 +45,9 @@ led.unplot(2, 2)
|
||||
|
||||
### Lessons
|
||||
|
||||
[strobe light](/microbit/lessons/strobe-light)
|
||||
[strobe light](/lessons/strobe-light)
|
||||
|
||||
### See also
|
||||
|
||||
[plot](/microbit/reference/led/plot), [point](/microbit/reference/led/point), [LED screen](/microbit/device/screen), [create image](/microbit/reference/images/create-image)
|
||||
[plot](/reference/led/plot), [point](/reference/led/point), [LED screen](/device/screen), [create image](/reference/images/create-image)
|
||||
|
||||
|
Reference in New Issue
Block a user