@ -2,17 +2,17 @@
|
||||
|
||||
Play a musical tone through pin ``P0`` of the @boardname@ for as long as you say.
|
||||
|
||||
### ~ hint
|
||||
## ~ hint
|
||||
|
||||
This function only works on the @boardname@ and in some browsers.
|
||||
|
||||
### ~
|
||||
## ~
|
||||
|
||||
```sig
|
||||
music.playTone(440, 120)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
## Parameters
|
||||
|
||||
* ``frequency`` is the [number](/types/number) of Hertz (how high or low the tone is).
|
||||
* ``ms`` is the [number](/types/number) of milliseconds that the tone lasts
|
||||
@ -28,7 +28,7 @@ music.playTone(freq, 1000)
|
||||
```
|
||||
|
||||
|
||||
### Using other pins
|
||||
## Using other pins
|
||||
|
||||
Use [analogSetPitchPin](/reference/pins/analog-set-pitch-pin) to change that pin used to generate music.
|
||||
|
||||
@ -36,7 +36,7 @@ Use [analogSetPitchPin](/reference/pins/analog-set-pitch-pin) to change that pin
|
||||
pins.analogSetPitchPin(AnalogPin.P1);
|
||||
```
|
||||
|
||||
### See also
|
||||
## See also
|
||||
|
||||
[rest](/reference/music/rest), [ring tone](/reference/music/ring-tone) , [tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo),
|
||||
[change tempo by](/reference/music/change-tempo-by)
|
||||
|
Reference in New Issue
Block a user