batch fixing ](/microbit/ -> ](/ links

This commit is contained in:
Peli de Halleux
2016-04-13 08:27:45 -07:00
parent 2e49901a7e
commit d28efb3b84
517 changed files with 2235 additions and 2235 deletions

View File

@ -8,11 +8,11 @@ input.acceleration(Dimension.X);
### Parameters
* dimension : [String](/microbit/reference/types/string) - one of three values specifying the axis of acceleration: ``x`` (left/right); ``y`` (forward/backwards); ``z`` (up/down)
* dimension : [String](/reference/types/string) - one of three values specifying the axis of acceleration: ``x`` (left/right); ``y`` (forward/backwards); ``z`` (up/down)
### Returns
* [Number](/microbit/reference/types/number) - acceleration, in milli-gravities. When the micro:bit is laying flat with the screen up, x=0, y=0 and z=-1023.
* [Number](/reference/types/number) - acceleration, in milli-gravities. When the micro:bit is laying flat with the screen up, x=0, y=0 and z=-1023.
### Example: bar chart
@ -41,9 +41,9 @@ basic.forever(() => {
### Lessons
[zoomer](/microbit/lessons/zoomer)
[zoomer](/lessons/zoomer)
### See also
[compass-heading](/microbit/input/compass-heading), [lightlevel](/microbit/input/lightlevel)
[compass-heading](/input/compass-heading), [lightlevel](/input/lightlevel)

View File

@ -8,15 +8,15 @@ input.buttonIsPressed(Button.A);
### Parameters
* name - [String](/microbit/reference/types/string); input button "A", "B", or "A+B" (both input buttons)
* name - [String](/reference/types/string); input button "A", "B", or "A+B" (both input buttons)
### Returns
* [Boolean](/microbit/reference/types/boolean) - `true` if pressed, `false` if not pressed
* [Boolean](/reference/types/boolean) - `true` if pressed, `false` if not pressed
### Example
The following code uses an [if](/microbit/reference/logic/if) statement to run code, depending on whether or not the A button is pressed:
The following code uses an [if](/reference/logic/if) statement to run code, depending on whether or not the A button is pressed:
```blocks
basic.forever(() => {
@ -33,9 +33,9 @@ basic.forever(() => {
### Lessons
[zoomer](/microbit/lessons/zoomer)
[zoomer](/lessons/zoomer)
### See also
[on button pressed](/microbit/input/on-button-pressed), [if](/microbit/reference/logic/if), [forever](/microbit/basic/forever)
[on button pressed](/input/on-button-pressed), [if](/reference/logic/if), [forever](/basic/forever)

View File

@ -8,7 +8,7 @@ input.compassHeading();
### Returns
* [Number](/microbit/reference/types/number) - the heading in degrees (0 to 360 degrees). If the compass is calibrating, it returns ``-1003``.
* [Number](/reference/types/number) - the heading in degrees (0 to 360 degrees). If the compass is calibrating, it returns ``-1003``.
## Simulator
@ -55,9 +55,9 @@ During calibration, ``compass heading`` returns ``-1003``.
### Lessons
[compass](/microbit/lessons/compass)
[compass](/lessons/compass)
### See also
[acceleration](/microbit/reference/input/acceleration)
[acceleration](/reference/input/acceleration)

View File

@ -10,7 +10,7 @@ input.lightLevel();
### Returns
* [Number](/microbit/reference/types/number) - light level from ``0`` (dark) to ``255`` (bright).
* [Number](/reference/types/number) - light level from ``0`` (dark) to ``255`` (bright).
### Example: chart light level
@ -26,5 +26,5 @@ basic.forever(() => {
### See also
[acceleration](/microbit/reference/input/acceleration), [compass-heading](/microbit/input/compass-heading)
[acceleration](/reference/input/acceleration), [compass-heading](/input/compass-heading)

View File

@ -8,11 +8,11 @@ input.magneticForce(Dimension.X);
### Parameters
* dimension : [String](/microbit/reference/types/string) - one of three values specifying the axis of the force: ``x`` (left/right); ``y`` (forward/backwards); ``z`` (up/down); ``strength`` (the length of the vector)
* dimension : [String](/reference/types/string) - one of three values specifying the axis of the force: ``x`` (left/right); ``y`` (forward/backwards); ``z`` (up/down); ``strength`` (the length of the vector)
### Returns
* [Number](/microbit/reference/types/number) - magnetic force, in micro-Teslas.
* [Number](/reference/types/number) - magnetic force, in micro-Teslas.
### Example: metal detector
@ -28,5 +28,5 @@ basic.forever(() => {
### See also
[compass heading](/microbit/input/compass-heading)
[compass heading](/input/compass-heading)

View File

@ -1,6 +1,6 @@
# On Button Pressed
Register an [event handler](/microbit/reference/event-handler) that will execute whenever an input button (A, B, or A and B together) is pressed during program execution. When [running code](/microbit/js/simulator) with this function in a web browser, click an on-screen input button - labelled A or B.
Register an [event handler](/reference/event-handler) that will execute whenever an input button (A, B, or A and B together) is pressed during program execution. When [running code](/js/simulator) with this function in a web browser, click an on-screen input button - labelled A or B.
```sig
input.onButtonPressed(Button.A, () => {})
@ -32,9 +32,9 @@ input.onButtonPressed(Button.B, () => {
### Lessons
[smiley](/microbit/lessons/smiley), [answering machine](/microbit/lessons/answering-machine), [screen wipe](/microbit/lessons/screen-wipe), [rotation animation](/microbit/lessons/rotation-animation)
[smiley](/lessons/smiley), [answering machine](/lessons/answering-machine), [screen wipe](/lessons/screen-wipe), [rotation animation](/lessons/rotation-animation)
### See also
[button is pressed](/microbit/reference/input/button-is-pressed), [forever](/microbit/reference/basic/forever)
[button is pressed](/reference/input/button-is-pressed), [forever](/reference/basic/forever)

View File

@ -1,6 +1,6 @@
# On Gesture
Register an [event handler](/microbit/reference/event-handler) that will execute whenever the user executes a gesture withthe BBC micro:bit.
Register an [event handler](/reference/event-handler) that will execute whenever the user executes a gesture withthe BBC micro:bit.
```sig
input.onGesture(Gesture.Shake,() => {
@ -41,5 +41,5 @@ input.onGesture(Gesture.Shake,() => {
### Lessons
[bounce image](/microbit/lessons/bounce-image), [rock paper scissors](/microbit/lessons/rock-paper-scissors)
[bounce image](/lessons/bounce-image), [rock paper scissors](/lessons/rock-paper-scissors)

View File

@ -1,6 +1,6 @@
# On Pin Pressed
Register an [event handler](/microbit/reference/event-handler) that will execute whenever the user holds the `GND` pin with one hand, and presses pin `0`, `1`, or `2` with the other hand, thus completing a circuit; when you run a script with this function in a web browser, click pins 0 , 1, or 2 on the simulator.
Register an [event handler](/reference/event-handler) that will execute whenever the user holds the `GND` pin with one hand, and presses pin `0`, `1`, or `2` with the other hand, thus completing a circuit; when you run a script with this function in a web browser, click pins 0 , 1, or 2 on the simulator.
*Note* that this function works best when the BBC micro:bit is powered by AAA battery.
@ -24,9 +24,9 @@ input.onPinPressed(TouchPin.P0, () => {
### Lessons
[love meter](/microbit/lessons/love-meter)
[love meter](/lessons/love-meter)
### See also
[BBC micro:bit pins](/microbit/device/pins), [pin is pressed](/microbit/input/pin-is-pressed), [analog read pin](/microbit/pins/analog-read-pin), [analog write pin](/microbit/pins/analog-write-pin), [digital read pin](/microbit/pins/digital-read-pin), [digital write pin](/microbit/pins/digital-write-pin)
[BBC micro:bit pins](/device/pins), [pin is pressed](/input/pin-is-pressed), [analog read pin](/pins/analog-read-pin), [analog write pin](/pins/analog-write-pin), [digital read pin](/pins/digital-read-pin), [digital write pin](/pins/digital-write-pin)

View File

@ -10,11 +10,11 @@ input.pinIsPressed(TouchPin.P0);
### Parameters
* name - [String](/microbit/reference/types/string); the pin name ("P0", "P1", or "P2")
* name - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
### returns
* [Boolean](/microbit/reference/types/boolean) - `true` if pressed, `false` if not pressed
* [Boolean](/reference/types/boolean) - `true` if pressed, `false` if not pressed
### Example
@ -32,5 +32,5 @@ basic.forever(() => {
### See also
[BBC micro:bit pins](/microbit/device/pins), [on pin pressed](/microbit/input/on-pin-pressed), [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)
[BBC micro:bit pins](/device/pins), [on pin pressed](/input/on-pin-pressed), [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)

View File

@ -8,11 +8,11 @@ input.rotation(Rotation.Roll);
### Parameters
* kind: [String](/microbit/reference/types/string) - one of values specifying the kind of rotation: ``pitch`` (up/down around the ``x`` axis); ``roll`` (left/right around the ``y`` axis)
* kind: [String](/reference/types/string) - one of values specifying the kind of rotation: ``pitch`` (up/down around the ``x`` axis); ``roll`` (left/right around the ``y`` axis)
### Returns
* [Number](/microbit/reference/types/number) - angle, in degrees.
* [Number](/reference/types/number) - angle, in degrees.
### Example: micro:bit leveller
@ -44,5 +44,5 @@ basic.forever(() => {
### See also
[acceleration](/microbit/reference/input/acceleration), [compass-heading](/microbit/reference/input/compass-heading)
[acceleration](/reference/input/acceleration), [compass-heading](/reference/input/compass-heading)

View File

@ -8,7 +8,7 @@ input.runningTime();
### Returns
* [Number](/microbit/reference/types/number)
* [Number](/reference/types/number)
### Example: elapsed time
@ -21,9 +21,9 @@ basic.showNumber(now)
### Lessons
[speed button](/microbit/lessons/speed-button)
[speed button](/lessons/speed-button)
### See also
[show number](/microbit/reference/basic/show-number), [pause](/microbit/reference/basic/pause)
[show number](/reference/basic/show-number), [pause](/reference/basic/pause)

View File

@ -8,11 +8,11 @@ input.temperature();
### Returns
* [Number](/microbit/reference/types/number) - temperature in degree Celsius °C.
* [Number](/reference/types/number) - temperature in degree Celsius °C.
### How does it work?
The BBC micro:bit does not have a dedicated temperature sensor. Instead, the temperature provided is actually the temperature of the silicon die on the main CPU. As the processor generally runs cold though (it is a high efficiency ARM core), the temperature is a good approximation of the ambient temperature... you might warm up if you give the processor a lot of work to do though, and don't [sleep](/microbit/reference/basic/pause)!
The BBC micro:bit does not have a dedicated temperature sensor. Instead, the temperature provided is actually the temperature of the silicon die on the main CPU. As the processor generally runs cold though (it is a high efficiency ARM core), the temperature is a good approximation of the ambient temperature... you might warm up if you give the processor a lot of work to do though, and don't [sleep](/reference/basic/pause)!
The temperature sensor has a high precision, but isn't trimmed for accuracy. In other words, it can sense changes in temperature very well, but there may be (and probably is) base line offset. i.e. it might return 20 degrees when it's actually 17, but it would return 21 when it is 18 etc.
@ -31,5 +31,5 @@ basic.forever(() => {
### See also
[compass-heading](/microbit/reference/input/compass-heading), [acceleration](/microbit/reference/input/acceleration)
[compass-heading](/reference/input/compass-heading), [acceleration](/reference/input/acceleration)