pxt-calliope/docs/tutorials/getting-started.md

56 lines
976 B
Markdown
Raw Normal View History

2017-01-02 03:52:22 +01:00
# Getting started
2017-01-04 19:06:47 +01:00
# begin: basic.showString("Hello world")
2017-01-02 03:52:22 +01:00
### Step 1
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
2017-01-04 19:06:47 +01:00
```block
2017-01-02 03:52:22 +01:00
basic.showString("Hello world")
```
### Step 2
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
### Step 3
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
2017-01-04 19:06:47 +01:00
```block
basic.forever(() => {
basic.showNumber(0)
})
2017-01-02 03:52:22 +01:00
```
### Step 4
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
2017-01-04 19:06:47 +01:00
```block
input.onButtonPressed(Button.B, () => {
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
2017-01-03 07:14:40 +01:00
})
```
2017-01-02 03:52:22 +01:00
### Step 5
Use the **Basic** drawer in the editor
to drag out and arrange three blocks to create this program:
2017-01-04 19:06:47 +01:00
```block
2017-01-03 07:14:40 +01:00
input.onButtonPressed(Button.A, () => {
basic.showString("Hello!")
})
2017-01-02 03:52:22 +01:00
```