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

788 B

Analog Pitch

Emits a Pulse With Modulation (PWM) signal to the pin P0. Use analog set pitch pin to set the current pitch pin.

pins.analogPitch(440, 300)

Parameters

Example

pins.analogSetPitchPin("P0")
let frequency1 = 440
let duration = 1000
pins.analogSetPitchPin(AnalogPin.P1);
pins.analogPitch(frequency1, duration)

Some common notes

See also

@boardname@ pins, analog set period, analog set pitch pin