Finishing fixing parameters
This commit is contained in:
parent
ad6ef04b1f
commit
534e3723d2
@ -9,7 +9,7 @@ pins.analogReadPin(AnalogPin.P0)
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [string](/reference/types/string) with the name of the pin
|
||||
* ``name`` is a [string](/reference/types/string) with the name of the pin
|
||||
you say (`P0` through `P4`, or `P10`)
|
||||
|
||||
### Returns
|
||||
|
@ -10,8 +10,8 @@ pins.analogSetPeriod(AnalogPin.P0, 20000)
|
||||
|
||||
### Parameters
|
||||
|
||||
* `pin`: a [string](/reference/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
|
||||
* `μs`: a [number](/reference/types/number) that specifies the analog period in microseconds.
|
||||
* ``name``: a [string](/reference/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
|
||||
* ``micros``: a [number](/reference/types/number) that specifies the analog period in microseconds.
|
||||
|
||||
The following code first sets `P0` to analog with **analog write
|
||||
pin**, and then sets the PWM period of `P0` to 20,000 microseconds.
|
||||
|
@ -9,8 +9,8 @@ pins.analogWritePin(AnalogPin.P0, 400)
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [string](/reference/types/string) that is the pin name you say (`P0` through `P4`, or `P10`)
|
||||
* a [number](/reference/types/number) from `0` through `1023`
|
||||
* ``name`` is a [string](/reference/types/string) that is the pin name you say (`P0` through `P4`, or `P10`)
|
||||
* ``value`` is a [number](/reference/types/number) from `0` through `1023`
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -16,7 +16,7 @@ Please read the [page about pins](/device/pins) carefully.
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
|
||||
* ``name`` is a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -16,8 +16,8 @@ Please read the [page about pins](/device/pins) carefully.
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
|
||||
* a [number](/reference/types/number) that can be either `0` or `1`
|
||||
* ``name`` is a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
|
||||
* ``value`` is a [number](/reference/types/number) that can be either `0` or `1`
|
||||
|
||||
### Example: football score keeper
|
||||
|
||||
|
@ -17,10 +17,10 @@ pins.map(0, 0, 4, 0, 1023);
|
||||
### Parameters
|
||||
|
||||
* ``value``: a [number](/reference/types/number) that specifies the value to map
|
||||
* ``from low``: a [number](/reference/types/number) that specifies the lower bound of the origin interval
|
||||
* ``from high``: a [number](/reference/types/number) that specifies the upper bound of the origin interval
|
||||
* ``to low``: a [number](/reference/types/number) that specifies the lower bound of the target interval
|
||||
* ``to high``: a [number](/reference/types/number) that specifies the upper bound of the target interval
|
||||
* ``fromLow``: a [number](/reference/types/number) that specifies the lower bound of the origin interval
|
||||
* ``fromHigh``: a [number](/reference/types/number) that specifies the upper bound of the origin interval
|
||||
* ``toLow``: a [number](/reference/types/number) that specifies the lower bound of the target interval
|
||||
* ``toHigh``: a [number](/reference/types/number) that specifies the upper bound of the target interval
|
||||
|
||||
## Example
|
||||
|
||||
|
@ -10,8 +10,8 @@ pins.onPulsed(DigitalPin.P0, PulseValue.High, () => { });
|
||||
|
||||
### Parameters
|
||||
|
||||
* ``pin``: The micro:bit hardware pin to configure (``P0`` through ``P20``)
|
||||
* ``pulsed``: Which state will cause the associated block to execute (**High** or **Low**)
|
||||
* ``name``: The micro:bit hardware pin to configure (``P0`` through ``P20``)
|
||||
* ``pulse``: Which state will cause the associated block to execute (**High** or **Low**)
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -9,8 +9,8 @@ pins.servoSetPulse(AnalogPin.P1, 1500)
|
||||
|
||||
### Parameters
|
||||
|
||||
* `pin`: a [string](/reference/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
|
||||
* `μs`: a [number](/reference/types/number) that specifies the analog period in microseconds.
|
||||
* ``name``: a [string](/reference/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
|
||||
* ``micros``: a [number](/reference/types/number) that specifies the analog period in microseconds.
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -14,8 +14,8 @@ pins.servoWritePin(AnalogPin.P0, 180)
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [string](/reference/types/string) that specifies the pin name (`P0` through `P4`, or `P10`)
|
||||
* a [number](/reference/types/number) from `0` through `180`
|
||||
* ``name``: a [string](/reference/types/string) that specifies the pin name (`P0` through `P4`, or `P10`)
|
||||
* ``value``: a [number](/reference/types/number) from `0` through `180`
|
||||
|
||||
### Examples
|
||||
|
||||
|
@ -16,8 +16,8 @@ pins.setPull(DigitalPin.P9, PinPullMode.PullDown);
|
||||
|
||||
### Parameters
|
||||
|
||||
* ``pin``: The micro:bit hardware pin to configure (``P0``-``P20``)
|
||||
* ``to``: The pull to which to set the pin (**down**, **up**, or **none**)
|
||||
* ``name``: The micro:bit hardware pin to configure (``P0``-``P20``)
|
||||
* ``pull``: The pull to which to set the pin (**down**, **up**, or **none**)
|
||||
|
||||
### Example
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user