Shorten showString and set default tone (#735)
This commit is contained in:
parent
7a6818931f
commit
3599483ed2
@ -17,10 +17,10 @@ brick.showString("Hello world", 1)
|
|||||||
|
|
||||||
## Step 2
|
## Step 2
|
||||||
|
|
||||||
In the ``||brick:show string||`` block, type the text ``"Press my buttons to make music!"`` to replace ``"Hello world"``.
|
In the ``||brick:show string||`` block, type the text ``"Press my buttons!"`` to replace ``"Hello world"``.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
brick.showString("Press my buttons to make music!", 1)
|
brick.showString("Press my buttons!", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 3
|
## Step 3
|
||||||
@ -31,7 +31,7 @@ Open the ``||brick:Brick||`` Toolbox drawer. From the **Buttons** section, drag
|
|||||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||||
|
|
||||||
})
|
})
|
||||||
brick.showString("Press my buttons to make music!", 1)
|
brick.showString("Press my buttons!" 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 4
|
## Step 4
|
||||||
@ -40,13 +40,13 @@ Open the ``||music:Music||`` Toolbox drawer. Drag out **5** ``||music:play tone|
|
|||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||||
music.playTone(0, music.beat(BeatFraction.Half))
|
music.playTone(262, music.beat(BeatFraction.Half))
|
||||||
music.playTone(0, music.beat(BeatFraction.Half))
|
music.playTone(262, music.beat(BeatFraction.Half))
|
||||||
music.playTone(0, music.beat(BeatFraction.Half))
|
music.playTone(262, music.beat(BeatFraction.Half))
|
||||||
music.playTone(0, music.beat(BeatFraction.Half))
|
music.playTone(262, music.beat(BeatFraction.Half))
|
||||||
music.playTone(0, music.beat(BeatFraction.Half))
|
music.playTone(262, music.beat(BeatFraction.Half))
|
||||||
})
|
})
|
||||||
brick.showString("Press my buttons to make music!", 1)
|
brick.showString("Press my buttons!", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 5
|
## Step 5
|
||||||
@ -63,7 +63,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
|||||||
music.playTone(196, music.beat(BeatFraction.Half))
|
music.playTone(196, music.beat(BeatFraction.Half))
|
||||||
music.playTone(294, music.beat(BeatFraction.Whole))
|
music.playTone(294, music.beat(BeatFraction.Whole))
|
||||||
})
|
})
|
||||||
brick.showString("Press my buttons to make music!", 1)
|
brick.showString("Press my buttons!", 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 6
|
## Step 6
|
||||||
|
Loading…
Reference in New Issue
Block a user