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