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
@@ -3,28 +3,28 @@
|
||||
Specify which [pin](/device/pins) (P0, P1, P2) is used to generate tones.
|
||||
|
||||
```sig
|
||||
pins.analogSetPitchPin(AnalogPin.P1)
|
||||
pins.analogSetPitchPin(AnalogPin.P0)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
## 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
|
||||
## Example
|
||||
|
||||
```blocks
|
||||
pins.analogSetPitchPin(AnalogPin.P1)
|
||||
pins.analogSetPitchPin(AnalogPin.P0)
|
||||
let frequency = 440
|
||||
let duration = 1000
|
||||
pins.analogPitch(frequency, duration)
|
||||
```
|
||||
|
||||
### Some common notes
|
||||
## Some common notes
|
||||
|
||||
* 440 = A4 on piano
|
||||
* see [piano key frequencies ](https://en.wikipedia.org/wiki/Piano_key_frequencies) for more information
|
||||
|
||||
### See also
|
||||
## See also
|
||||
|
||||
[@boardname@ pins](/device/pins), [analog set period](/reference/pins/analog-set-period), [analog pitch](/reference/pins/analog-pitch)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user