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

@ -1,6 +1,6 @@
# Analog Pitch
Emits a Pulse With Modulation (PWM) signal to the current pitch [pin](/microbit/device/pins). Use [analog set pitch pin](/microbit/reference/pins/analog-set-pitch-pin) to set the pitch pin.
Emits a Pulse With Modulation (PWM) signal to the current pitch [pin](/device/pins). Use [analog set pitch pin](/reference/pins/analog-set-pitch-pin) to set the pitch pin.
```sig
pins.analogPitch(440, 300)
@ -8,8 +8,8 @@ pins.analogPitch(440, 300)
### Parameters
* `frequency` : [Number](/microbit/reference/types/number)
* `ms`: [Number](/microbit/reference/types/number)
* `frequency` : [Number](/reference/types/number)
* `ms`: [Number](/reference/types/number)
### Example
@ -27,5 +27,5 @@ pins.analogPitch(frequency1, duration)
### See also
[micro:bit pins](/microbit/device/pins), [analog set period](/microbit/reference/pins/analog-set-period), [analog set pitch pin](/microbit/reference/pins/analog-set-pitch-pin)
[micro:bit pins](/device/pins), [analog set period](/reference/pins/analog-set-period), [analog set pitch pin](/reference/pins/analog-set-pitch-pin)

View File

@ -1,6 +1,6 @@
# Analog Read Pin
Read the specified [pin](/microbit/device/pins) (P0, P1, P2) as analog.
Read the specified [pin](/device/pins) (P0, P1, P2) as analog.
```sig
pins.analogReadPin(AnalogPin.P0)
@ -12,7 +12,7 @@ pins.analogReadPin(AnalogPin.P0)
### Returns
* [Number](/microbit/reference/types/number) - a number between 0 and 1023 (included)
* [Number](/reference/types/number) - a number between 0 and 1023 (included)
The following code reads `P1` and charts it on the screen:
@ -25,5 +25,5 @@ basic.forever(() => {
### See also
[micro:bit pins](/microbit/device/pins), [on pin pressed](/microbit/reference/input/on-pin-pressed), [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)
[micro:bit pins](/device/pins), [on pin pressed](/reference/input/on-pin-pressed), [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

@ -1,6 +1,6 @@
# Analog Set Period
Configures the period of the Pulse Width Modulation (PWM) on the specified analog [pin](/microbit/device/pins) (``P0``, ``P1`` or ``P2``). Prior to calling this function, the given pin should be set as analog.
Configures the period of the Pulse Width Modulation (PWM) on the specified analog [pin](/device/pins) (``P0``, ``P1`` or ``P2``). Prior to calling this function, the given pin should be set as analog.
```sig
pins.analogSetPeriod(AnalogPin.P0, 20000)
@ -8,8 +8,8 @@ pins.analogSetPeriod(AnalogPin.P0, 20000)
### Parameters
* `name` - [String](/microbit/reference/types/string); the pin name ("P0", "P1", or "P2")
* `micros` - a [Number](/microbit/reference/types/number) representing the micro-seconds of the analog period.
* `name` - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
* `micros` - a [Number](/reference/types/number) representing the micro-seconds of the analog period.
The following code
@ -20,5 +20,5 @@ pins.analogSetPeriod(AnalogPin.P0, 20000)
### See also
[micro:bit pins](/microbit/device/pins), [on pin pressed](/microbit/reference/input/on-pin-pressed), [analog read pin](/microbit/reference/pins/analog-read-pin), [digital read pin](/microbit/reference/pins/digital-read-pin), [digital write pin](/microbit/reference/pins/digital-write-pin)
[micro:bit pins](/device/pins), [on pin pressed](/reference/input/on-pin-pressed), [analog read pin](/reference/pins/analog-read-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)

View File

@ -1,6 +1,6 @@
# Analog Set Pitch Pin
Specify which [pin](/microbit/device/pins) (P0, P1, P2) is used to generate tones.
Specify which [pin](/device/pins) (P0, P1, P2) is used to generate tones.
```sig
pins.analogSetPitchPin(AnalogPin.P0)
@ -8,7 +8,7 @@ pins.analogSetPitchPin(AnalogPin.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")
### Example
@ -26,5 +26,5 @@ pins.analogPitch(frequency, duration)
### See also
[micro:bit pins](/microbit/device/pins), [analog set period](/microbit/reference/pins/analog-set-period), [analog pitch](/microbit/reference/pins/analog-pitch)
[micro:bit pins](/device/pins), [analog set period](/reference/pins/analog-set-period), [analog pitch](/reference/pins/analog-pitch)

View File

@ -1,6 +1,6 @@
# Analog Write Pin
Write to the specified [pin](/microbit/device/pins) (P0, P1, P2) as analog.
Write to the specified [pin](/device/pins) (P0, P1, P2) as analog.
```sig
pins.analogWritePin(AnalogPin.P0, 400)
@ -8,8 +8,8 @@ pins.analogWritePin(AnalogPin.P0, 400)
### Parameters
* `name` - [String](/microbit/reference/types/string); the pin name ("P0", "P1", or "P2")
* `value` - a [Number](/microbit/reference/types/number) between 0 and 1023 included
* `name` - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
* `value` - a [Number](/reference/types/number) between 0 and 1023 included
The following code writes `1023` to the `P0` pin:
@ -19,5 +19,5 @@ pins.analogWritePin(AnalogPin.P0, 1023)
### See also
[micro:bit pins](/microbit/device/pins), [on pin pressed](/microbit/reference/input/on-pin-pressed), [analog read pin](/microbit/reference/pins/analog-read-pin), [digital read pin](/microbit/reference/pins/digital-read-pin), [digital write pin](/microbit/reference/pins/digital-write-pin)
[micro:bit pins](/device/pins), [on pin pressed](/reference/input/on-pin-pressed), [analog read pin](/reference/pins/analog-read-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)

View File

@ -2,7 +2,7 @@
The digital read pin function.
Digitally read the specified [pin](/microbit/device/pins) (``P0``, ``P1``, ``P2``, ...) as digital. **Some pins are also used by the display, read the [pin documentation ](/microbit/device/pins) carefully.**
Digitally read the specified [pin](/device/pins) (``P0``, ``P1``, ``P2``, ...) as digital. **Some pins are also used by the display, read the [pin documentation ](/device/pins) carefully.**
```sig
pins.digitalReadPin(DigitalPin.P3)
@ -14,7 +14,7 @@ pins.digitalReadPin(DigitalPin.P3)
### Returns
* [Number](/microbit/reference/types/number) - 0 or 1
* [Number](/reference/types/number) - 0 or 1
### Example: football score keeper
@ -36,5 +36,5 @@ basic.forever(() => {
### See also
[micro:bit pins](/microbit/device/pins), [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), [on pin pressed](/microbit/reference/input/on-pin-pressed), [pin is pressed](/microbit/reference/input/pin-is-pressed)
[micro:bit pins](/device/pins), [digital write pin](/reference/pins/digital-write-pin), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [on pin pressed](/reference/input/on-pin-pressed), [pin is pressed](/reference/input/pin-is-pressed)

View File

@ -1,6 +1,6 @@
# Digital Write Pin
Write the value ``0`` or ``1`` to the specified (digital) [pin](/microbit/device/pins). **Some pins are also used by the display, read the [pin documentation ](/microbit/device/pins) carefully.**
Write the value ``0`` or ``1`` to the specified (digital) [pin](/device/pins). **Some pins are also used by the display, read the [pin documentation ](/device/pins) carefully.**
```sig
pins.digitalWritePin(DigitalPin.P1, 1)
@ -9,7 +9,7 @@ pins.digitalWritePin(DigitalPin.P1, 1)
### Parameters
* name - the pin name (``P0``, ``P1``, ``P2``, ...)
* value - [Number](/microbit/reference/types/number); 0 or 1
* value - [Number](/reference/types/number); 0 or 1
### Example: football score keeper
@ -31,5 +31,5 @@ basic.forever(() => {
### See also
[micro:bit pins](/microbit/device/pins), [digital read pin](/microbit/reference/pins/digital-read-pin), [analog read pin](/microbit/reference/pins/analog-read-pin), [analog write pin](/microbit/reference/pins/analog-write-pin), [on pin pressed](/microbit/reference/input/on-pin-pressed), [pin is pressed](/microbit/reference/pins/pin-is-pressed)
[micro:bit pins](/device/pins), [digital read pin](/reference/pins/digital-read-pin), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [on pin pressed](/reference/input/on-pin-pressed), [pin is pressed](/reference/pins/pin-is-pressed)

View File

@ -10,11 +10,11 @@ pins.map(0, 0, 4, 0, 1023);
### Parameters
* ``value``: [Number](/microbit/reference/types/number) - the value to map
* ``from low``: [Number](/microbit/reference/types/number) - lower bound of the origin interval
* ``from high``: [Number](/microbit/reference/types/number) - upper bound of the origin interval
* ``to low``: [Number](/microbit/reference/types/number) - lower bound of the target interval
* ``to high``: [Number](/microbit/reference/types/number) - upper bound of the target interval
* ``value``: [Number](/reference/types/number) - the value to map
* ``from low``: [Number](/reference/types/number) - lower bound of the origin interval
* ``from high``: [Number](/reference/types/number) - upper bound of the origin interval
* ``to low``: [Number](/reference/types/number) - lower bound of the target interval
* ``to high``: [Number](/reference/types/number) - upper bound of the target interval
## Example
@ -28,5 +28,5 @@ led.plot(0, index)
### See also
[analog read pin](/microbit/reference/pins/analog-read-pin)
[analog read pin](/reference/pins/analog-read-pin)

View File

@ -1,6 +1,6 @@
# Servo Set Pulse
Configures the pin [pin](/microbit/device/pins) (``P0``, ``P1`` or ``P2``) as an analog/PWM output if it isn't already, configures the period to be 20ms, and sets the pulse width, based on the value it is given.
Configures the pin [pin](/device/pins) (``P0``, ``P1`` or ``P2``) as an analog/PWM output if it isn't already, configures the period to be 20ms, and sets the pulse width, based on the value it is given.
```sig
pins.servoSetPulse(AnalogPin.P1, 1500)
@ -8,8 +8,8 @@ pins.servoSetPulse(AnalogPin.P1, 1500)
### Parameters
* `name` - [String](/microbit/reference/types/string); the pin name ("P0", "P1", or "P2")
* `micros` - a [Number](/microbit/reference/types/number) representing the micro-seconds of the pulse width.
* `name` - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
* `micros` - a [Number](/reference/types/number) representing the micro-seconds of the pulse width.
### Example
@ -21,5 +21,5 @@ pins.servoSetPulse(AnalogPin.P0, 1000)
### See also
[BBC micro:bit pins](/microbit/device/pins), [on pin pressed](/microbit/reference/input/on-pin-pressed), [analog read pin](/microbit/reference/pins/analog-read-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](/reference/input/on-pin-pressed), [analog read pin](/reference/pins/analog-read-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)

View File

@ -1,6 +1,6 @@
# Servo Write Pin
Writes a value to the servo on to the specified [pin](/microbit/device/pins) (``P0``, ``P1``, ``P2``), controlling the shaft accordingly.
Writes a value to the servo on to the specified [pin](/device/pins) (``P0``, ``P1``, ``P2``), controlling the shaft accordingly.
* on a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation.
* on a continuous rotation servo, this will set the speed of the servo (with 0 being full-speed in one direction, 180 being full speed in the other, and a value near 90 being no movement).
@ -11,8 +11,8 @@ pins.servoWritePin(AnalogPin.P0, 180)
### Parameters
* `name` - [String](/microbit/reference/types/string); the pin name ("P0", "P1", or "P2")
* `value` - a [Number](/microbit/reference/types/number) between 0 and 180 included
* `name` - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
* `value` - a [Number](/reference/types/number) between 0 and 180 included
### Examples
@ -41,5 +41,5 @@ pins.servoWritePin(AnalogPin.P0, 0)
### See also
[BBC micro:bit pins](/microbit/device/pins), [servo set pulse](/microbit/reference/pins/servo-set-pulse)
[BBC micro:bit pins](/device/pins), [servo set pulse](/reference/pins/servo-set-pulse)