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 ## Documentation
```docs ```cards
basic.showString('Hi!') 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 ## Documentation
```docs ```cards
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -28,10 +28,7 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
basic.pause(100) basic.pause(100)
``` ```
## Objectives ## Objectives

View File

@ -23,18 +23,11 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
## Documentation ## Documentation
```docs ```cards
led.plot(0, 0) led.plot(0, 0)
led.unplot(0, 0) led.unplot(0, 0)
basic.pause(100) 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 ## Documentation
```docs ```cards
basic.showNumber(0) basic.showNumber(0)
input.acceleration(Dimension.X) input.acceleration(Dimension.X)
led.plotBarGraph(0, 1023) led.plotBarGraph(0, 1023)
radio.onDataReceived(() => {})
radio.onDataReceived(() => {
})
radio.sendNumber(0) radio.sendNumber(0)
radio.receiveNumber() radio.receiveNumber()
``` ```
## Objectives ## 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 ## Documentation
```docs ```cards
input.compassHeading() input.compassHeading()
basic.forever(() => {}) basic.forever(() => {})
let x = 0 let x = 0
if (true) {} if (true) {}
basic.showString("Hello!") basic.showString("Hello!")
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .

View File

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

View File

@ -21,13 +21,11 @@ Learn how to creating a **while loop**, `while condition do` to repeat code whil
## Documentation ## Documentation
```docs ```cards
let x = 0 let x = 0
basic.showNumber(0) basic.showNumber(0)
while (true) { while (true) {}
basic.pause(20)
basic.pause(20)
}
``` ```
## Objectives ## 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 ## Documentation
```docs ```cards
basic.forever(() => { basic.forever(() => {})
})
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -34,11 +29,8 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
basic.pause(100) basic.pause(100)
basic.clearScreen() basic.clearScreen()
``` ```
## Objectives ## 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 ## Documentation
```docs ```cards
game.addScore(1) game.addScore(1)
input.onButtonPressed(Button.A, () => {})
input.onButtonPressed(Button.A, () => {
})
basic.showNumber(0) basic.showNumber(0)
``` ```
## Objectives ## Objectives

View File

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

View File

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

View File

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

View File

@ -26,10 +26,8 @@ Learn how to control a blinking LED. We will be learning how to create a blinkin
## Documentation ## Documentation
```docs ```cards
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {}
}
basic.showNumber(0) basic.showNumber(0)
basic.pause(100) 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 ## Documentation
```docs ```cards
if (true) { if (true) {}
input.onPinPressed(TouchPin.P0, () => {})
}
input.onPinPressed(TouchPin.P0, () => {
})
let x = 0 let x = 0
Math.random(3) Math.random(3)
basic.showNumber(0) basic.showNumber(0)
basic.pause(100) basic.pause(100)
``` ```

View File

@ -19,14 +19,10 @@ Learn how to creating **conditionals**, `if condition do` to conditionally run c
## Documentation ## Documentation
```docs ```cards
if (true) { if (true) {}
}
Math.random(3) Math.random(3)
input.onGesture(Gesture.Shake, () => { input.onGesture(Gesture.Shake, () => {})
})
basic.showNumber(7) basic.showNumber(7)
basic.clearScreen() basic.clearScreen()
basic.showString("Hello!") 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. 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 ## Documentation
```docs ```cards
input.onLogoUp(() => { input.onLogoUp(() => {})
input.onLogoDown(() => {})
})
input.onLogoDown(() => {
})
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -34,8 +30,6 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
``` ```
## Objectives ## Objectives

View File

@ -21,11 +21,9 @@ Learn how to **set brightness** of an image `set brightness` to set the brightne
## Documentation ## Documentation
```docs ```cards
led.setBrightness(255) led.setBrightness(255)
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {})
})
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -33,7 +31,6 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
``` ```
## Objectives ## 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. 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 ## Documentation
```docs ```cards
let jumps = 0 let jumps = 0
let acc = input.acceleration(Dimension.Y) let acc = input.acceleration(Dimension.Y)
basic.showNumber(jumps) basic.showNumber(0)
basic.showNumber(radio.receiveNumber()) radio.receiveNumber()
led.stopAnimation() led.stopAnimation()
jumps = jumps + 1; radio.sendNumber(0)
radio.sendNumber(jumps)
basic.forever(() => { }) basic.forever(() => { })
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
@ -32,11 +31,8 @@ basic.showLeds(`
. # # # . . # # # .
`) `)
basic.clearScreen() basic.clearScreen()
if (acc > 2000) { if (true) {}
}
radio.onDataReceived(() => { }) radio.onDataReceived(() => { })
``` ```
## Objectives ## Objectives

View File

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

View File

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

View File

@ -23,7 +23,7 @@ Learn how to **clear screen**, `clear screen` to turn off all the LED lights on
## Documentation ## Documentation
```docs ```cards
basic.clearScreen() basic.clearScreen()
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
@ -32,10 +32,7 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {})
})
``` ```
## Objectives ## 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) * **show LEDs** : [read more...](/microbit/reference/basic/show-leds)
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed) * **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
```docs ```cards
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {})
})
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -35,7 +33,6 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
``` ```
## Objectives ## 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) * **pause** : [read more...](/microbit/reference/basic/pause)
* **forever** : [read more...](/microbit/reference/basic/forever) * **forever** : [read more...](/microbit/reference/basic/forever)
```docs ```cards
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -34,8 +34,5 @@ basic.showLeds(`
. . . . . . . . . .
`) `)
basic.pause(100) 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 ## Documentation
```docs ```cards
if (true) { if (true) {}
}
let x = 0 let x = 0
input.onGesture(Gesture.Shake, () => { input.onGesture(Gesture.Shake, () => {})
})
Math.random(3) Math.random(3)
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .

View File

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

View File

@ -17,15 +17,12 @@ Learn how to get the ambient temperature (degree Celsius °C). The temperature i
## Documentation ## Documentation
```docs ```cards
input.temperature() input.temperature()
let x = 0 let x = 0
basic.showNumber(7) basic.showNumber(7)
basic.showString("Hello!") basic.showString("Hello!")
input.onGesture(Gesture.Shake, () => { input.onGesture(Gesture.Shake, () => {})
})
``` ```
## Objectives ## 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 ## Documentation
```docs ```cards
basic.showLeds(` basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
@ -29,16 +29,11 @@ basic.showLeds(`
. . . . . . . . . .
. . . . . . . . . .
`) `)
input.onButtonPressed(Button.A, () => { input.onButtonPressed(Button.A, () => {})
})
let x = 0 let x = 0
Math.random(3) Math.random(3)
if (true) { if (true) {}
}
basic.showString("Hello!") basic.showString("Hello!")
``` ```
## Objectives ## Objectives

View File

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