/reference/types -> /types

This commit is contained in:
Peli de Halleux
2017-03-16 07:57:41 -07:00
parent 69bd0225ad
commit 00e9217e73
116 changed files with 224 additions and 361 deletions

View File

@ -9,8 +9,8 @@ pins.analogPitch(440, 300)
### Parameters
* `frequency` : [Number](/reference/types/number)
* `ms`: [Number](/reference/types/number)
* `frequency` : [Number](/types/number)
* `ms`: [Number](/types/number)
### Example

View File

@ -9,12 +9,12 @@ pins.analogReadPin(AnalogPin.P0)
### Parameters
* ``name`` is a [string](/reference/types/string) with the name of the pin
* ``name`` is a [string](/types/string) with the name of the pin
you say (`P0` through `P4`, or `P10`)
### Returns
* a [number](/reference/types/number) from `0` through `1023`
* a [number](/types/number) from `0` through `1023`
This program reads pin `P1` and shows the number
on the LED screen.

View File

@ -10,8 +10,8 @@ pins.analogSetPeriod(AnalogPin.P0, 20000)
### Parameters
* ``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.
* ``name``: a [string](/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
* ``micros``: a [number](/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.

View File

@ -8,7 +8,7 @@ pins.analogSetPitchPin(AnalogPin.P0)
### Parameters
* `name` - [String](/reference/types/string); the pin name ("P0", "P1", or "P2")
* `name` - [String](/types/string); the pin name ("P0", "P1", or "P2")
### Example

View File

@ -9,8 +9,8 @@ pins.analogWritePin(AnalogPin.P0, 400)
### Parameters
* ``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`
* ``name`` is a [string](/types/string) that is the pin name you say (`P0` through `P4`, or `P10`)
* ``value`` is a [number](/types/number) from `0` through `1023`
### Example

View File

@ -16,11 +16,11 @@ Please read the [page about pins](/device/pins) carefully.
### Parameters
* ``name`` is a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
* ``name`` is a [string](/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
### Returns
* a [number](/reference/types/number) that can be `0` or `1`
* a [number](/types/number) that can be `0` or `1`
### Example: football score keeper

View File

@ -16,8 +16,8 @@ Please read the [page about pins](/device/pins) carefully.
### Parameters
* ``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`
* ``name`` is a [string](/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
* ``value`` is a [number](/types/number) that can be either `0` or `1`
### Example: football score keeper

View File

@ -16,11 +16,11 @@ pins.map(0, 0, 4, 0, 1023);
### Parameters
* ``value``: a [number](/reference/types/number) that specifies the value to map
* ``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
* ``value``: a [number](/types/number) that specifies the value to map
* ``fromLow``: a [number](/types/number) that specifies the lower bound of the origin interval
* ``fromHigh``: a [number](/types/number) that specifies the upper bound of the origin interval
* ``toLow``: a [number](/types/number) that specifies the lower bound of the target interval
* ``toHigh``: a [number](/types/number) that specifies the upper bound of the target interval
## Example

View File

@ -16,13 +16,13 @@ Please read the [page about pins](/device/pins) carefully.
### Parameters
* ``name`` is a [string](/reference/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
* ``name`` is a [string](/types/string) that stores the name of the pin (``P0``, ``P1``, or ``P2``, up through ``P20``)
* ``value`` is the value of the pulse, ``high`` or ``low``
* ``maxDuration``, maximum duration in micro-seconds. If no pulse is received
### Returns
* a [number](/reference/types/number) that represents the pulse duration in micro-seconds
* a [number](/types/number) that represents the pulse duration in micro-seconds
### Example: Measuring distance with a sonar

View File

@ -9,8 +9,8 @@ pins.servoSetPulse(AnalogPin.P1, 1500)
### Parameters
* ``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.
* ``name``: a [string](/types/string) that specifies the pin to configure (`P0` through `P4`, or `P10`)
* ``micros``: a [number](/types/number) that specifies the analog period in microseconds.
### Example

View File

@ -14,8 +14,8 @@ pins.servoWritePin(AnalogPin.P0, 180)
### Parameters
* ``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`
* ``name``: a [string](/types/string) that specifies the pin name (`P0` through `P4`, or `P10`)
* ``value``: a [number](/types/number) from `0` through `180`
### Examples

View File

@ -12,7 +12,7 @@ pins.spiWrite(0);
### Returns
* a [number](/reference/types/number) Response from the SPI slave
* a [number](/types/number) Response from the SPI slave
### See also