support for setting music pin using analogSetPitchPin

This commit is contained in:
Peli de Halleux
2016-11-29 08:59:54 -08:00
parent 63d0b86508
commit 63e24ce90a
9 changed files with 56 additions and 32 deletions

View File

@ -25,6 +25,15 @@ let freq = music.noteFrequency(Note.C)
music.playTone(freq, 1000)
```
### Using other pins
Use [analogSetPitchPin](/pins/analog-set-pitch-pin) to change that pin used to generate music.
```blocks
pins.analogSetPitchPin(AnalogPin.P1);
```
### See also
[rest](/reference/music/rest), [ring tone](/reference/music/ring-tone) , [tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo),

View File

@ -32,6 +32,14 @@ basic.forever(() => {
})
```
### Using other pins
Use [analogSetPitchPin](/pins/analog-set-pitch-pin) to change that pin used to generate music.
```blocks
pins.analogSetPitchPin(AnalogPin.P1);
```
### See also
[rest](/reference/music/rest), [play tone](/reference/music/play-tone),