diff --git a/docs/lessons/answering-machine.md b/docs/lessons/answering-machine.md index d623d761..0719b610 100644 --- a/docs/lessons/answering-machine.md +++ b/docs/lessons/answering-machine.md @@ -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, () => {}) ``` diff --git a/docs/lessons/beautiful-image.md b/docs/lessons/beautiful-image.md index a881a35c..8ac75837 100644 --- a/docs/lessons/beautiful-image.md +++ b/docs/lessons/beautiful-image.md @@ -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 diff --git a/docs/lessons/blink.md b/docs/lessons/blink.md index 72a1ee23..02103dc7 100644 --- a/docs/lessons/blink.md +++ b/docs/lessons/blink.md @@ -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(() => {}) ``` diff --git a/docs/lessons/charting.md b/docs/lessons/charting.md index 3d173890..9723f9a5 100644 --- a/docs/lessons/charting.md +++ b/docs/lessons/charting.md @@ -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 diff --git a/docs/lessons/compass.md b/docs/lessons/compass.md index 694194ef..f55fae7a 100644 --- a/docs/lessons/compass.md +++ b/docs/lessons/compass.md @@ -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(` . . . . . . . . . . diff --git a/docs/lessons/counter.md b/docs/lessons/counter.md index 826049f6..0938c1b3 100644 --- a/docs/lessons/counter.md +++ b/docs/lessons/counter.md @@ -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) diff --git a/docs/lessons/die-roll.md b/docs/lessons/die-roll.md index 5f72a481..f7f740ce 100644 --- a/docs/lessons/die-roll.md +++ b/docs/lessons/die-roll.md @@ -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 diff --git a/docs/lessons/digi-yoyo.md b/docs/lessons/digi-yoyo.md index 3c817314..f2adaaa6 100644 --- a/docs/lessons/digi-yoyo.md +++ b/docs/lessons/digi-yoyo.md @@ -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 diff --git a/docs/lessons/flashing-heart.md b/docs/lessons/flashing-heart.md index 8eaa7c78..1a274fee 100644 --- a/docs/lessons/flashing-heart.md +++ b/docs/lessons/flashing-heart.md @@ -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 diff --git a/docs/lessons/game-counter.md b/docs/lessons/game-counter.md index c43c59ea..4687c137 100644 --- a/docs/lessons/game-counter.md +++ b/docs/lessons/game-counter.md @@ -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 diff --git a/docs/lessons/game-of-chance.md b/docs/lessons/game-of-chance.md index f681f23d..afae310f 100644 --- a/docs/lessons/game-of-chance.md +++ b/docs/lessons/game-of-chance.md @@ -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 diff --git a/docs/lessons/glowing-pendulum.md b/docs/lessons/glowing-pendulum.md index 77608391..edf40047 100644 --- a/docs/lessons/glowing-pendulum.md +++ b/docs/lessons/glowing-pendulum.md @@ -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 diff --git a/docs/lessons/guess-the-number.md b/docs/lessons/guess-the-number.md index 1029c0f7..6fb60ed4 100644 --- a/docs/lessons/guess-the-number.md +++ b/docs/lessons/guess-the-number.md @@ -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 diff --git a/docs/lessons/looper.md b/docs/lessons/looper.md index 5fdc9e69..3f4f39e8 100644 --- a/docs/lessons/looper.md +++ b/docs/lessons/looper.md @@ -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) diff --git a/docs/lessons/love-meter.md b/docs/lessons/love-meter.md index b26fecf4..e6fbefdc 100644 --- a/docs/lessons/love-meter.md +++ b/docs/lessons/love-meter.md @@ -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) - - - ``` diff --git a/docs/lessons/magic-8.md b/docs/lessons/magic-8.md index 16867436..d46aa9da 100644 --- a/docs/lessons/magic-8.md +++ b/docs/lessons/magic-8.md @@ -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!") diff --git a/docs/lessons/magic-logo.md b/docs/lessons/magic-logo.md index da500aa2..bd5b8d23 100644 --- a/docs/lessons/magic-logo.md +++ b/docs/lessons/magic-logo.md @@ -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 diff --git a/docs/lessons/night-light.md b/docs/lessons/night-light.md index b1204c11..191b349c 100644 --- a/docs/lessons/night-light.md +++ b/docs/lessons/night-light.md @@ -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 diff --git a/docs/lessons/pogo.md b/docs/lessons/pogo.md index d2bbf080..d817b6b9 100644 --- a/docs/lessons/pogo.md +++ b/docs/lessons/pogo.md @@ -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 diff --git a/docs/lessons/rock-paper-scissors.md b/docs/lessons/rock-paper-scissors.md index 16ed7559..c65a83de 100644 --- a/docs/lessons/rock-paper-scissors.md +++ b/docs/lessons/rock-paper-scissors.md @@ -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(` diff --git a/docs/lessons/rotation-animation.md b/docs/lessons/rotation-animation.md index 09d605e8..3ce3176d 100644 --- a/docs/lessons/rotation-animation.md +++ b/docs/lessons/rotation-animation.md @@ -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 diff --git a/docs/lessons/screen-wipe.md b/docs/lessons/screen-wipe.md index 647a9f05..2031ef78 100644 --- a/docs/lessons/screen-wipe.md +++ b/docs/lessons/screen-wipe.md @@ -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 diff --git a/docs/lessons/smiley.md b/docs/lessons/smiley.md index dd80457c..740aaaea 100644 --- a/docs/lessons/smiley.md +++ b/docs/lessons/smiley.md @@ -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 diff --git a/docs/lessons/snowflake-fall.md b/docs/lessons/snowflake-fall.md index b2019a0c..725fbd03 100644 --- a/docs/lessons/snowflake-fall.md +++ b/docs/lessons/snowflake-fall.md @@ -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(() => {}) ``` diff --git a/docs/lessons/spinner.md b/docs/lessons/spinner.md index 6b76a2f7..899144eb 100644 --- a/docs/lessons/spinner.md +++ b/docs/lessons/spinner.md @@ -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(` . . . . . diff --git a/docs/lessons/strobe-light.md b/docs/lessons/strobe-light.md index 00f4ee01..1d11506a 100644 --- a/docs/lessons/strobe-light.md +++ b/docs/lessons/strobe-light.md @@ -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 diff --git a/docs/lessons/temperature.md b/docs/lessons/temperature.md index feae5672..08c742fa 100644 --- a/docs/lessons/temperature.md +++ b/docs/lessons/temperature.md @@ -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 diff --git a/docs/lessons/truth-or-dare.md b/docs/lessons/truth-or-dare.md index ed03a0f4..1bfcf90a 100644 --- a/docs/lessons/truth-or-dare.md +++ b/docs/lessons/truth-or-dare.md @@ -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 diff --git a/docs/lessons/zoomer.md b/docs/lessons/zoomer.md index edce1f2b..6260400d 100644 --- a/docs/lessons/zoomer.md +++ b/docs/lessons/zoomer.md @@ -21,7 +21,7 @@ Learn how to get the **acceleration**, `acceleration` in one of three specified ## Documentation -```docs +```cards basic.forever(() => { }) let x = 0