pxt-calliope/docs/reference/pins/analog-set-pitch-pin.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

675 B

Analog Set Pitch Pin

Specify which pin (P0, P1, P2) is used to generate tones.

pins.analogSetPitchPin(AnalogPin.P0)

Parameters

  • name - String; the pin name ("P0", "P1", or "P2")

Example

pins.analogSetPitchPin(AnalogPin.P0)
let frequency = 440
let duration = 1000
pins.analogPitch(frequency, duration)

Some common notes

See also

@boardname@ pins, analog set period, analog pitch