diff --git a/docs/lessons/banana-keyboard.md b/docs/lessons/banana-keyboard.md deleted file mode 100644 index 230052f8..00000000 --- a/docs/lessons/banana-keyboard.md +++ /dev/null @@ -1,21 +0,0 @@ -# banana keyboard blocks lesson - -display beautiful images on the BBC micro:bit. - -## Topic - -Music - -## Quick Links - -* [activity](/lessons/banana-keyboard/activity) - -## Prior learning/place of lesson in scheme of work - -Learn how to convert your BBC micro:bit into a music player using pins P0 and GND, earphones (or speakers), as well as crocodile clips (or spring clips). The connect fruit using pins P1 and GND. - -## Objectives - -* learn how to setup the BBC micro:bit with earphones to play music -* learn how to setup the BBC micro:bit with fruit be the musical instrument - diff --git a/docs/lessons/hack-your-headphones.md b/docs/lessons/hack-your-headphones.md deleted file mode 100644 index 5df72299..00000000 --- a/docs/lessons/hack-your-headphones.md +++ /dev/null @@ -1,20 +0,0 @@ -# hack your headphones lesson - -display beautiful images on the BBC micro:bit. - -## Topic - -Hack your headphone - -## Quick Links - -* [activity](/lessons/hack-your-headphones/activity) - -## Prior learning/place of lesson in scheme of work - -Learn how to convert your BBC micro:bit into a music player using pins P0 and GND, headphones (or speakers), as well as crocodile clips (or spring clips). - -## Objectives - -* learn how to setup the BBC micro:bit with headphones to play music - diff --git a/docs/lessons/rock-paper-scissors.md b/docs/lessons/rock-paper-scissors.md deleted file mode 100644 index 8b7503f5..00000000 --- a/docs/lessons/rock-paper-scissors.md +++ /dev/null @@ -1,62 +0,0 @@ -# rock paper scissors lesson - -A game against the BBC micro:bit. - -## Topic - -Local Variables - -## Quick Links - -* [activity](/lessons/rock-paper-scissors/activity) -* [challenges](/lessons/rock-paper-scissors/challenges) - -## Class - -Year 7 - -## Prior learning/place of lesson in scheme of work - -Learn how to create a **local variable**, `var t :=time` where you can store data, so that you can use it in your code. We will be learning how to create a classic rock paper scissors game using global variables, input on shake, local variables, math random as well as simple commands such as create image, show image, show string, and show number. - -## Documentation - -```cards -input.onGesture(Gesture.Shake, () => {}) -Math.random(3) -let x = 0 -basic.showLeds(` - . . . . . - . . . . . - . . # . . - . . . . . - . . . . . - `) -``` - -## Objectives - -* learn how to create a condition so the micro:bit will run code when it is shaken -* learn how to create a local variable for a place where you can store data -* learn how to create an image to show on the micro:bit's LED screen -* learn how to show an image on the micro:bit's LED screen - -## Progression Pathways / Computational Thinking Framework - -#### Algorithms - -* Uses diagrams to express solutions.(AB) -* Represents solutions using a structured notation (AL) (AB) - -#### Programming & Development - -* Creates programs that implement algorithms to achieve given goals (AL) -* Declares and assigns variables(AB) -* Selects the appropriate data types(AL) (AB - -#### Data & Data Representation - -* Defines data types: real numbers and Boolean (AB) - -Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algorithmic Thinking; EV = Evaluation; GE = Generalisation - diff --git a/docs/lessons/rock-paper-scissors/activity.md b/docs/lessons/rock-paper-scissors/activity.md deleted file mode 100644 index d73ebe18..00000000 --- a/docs/lessons/rock-paper-scissors/activity.md +++ /dev/null @@ -1,121 +0,0 @@ -# rock paper scissors activity - -A classic game against the micro:bit. - -### ~avatar avatar - - - -Welcome! This tutorial will help you create a game of rock paper scissors with the micro:bit. Let's get started! - -### ~ - -We want the micro:bit to choose rock, paper, or scissors when it is shaken. Let's begin by creating an on shake condition so the micro:bit will run code when it is shaken. - - -```blocks - -input.onGesture(Gesture.Shake, () => { - -}) - -``` - -Next, create a variable and store pick random number from 0 to 2. On shake, a number will be randomly picked from 0-2. We will randomly display an image based on the random number returned. - - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) -}) - -``` - -The micro:bit will look like it's showing 1 frame of the image by displaying the whole image when pick random is equal to 2. We can help the micro:bit randomly decide which image to use by pick random. The micro:bit will randomly pick the image to display with show LEDs and the pick random function. - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } -}) - - -``` - -The micro:bit will look like it's showing 1 frame of the image by displaying the whole image when pick random is equal to 1. We can help the micro:bit randomly decide which image to use by pick random. The micro:bit will randomly pick the image to display with show LEDs and the pick random function. - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } -}) -``` - -The micro:bit will look like it's showing 1 frame of the image by displaying the whole image when pick random is not equal to 2 and not equal to 1. We can help the micro:bit randomly decide which image to use by pick random. The micro:bit will randomly pick the image to display with show LEDs and the pick random function. - - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } else { - basic.showLeds(` - . . . # # - # # . # . - . . # . . - # # . # . - . . . # # - `) - } -}) - -``` - -### ~avatar avatar - -Excellent, you're ready to continue with the [challenges](/lessons/rock-paper-scissors/challenges)! - -### ~ - diff --git a/docs/lessons/rock-paper-scissors/challenges.md b/docs/lessons/rock-paper-scissors/challenges.md deleted file mode 100644 index 21fdd52f..00000000 --- a/docs/lessons/rock-paper-scissors/challenges.md +++ /dev/null @@ -1,133 +0,0 @@ -# rock paper scissors challenges - -Coding challenges for rock paper scissors. - -## Before we get started - -Complete the following [guided activity](/lessons/rock-paper-scissors/activity) , your code should look like this: - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } else { - basic.showLeds(` - . . . # # - # # . # . - . . # . . - # # . # . - . . . # # - `) - } -}) - -``` - -### Challenge 1 - -When the A button is pressed, increment the score by 1. You can select Game drawer then add change score by 1. - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(2) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } else { - basic.showLeds(` - . . . # # - # # . # . - . . # . . - # # . # . - . . . # # - `) - } -}) -input.onButtonPressed(Button.A, () => { - game.addScore(1) -}) - -``` - -* Click *run* to execute your code in the simulator - -### Challenge 2 - -After incrementing the score, display the total number of wins you have. - - -```blocks -input.onGesture(Gesture.Shake, () => { - let img = Math.random(2) - if (img == 2) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } else { - basic.showLeds(` - . . . # # - # # . # . - . . # . . - # # . # . - . . . # # - `) - } -}) -input.onButtonPressed(Button.A, () => { - game.addScore(1) - basic.showString("WINS:") - basic.showNumber(game.score()) -}) - -``` - -* Run and compile the code to see if it works as expected. - -### Challenge 3 - -You have successfully tracked and displayed the number of wins on the micro:bit! However, what about losses? Use the Game drawer to change score by -1 when button `B` is pressed. - -* Run and compile the code to see if it works as expected. diff --git a/docs/lessons/rock-paper-scissors/quiz.md b/docs/lessons/rock-paper-scissors/quiz.md deleted file mode 100644 index 9a97b328..00000000 --- a/docs/lessons/rock-paper-scissors/quiz.md +++ /dev/null @@ -1,74 +0,0 @@ -# rock paper scissors quiz - -shift an image horizontally across the display with offset. - -## Name - -## Directions - -Use this activity document to guide your work in the [rock paper scissors tutorial](/lessons/rock-paper-scissors/activity). - -Answer the questions while completing the tutorial. Pay attention to the dialogues! - -## 1. Describe what `offset` does? - -
- -## 2. Draw which LEDs are ON after running this code and the random number returned is 0 - -```blocks -let img = images.createImage(` -. . . . . # # # # # . . . . # -. # # # . # . . . # # # . # . -. # # # . # . . . # . # # . . -. # # # . # . . . # # # . # . -. . . . . # # # # # . . . . # -`) -let offset = Math.random(3) * 5 -img.showImage(offset) -``` - -![](/static/mb/lessons/night-light-2.png) - -
- -
- -## 3. Draw which LEDs are ON after running this code with an offset of 5. This would occur if the random number returned is 1. - -```blocks -let img_ = images.createImage(` -. . . . . # # # # # . . . . # -. # # # . # . . . # # # . # . -. # # # . # . . . # . # # . . -. # # # . # . . . # # # . # . -. . . . . # # # # # . . . . # -`) -let offset_ = Math.random(3) * 5 -img.showImage(offset) -``` - -![](/static/mb/lessons/night-light-2.png) - -
- -
- -## 4. Draw which LEDs are ON after running this code with an offset of 10. This would occur if the random number returned is 2. - -```blocks -let img_1 = images.createImage(` -. . . . . # # # # # . . . . # -. # # # . # . . . # # # . # . -. # # # . # . . . # . # # . . -. # # # . # . . . # # # . # . -. . . . . # # # # # . . . . # -`) -let offset_1 = Math.random(3) * 5 -img.showImage(offset) -``` - -![](/static/mb/lessons/night-light-2.png) - -
- diff --git a/docs/lessons/telegraph.md b/docs/lessons/telegraph.md deleted file mode 100644 index 79378c2a..00000000 --- a/docs/lessons/telegraph.md +++ /dev/null @@ -1,24 +0,0 @@ -# telegraph lesson - -display beautiful images on the BBC micro:bit. - -## Topic - -Telegraph - -## Quick Links - -* [activity](/lessons/telegraph/activity) -* [challenges](/lessons/telegraph/challenges) - - -## Prior learning/place of lesson in scheme of work - -Learn how to convert your BBC micro:bit into a telegraph using a second BBC micro:bit as well as pin P1, P2, 3V, GND, -and crocodile clips (or spring clips). The connect BBC micro:bit uses pins P1, P2, 3V, GND. - -## Objectives - -* learn how to setup the BBC micro:bit with crocodile clips -* learn how to telegraph to another BBC micro:bit - diff --git a/docs/projects.md b/docs/projects.md index f259d1b8..fb82ba1a 100644 --- a/docs/projects.md +++ b/docs/projects.md @@ -22,11 +22,11 @@ ![](/static/mb/projects/a5-compass.png) -## [Hack your headphones](/lessons/hack-your-headphones/activity) +## [Hack your headphones](/projects/hack-your-headphones) ![](/static/mb/projects/a6-music.png) -## [Banana keyboard](/lessons/banana-keyboard/activity) +## [Banana keyboard](/projects/banana-keyboard) ![](/static/mb/projects/a7-conductive.png) diff --git a/docs/lessons/banana-keyboard/challenges.md b/docs/projects/banana-keyboard-challenges.md similarity index 100% rename from docs/lessons/banana-keyboard/challenges.md rename to docs/projects/banana-keyboard-challenges.md diff --git a/docs/lessons/banana-keyboard/activity.md b/docs/projects/banana-keyboard.md similarity index 96% rename from docs/lessons/banana-keyboard/activity.md rename to docs/projects/banana-keyboard.md index c0ae3b58..0710629c 100644 --- a/docs/lessons/banana-keyboard/activity.md +++ b/docs/projects/banana-keyboard.md @@ -95,6 +95,6 @@ Tap your banana instrument to play sound against... the fruit! ### ~avatar boothing -Excellent, you're ready to continue with the [challenges](/lessons/banana-keyboard/challenges)! +Excellent, you're ready to continue with the [challenges](/banana-keyboard-challenges)! ### ~ diff --git a/docs/projects/compass.md b/docs/projects/compass.md index b0148c4a..bb565db1 100644 --- a/docs/projects/compass.md +++ b/docs/projects/compass.md @@ -1,4 +1,4 @@ -# compass activity +# compass ![](/static/mb/projects/a5-compass.png) diff --git a/docs/projects/flashing-heart.md b/docs/projects/flashing-heart.md index 46927f5d..da4cbdf7 100644 --- a/docs/projects/flashing-heart.md +++ b/docs/projects/flashing-heart.md @@ -1,3 +1,5 @@ +# flashing heart + ![](/static/mb/projects/a1-display.png) Use the LEDs to display a flashing heart. diff --git a/docs/lessons/hack-your-headphones/activity.md b/docs/projects/hack-your-headphones.md similarity index 98% rename from docs/lessons/hack-your-headphones/activity.md rename to docs/projects/hack-your-headphones.md index 42ce3ea8..4cd1d865 100644 --- a/docs/lessons/hack-your-headphones/activity.md +++ b/docs/projects/hack-your-headphones.md @@ -1,4 +1,4 @@ -# hack your headphones activity +# hack your headphones Hack your headphones diff --git a/docs/projects/love-meter.md b/docs/projects/love-meter.md index 6190cd6b..a3169b79 100644 --- a/docs/projects/love-meter.md +++ b/docs/projects/love-meter.md @@ -1,3 +1,5 @@ +# love meter + ![](/static/mb/projects/a3-pins.png) Use pins P0, P1 and P2 to change the display by creating a circuit with your body. diff --git a/docs/projects/smiley-buttons.md b/docs/projects/smiley-buttons.md index 680683ca..a6a795a9 100644 --- a/docs/projects/smiley-buttons.md +++ b/docs/projects/smiley-buttons.md @@ -1,3 +1,5 @@ +# smiley buttons + ![](/static/mb/projects/a2-buttons.png) Use buttons to show a smiley or frowny face. diff --git a/docs/lessons/telegraph/challenges.md b/docs/projects/telegraph-challenges.md similarity index 100% rename from docs/lessons/telegraph/challenges.md rename to docs/projects/telegraph-challenges.md diff --git a/docs/lessons/telegraph/activity.md b/docs/projects/telegraph.md similarity index 94% rename from docs/lessons/telegraph/activity.md rename to docs/projects/telegraph.md index 1300c1ab..3bb283b5 100644 --- a/docs/lessons/telegraph/activity.md +++ b/docs/projects/telegraph.md @@ -70,6 +70,6 @@ Using the 4th crocodile clip, connect the unattached end of the crocodile clip o ### ~avatar avatar -Excellent, you're ready to continue with the [challenges](/lessons/telegraph/challenges)! +Excellent, you're ready to continue with the [challenges](/projects/telegraph-challenges)! ### ~ diff --git a/docs/projects/the-watch.md b/docs/projects/the-watch.md index cd50c214..83b5796b 100644 --- a/docs/projects/the-watch.md +++ b/docs/projects/the-watch.md @@ -1,6 +1,6 @@ ![](/static/mb/projects/a10-watch.png) -# micro:bit watch +# the watch ![](/static/mb/lessons/the-watch-0.png)