2.1.28, initiation update to PXT v5.28.24 (#54)
This commit is contained in:
committed by
Peli de Halleux
parent
38a964516e
commit
5c114a0c57
@@ -7,23 +7,26 @@ ms, and set the pulse width to the specified value.
|
||||
pins.servoSetPulse(AnalogPin.P1, 1500)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
## 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
|
||||
## Example
|
||||
|
||||
The following code sets the servo pulse to `1000` microseconds.
|
||||
|
||||
```blocks
|
||||
pins.servoSetPulse(AnalogPin.P1, 1000)
|
||||
pins.servoSetPulse(AnalogPin.P0, 1000)
|
||||
```
|
||||
|
||||
### See also
|
||||
## See also
|
||||
|
||||
[@boardname@ 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)
|
||||
|
||||
[Brief Guide to Servos](https://www.kitronik.co.uk/pdf/a-brief-guide-to-servos.pdf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user