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
@@ -4,31 +4,31 @@ Write an **analog** signal (`0` through `1023`) to the
|
||||
[pin](/device/pins) you say.
|
||||
|
||||
```sig
|
||||
pins.analogWritePin(AnalogPin.P1, 400)
|
||||
pins.analogWritePin(AnalogPin.P0, 400)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
## 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
|
||||
## Example
|
||||
|
||||
This program writes `1023` to pin `P0`.
|
||||
|
||||
```blocks
|
||||
pins.analogWritePin(AnalogPin.P1, 1023)
|
||||
pins.analogWritePin(AnalogPin.P0, 1023)
|
||||
```
|
||||
|
||||
#### ~hint
|
||||
### ~hint
|
||||
|
||||
When you tell it to write `256` (for example), this function does not
|
||||
_really_ write `256`. Instead, it writes a lot of different numbers,
|
||||
and their average is `256`.
|
||||
|
||||
#### ~
|
||||
### ~
|
||||
|
||||
### 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user