updated links

This commit is contained in:
Peli de Halleux 2016-04-04 22:33:13 -07:00
parent 9c09a427c9
commit df17ba09ae
29 changed files with 69 additions and 219 deletions

View File

@ -22,12 +22,9 @@ Learn how to creating a message with a **string**, `show string` to write your m
## Documentation
```docs
```cards
basic.showString('Hi!')
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
```

View File

@ -20,7 +20,7 @@ Learn how to **show LEDs**, to show an image on the BBC micro:bit's LED screen.
## Documentation
```docs
```cards
basic.showLeds(`
. . . . .
. . . . .
@ -28,10 +28,7 @@ basic.showLeds(`
. . . . .
. . . . .
`)
basic.pause(100)
```
## Objectives

View File

@ -23,18 +23,11 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
## Documentation
```docs
```cards
led.plot(0, 0)
led.unplot(0, 0)
basic.pause(100)
basic.forever(() => {
})
basic.forever(() => {})
```

View File

@ -17,23 +17,13 @@ Learn the functions of **on data received**, **send number** and **receive numbe
## Documentation
```docs
```cards
basic.showNumber(0)
input.acceleration(Dimension.X)
led.plotBarGraph(0, 1023)
radio.onDataReceived(() => {
})
radio.onDataReceived(() => {})
radio.sendNumber(0)
radio.receiveNumber()
```
## Objectives

View File

@ -21,17 +21,12 @@ Learn how to use an if statements to run code run code depending on whether a co
## Documentation
```docs
```cards
input.compassHeading()
basic.forever(() => {})
let x = 0
if (true) {}
basic.showString("Hello!")
basic.showLeds(`
. . . . .
. . . . .

View File

@ -21,22 +21,12 @@ Learn how to creating a **variable** to keep track of the current count. We will
## Documentation
```docs
```cards
input.compassHeading()
basic.forever(() => {
})
basic.forever(() => {})
let x = 0
if (true) {
}
if (true) {}
basic.showString("Hello!")
basic.showLeds(`
. . . . .
. . . . .
@ -44,7 +34,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
* **variable**: [read more...](/microbit/reference/variables/var)

View File

@ -21,21 +21,11 @@ Learn how to use an if statements to run code run code depending on whether a co
## Documentation
```docs
input.onGesture(Gesture.Shake, () => {
})
```cards
input.onGesture(Gesture.Shake, () => {})
let x = 0
x = Math.random(3)
if (true) {
}
Math.random(3)
if (true) {}
basic.showLeds(`
. . . . .
. . . . .
@ -43,10 +33,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
## Objectives

View File

@ -21,13 +21,11 @@ Learn how to creating a **while loop**, `while condition do` to repeat code whil
## Documentation
```docs
```cards
let x = 0
basic.showNumber(0)
while (true) {
basic.pause(20)
}
while (true) {}
basic.pause(20)
```
## Objectives

View File

@ -20,13 +20,8 @@ Learn how to `show LEDs` by showing an image on the LED screen. We will be learn
## Documentation
```docs
basic.forever(() => {
})
```cards
basic.forever(() => {})
basic.showLeds(`
. . . . .
. . . . .
@ -34,11 +29,8 @@ basic.showLeds(`
. . . . .
. . . . .
`)
basic.pause(100)
basic.clearScreen()
```
## Objectives

View File

@ -19,15 +19,10 @@ Learn how to create game blocks to keep track of the current score. We will be l
## Documentation
```docs
```cards
game.addScore(1)
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
basic.showNumber(0)
```
## Objectives

View File

@ -18,15 +18,10 @@ Learn how to creating a message with a **game over** to write your message. We w
## Documentation
```docs
```cards
game.gameOver()
basic.showString("Hello!")
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
```
## Objectives

View File

@ -19,21 +19,12 @@ Learn how to get the acceleration **acceleration**, `acceleration` value (g-forc
## Documentation
```docs
basic.forever(() => {
})
```cards
basic.forever(() => {})
let x = 0
input.acceleration(Dimension.X)
Math.abs(0)
led.setBrightness(255)
basic.showLeds(`
. . . . .
. . . . .
@ -41,7 +32,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
## Objectives

View File

@ -21,22 +21,12 @@ Learn how to create numbers randomly by using the input of the BBC micro:bit. We
## Documentation
```docs
input.onButtonPressed(Button.A, () => {
})
```cards
input.onButtonPressed(Button.A, () => {})
let x = 0
basic.showNumber(0)
Math.random(3)
basic.clearScreen()
```
## Objectives

View File

@ -26,10 +26,8 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
## Documentation
```docs
for (let i = 0; i < 5; i++) {
}
```cards
for (let i = 0; i < 5; i++) {}
basic.showNumber(0)
basic.pause(100)

View File

@ -22,19 +22,11 @@ Learn how to use the **pin pressed**, `on pin pressed` to run code when the user
## Documentation
```docs
if (true) {
}
input.onPinPressed(TouchPin.P0, () => {
})
```cards
if (true) {}
input.onPinPressed(TouchPin.P0, () => {})
let x = 0
Math.random(3)
basic.showNumber(0)
basic.pause(100)
```

View File

@ -19,14 +19,10 @@ Learn how to creating **conditionals**, `if condition do` to conditionally run c
## Documentation
```docs
if (true) {
}
```cards
if (true) {}
Math.random(3)
input.onGesture(Gesture.Shake, () => {
})
input.onGesture(Gesture.Shake, () => {})
basic.showNumber(7)
basic.clearScreen()
basic.showString("Hello!")

View File

@ -20,13 +20,9 @@ On Logo Up
Learn how to plot image **on logo up**, `on logo up` to run code when the micro:bit screen is facing up and vertically orientated. We will be learning how to plot an image with the logo up, basic show LEDs, and logo down.
## Documentation
```docs
input.onLogoUp(() => {
})
input.onLogoDown(() => {
})
```cards
input.onLogoUp(() => {})
input.onLogoDown(() => {})
basic.showLeds(`
. . . . .
. . . . .
@ -34,8 +30,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
## Objectives

View File

@ -21,11 +21,9 @@ Learn how to **set brightness** of an image `set brightness` to set the brightne
## Documentation
```docs
```cards
led.setBrightness(255)
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
basic.showLeds(`
. . . . .
. . . . .
@ -33,7 +31,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
## Objectives

View File

@ -15,14 +15,13 @@ Running Time
Learn how to use running time. We will be learning how to create a pogo game using variables, forever loop, conditionals, on button pressed, as well as simple commands, such as show LEDs and clear screen.
## Documentation
```docs
```cards
let jumps = 0
let acc = input.acceleration(Dimension.Y)
basic.showNumber(jumps)
basic.showNumber(radio.receiveNumber())
basic.showNumber(0)
radio.receiveNumber()
led.stopAnimation()
jumps = jumps + 1;
radio.sendNumber(jumps)
radio.sendNumber(0)
basic.forever(() => { })
basic.showLeds(`
. . . . .
@ -32,11 +31,8 @@ basic.showLeds(`
. # # # .
`)
basic.clearScreen()
if (acc > 2000) {
}
if (true) {}
radio.onDataReceived(() => { })
```
## Objectives

View File

@ -23,10 +23,8 @@ Learn how to create a **local variable**, `var t :=time` where you can store dat
## Documentation
```docs
input.onGesture(Gesture.Shake, () => {
})
```cards
input.onGesture(Gesture.Shake, () => {})
Math.random(3)
let x = 0
basic.showLeds(`

View File

@ -19,11 +19,9 @@ Learn how to create images that look like a rotating animation by using a while
## Documentation
```docs
```cards
let x = 0
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
basic.showLeds(`
. . . . .
. . . . .
@ -32,10 +30,8 @@ basic.showLeds(`
. . . . .
`)
basic.pause(100)
while (true) {
basic.pause(20)
}
while (true) {}
basic.pause(20)
```
## Objectives

View File

@ -23,7 +23,7 @@ Learn how to **clear screen**, `clear screen` to turn off all the LED lights on
## Documentation
```docs
```cards
basic.clearScreen()
basic.showLeds(`
. . . . .
@ -32,10 +32,7 @@ basic.showLeds(`
. . . . .
. . . . .
`)
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
```
## Objectives

View File

@ -24,10 +24,8 @@ Learn how to **show LEDs** to turn on a LED light pattern on the LED screen. We
* **show LEDs** : [read more...](/microbit/reference/basic/show-leds)
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
```docs
input.onButtonPressed(Button.A, () => {
})
```cards
input.onButtonPressed(Button.A, () => {})
basic.showLeds(`
. . . . .
. . . . .
@ -35,7 +33,6 @@ basic.showLeds(`
. . . . .
. . . . .
`)
```
## Objectives

View File

@ -25,7 +25,7 @@ Learn how to show LEDs with a, `pause` to pause program execution for a specifie
* **pause** : [read more...](/microbit/reference/basic/pause)
* **forever** : [read more...](/microbit/reference/basic/forever)
```docs
```cards
basic.showLeds(`
. . . . .
. . . . .
@ -34,8 +34,5 @@ basic.showLeds(`
. . . . .
`)
basic.pause(100)
basic.forever(() => {
})
basic.forever(() => {})
```

View File

@ -22,14 +22,10 @@ Learn how to use an if statement to run code run code depending on whether a con
## Documentation
```docs
if (true) {
}
```cards
if (true) {}
let x = 0
input.onGesture(Gesture.Shake, () => {
})
input.onGesture(Gesture.Shake, () => {})
Math.random(3)
basic.showLeds(`
. . . . .

View File

@ -17,14 +17,11 @@ For Loop
## Documentation
```docs
```cards
led.plot(0, 0)
led.unplot(0, 0)
for (let i = 0; i < 5; i++) {
}
for (let i = 0; i < 5; i++) {}
basic.pause(100)
```
## Objectives

View File

@ -17,15 +17,12 @@ Learn how to get the ambient temperature (degree Celsius °C). The temperature i
## Documentation
```docs
```cards
input.temperature()
let x = 0
basic.showNumber(7)
basic.showString("Hello!")
input.onGesture(Gesture.Shake, () => {
})
input.onGesture(Gesture.Shake, () => {})
```
## Objectives

View File

@ -21,7 +21,7 @@ Learn how to use an if statement to run code run code depending on whether a con
## Documentation
```docs
```cards
basic.showLeds(`
. . . . .
. . . . .
@ -29,16 +29,11 @@ basic.showLeds(`
. . . . .
. . . . .
`)
input.onButtonPressed(Button.A, () => {
})
input.onButtonPressed(Button.A, () => {})
let x = 0
Math.random(3)
if (true) {
}
if (true) {}
basic.showString("Hello!")
```
## Objectives

View File

@ -21,7 +21,7 @@ Learn how to get the **acceleration**, `acceleration` in one of three specified
## Documentation
```docs
```cards
basic.forever(() => {
})
let x = 0