diff --git a/docs/lessons/seismograph/activity.md b/docs/lessons/seismograph/activity.md index d82f268a..5878cab1 100644 --- a/docs/lessons/seismograph/activity.md +++ b/docs/lessons/seismograph/activity.md @@ -94,8 +94,6 @@ Connect a micro:bit to your computer using your USB cable Click or tap the **Download** button for the seismograph program to run the program on the micro:bit. -![](/static/mb/lessons/seismograph22.png) - ## 9. A black line should appear directly beneath the colored line. The black line measures the micro:bit acceleration. And the colored line measures micro:bit simulator acceleration. diff --git a/docs/reference/String.md b/docs/reference/String.md deleted file mode 100644 index 15e6de5d..00000000 --- a/docs/reference/String.md +++ /dev/null @@ -1,9 +0,0 @@ -# String - -```cards -String.fromCharCode(0); -``` - -### See Also - -[fromCharCode](/reference//math/string-from-char-code) diff --git a/docs/static/mb/game-library/add-point-to-score-0.png b/docs/static/mb/game-library/add-point-to-score-0.png deleted file mode 100644 index e9ac2973..00000000 Binary files a/docs/static/mb/game-library/add-point-to-score-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/game-over-0.png b/docs/static/mb/game-library/game-over-0.png deleted file mode 100644 index d63873bd..00000000 Binary files a/docs/static/mb/game-library/game-over-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/if-on-edge-bounce-0.png b/docs/static/mb/game-library/if-on-edge-bounce-0.png deleted file mode 100644 index 5d3f8139..00000000 Binary files a/docs/static/mb/game-library/if-on-edge-bounce-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/move-0.png b/docs/static/mb/game-library/move-0.png deleted file mode 100644 index 32c99fd5..00000000 Binary files a/docs/static/mb/game-library/move-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/pic0.png b/docs/static/mb/game-library/pic0.png deleted file mode 100644 index 849e72a2..00000000 Binary files a/docs/static/mb/game-library/pic0.png and /dev/null differ diff --git a/docs/static/mb/game-library/pic1.png b/docs/static/mb/game-library/pic1.png deleted file mode 100644 index 034e1d41..00000000 Binary files a/docs/static/mb/game-library/pic1.png and /dev/null differ diff --git a/docs/static/mb/game-library/pic2.png b/docs/static/mb/game-library/pic2.png deleted file mode 100644 index 3609a339..00000000 Binary files a/docs/static/mb/game-library/pic2.png and /dev/null differ diff --git a/docs/static/mb/game-library/pic3.png b/docs/static/mb/game-library/pic3.png deleted file mode 100644 index 5d78a089..00000000 Binary files a/docs/static/mb/game-library/pic3.png and /dev/null differ diff --git a/docs/static/mb/game-library/position-0.png b/docs/static/mb/game-library/position-0.png deleted file mode 100644 index a60bc387..00000000 Binary files a/docs/static/mb/game-library/position-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/reports-0.jpg b/docs/static/mb/game-library/reports-0.jpg deleted file mode 100644 index dbb0f52f..00000000 Binary files a/docs/static/mb/game-library/reports-0.jpg and /dev/null differ diff --git a/docs/static/mb/game-library/reports-1.jpg b/docs/static/mb/game-library/reports-1.jpg deleted file mode 100644 index 74be2848..00000000 Binary files a/docs/static/mb/game-library/reports-1.jpg and /dev/null differ diff --git a/docs/static/mb/game-library/reports-2.jpg b/docs/static/mb/game-library/reports-2.jpg deleted file mode 100644 index 41b88d1f..00000000 Binary files a/docs/static/mb/game-library/reports-2.jpg and /dev/null differ diff --git a/docs/static/mb/game-library/start-countdown-0.png b/docs/static/mb/game-library/start-countdown-0.png deleted file mode 100644 index e214070c..00000000 Binary files a/docs/static/mb/game-library/start-countdown-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/touching-0.png b/docs/static/mb/game-library/touching-0.png deleted file mode 100644 index db48069b..00000000 Binary files a/docs/static/mb/game-library/touching-0.png and /dev/null differ diff --git a/docs/static/mb/game-library/turn-0.png b/docs/static/mb/game-library/turn-0.png deleted file mode 100644 index 4ee0c1f0..00000000 Binary files a/docs/static/mb/game-library/turn-0.png and /dev/null differ diff --git a/docs/static/mb/lessons/bounce-image-0.png b/docs/static/mb/lessons/bounce-image-0.png deleted file mode 100644 index 88589000..00000000 Binary files a/docs/static/mb/lessons/bounce-image-0.png and /dev/null differ diff --git a/docs/static/mb/lessons/bounce-image-1.png b/docs/static/mb/lessons/bounce-image-1.png deleted file mode 100644 index 5fde403a..00000000 Binary files a/docs/static/mb/lessons/bounce-image-1.png and /dev/null differ diff --git a/docs/static/mb/lessons/bounce-image-2.png b/docs/static/mb/lessons/bounce-image-2.png deleted file mode 100644 index e9034f0e..00000000 Binary files a/docs/static/mb/lessons/bounce-image-2.png and /dev/null differ diff --git a/docs/static/mb/lessons/seismograph4.png b/docs/static/mb/lessons/seismograph4.png deleted file mode 100644 index 7a5fce3f..00000000 Binary files a/docs/static/mb/lessons/seismograph4.png and /dev/null differ diff --git a/olddocs/js/gallery.md b/olddocs/js/gallery.md index 8bd16243..f82a6e55 100644 --- a/olddocs/js/gallery.md +++ b/olddocs/js/gallery.md @@ -34,7 +34,6 @@ Overview of Touch Develop lessons for the BBC micro:bit. ### ~hide -* [Bounce image](/lessons/bounce-image), scroll an image across the screen on shake * [Magic logo](/lessons/magic-logo), show an image on logo up * [Glowing sword](/lessons/glowing-sword), make a glowing sword with fade in and fade out diff --git a/olddocs/js/game-library/add-point-to-score.md b/olddocs/js/game-library/add-point-to-score.md deleted file mode 100644 index fba67cf5..00000000 --- a/olddocs/js/game-library/add-point-to-score.md +++ /dev/null @@ -1,33 +0,0 @@ -# Add Points to Score - -The game library supports simple single-player time-based games. The player will ** add points to score**. - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. - -```blocks -input.onButtonPressed(Button.A, () => { - game.addScore(1) -}) -game.startCountdown(10000) -``` - -### Score - -When a player achieves a goal, you can increase the game score - -* add score points to the current score - -``` -export function addScore(points: number) -``` - -* get the current score value - -``` -export function score() : number -``` - -### Lessons - -[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter) - diff --git a/olddocs/js/game-library/change-score-by.md b/olddocs/js/game-library/change-score-by.md deleted file mode 100644 index d5d1b7ac..00000000 --- a/olddocs/js/game-library/change-score-by.md +++ /dev/null @@ -1,31 +0,0 @@ -# Change Score By - -The game library supports simple single-player time-based games. The player will ** add points to score**. - -```blocks -input.onButtonPressed(Button.A, () => { - game.addScore(1) -}) -game.startCountdown(10000) -``` - -### Score - -When a player achieves a goal, you can increase the game score - -* add score points to the current score - -``` -export function addScore(points: number) -``` - -* get the current score value - -``` -export function score() : number -``` - -### Lessons - -[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter) - diff --git a/olddocs/js/game-library/game-over.md b/olddocs/js/game-library/game-over.md deleted file mode 100644 index 63172672..00000000 --- a/olddocs/js/game-library/game-over.md +++ /dev/null @@ -1,12 +0,0 @@ -# Game Over - -You can end the game by calling the `game -> game over` function: - -```blocks -game.gameOver() -``` - -### Lessons - -[game of chance](/lessons/game-of-chance) - diff --git a/olddocs/js/game-library/score.md b/olddocs/js/game-library/score.md deleted file mode 100644 index 274462fd..00000000 --- a/olddocs/js/game-library/score.md +++ /dev/null @@ -1,59 +0,0 @@ -# Score - -The game library #docs - -The game library supports simple single-player games. The player has a **score**. - -## Block Editor - -The code below shows a simple game where the user gets to press the button ``A`` and adds 1 point to score that will be displayed on the BBC micro:bit screen - -![](/static/mb/game-library/add-point-to-score-0.png) - -## Touch Develop - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. - -``` -input.onButtonPressed(Button.A, () => { - game.addScore(1) -}) -game.startCountdown(10000) -``` - -### Score - -When a player achieves a goal, you can increase the game score - -* add score points to the current score - -``` -export function addScore(points: number) -``` - -* set the current score to a particular value. - -``` -export function setScore(value: number) -``` - -* get the current score value - -``` -export function score() : number -``` - -### Countdown - -If your game has a time limit, you can start a countdown in which case `game->current time` returns the remaining time. - -* start a countdown with the maximum duration of the game in milliseconds. - -``` -export function startCountdown(ms: number) -``` - -### Lessons - -[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter) - diff --git a/olddocs/js/game-library/start-countdown.md b/olddocs/js/game-library/start-countdown.md deleted file mode 100644 index 32d8f35d..00000000 --- a/olddocs/js/game-library/start-countdown.md +++ /dev/null @@ -1,57 +0,0 @@ -# Start Countdown - -The game library #docs - -The game library supports simple single-player time-based games. The general goal of a game will be to achieve a top score before time runs out of time. - -## Block Editor - -![](/static/mb/game-library/start-countdown-0.png) - -## Touch Develop - -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds. - -``` -input.onButtonPressed(Button.A, () => { - game.addScore(1) -}) -game.startCountdown(10000) -``` - -### Score - -When a player achieves a goal, you can increase the game score - -* add score points to the current score - -``` -export function addScore(points: number) -``` - -* set the current score to a particular value. - -``` -export function setScore(value: number) -``` - -* get the current score value - -``` -export function score() : number -``` - -### Countdown - -If your game has a time limit, you can start a countdown in which case `game->current time` returns the remaining time. - -* start a countdown with the maximum duration of the game in milliseconds. - -``` -export function startCountdown(ms: number) -``` - -### Lessons - -[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter) - diff --git a/olddocs/js/games.md b/olddocs/js/games.md index 5d9b8a43..529bf681 100644 --- a/olddocs/js/games.md +++ b/olddocs/js/games.md @@ -17,7 +17,6 @@ Overview of Games for the BBC micro:bit. * [Lucky 7](/lessons/lucky-7), show a number on the LED screen with show number * [Snowflake fall](/lessons/snowflake-fall), repeat an animation with forever * [Answering machine](/lessons/answering-machine), show a text message with show string -* [Bounce image](/lessons/bounce-image), scroll an image across the screen on shake * [Magic logo](/lessons/magic-logo), show an image on logo up * [Screen wipe](/lessons/screen-wipe), turn off the LEDs with clear screen * [Blink](/lessons/blink), turn an LED on and off with plot diff --git a/olddocs/js/image.md b/olddocs/js/image.md index 69b7025b..13d5d2b7 100644 --- a/olddocs/js/image.md +++ b/olddocs/js/image.md @@ -62,7 +62,6 @@ Images that you create in the [Touch Develop editor](/js/editor) are [local vari ### Lessons -* [bounce image ](/lessons/bounce-image) * [offset image](/lessons/offset-image) ### See also diff --git a/olddocs/js/lessons.md b/olddocs/js/lessons.md index 3286bb20..d3e66d1b 100644 --- a/olddocs/js/lessons.md +++ b/olddocs/js/lessons.md @@ -22,12 +22,6 @@ Overview of Touch Develop lessons for the BBC micro:bit. * [Answering Machine](/lessons/answering-machine), show a text message with show string * [Snowflake Fall](/lessons/snowflake-fall), repeat an animation with forever -### ~hide - -* [Bounce Image](/lessons/bounce-image), scroll an image across the screen on shake - -### ~ - * [Magic Logo](/lessons/magic-logo), show an image on logo up * [Screen Wipe](/lessons/screen-wipe), turn off the LEDs with clear screen * [Flashing Heart](/lessons/flashing-heart), display images with a pause diff --git a/olddocs/js/lessons/bounce-image.md b/olddocs/js/lessons/bounce-image.md deleted file mode 100644 index 3a772f2f..00000000 --- a/olddocs/js/lessons/bounce-image.md +++ /dev/null @@ -1,106 +0,0 @@ -# bounce image lesson - -scroll an image across the screen. - -## Topic - -Basic- Show Animation - -## Quick Links - -* [tutorial](/lessons/bounce-image/tutorial) -* [quiz](/lessons/bounce-image/quiz) -* [quiz answers](/lessons/bounce-image/quiz-answers) -* [challenges](/lessons/bounce-image/challenges) - -## Class - -Year 7 - -## Prior learning / place of lesson in scheme of work - -Learn how to creating an **animation**, `basic->show animation` to display a series of images. We will be learning how to create a counter app using a forever loop, the input on shake, and show animation. - -## What the teacher needs to know / QuickStart Computing Glossary - -* Algorithm: An unambiguous set of rules or a precise step-by-step guide to solve a problem or achieve a particular objective. -* Command: An instruction for the computer to execute, written in a particular programming language. -* Hardware: The physical systems and components of digital devices; see also software. -* Input: Data provided to a computer system, such as via a keyboard, mouse, microphone, camera or physical sensors. -* Loop: A block of code repeated automatically under the program’s control. -* Output: The information produced by a computer system for its user, typically on a screen, through speakers or on a printer, but possibly through the control of motors in physical systems. -* Programmable toys: Robots designed for children to use, accepting input, storing short sequences of simple instructions and moving according to this stored program. -* Program: A stored set of instructions encoded in a language understood by the computer that does some form of computation, processing input and/or stored data to generate output. -* Selection: A programming construct in which one section of code or another is executed depending on whether a particular condition is met. -* Sequence: To place program instructions in order, with each executed one after the other. -* Simulation: Using a computer to model the state and behaviour of real-world (or imaginary) systems, including physical or social systems; an integral part of most computer games. - -## Documentation - -* **forever** : [read more...](/reference/basic/forever) -* **show animation** : [read more...](/reference/basic/show-animation) -* **on shake** : [read more...](/reference/input/on-gesture) - -## Resources - -* Activity: [tutorial](/lessons/bounce-image/tutorial) -* Activity: [quiz](/lessons/bounce-image/quiz) -* Extended Activity: [challenges](/lessons/bounce-image/challenges) - -## Objectives - -* learn how to repeat code in the background forever -* learn how to show a series of image frames on the LED screen, pausing the specified time after each frame -* learn how to run code when the micro:bit is shaken; when running code in the web browser, moving the mouse quickly simulates shaking - -## Links to the National Curriculum Programmes of Study for Computing - -## Progression Pathways / Computational Thinking Framework - -#### Algorithms - -* Uses diagrams to express solutions.(AB) -* Uses logical reasoning to predict outputs, showing an awareness of inputs (AL) -* Understands that iteration is the repetition of a process such as a loop (AL) -* Represents solutions using a structured notation (AL) (AB) - -#### Programming & Development - -* Creates programs that implement algorithms to achieve given goals (AL) -* Selects the appropriate data types(AL) (AB) - -#### Hardware & Processing - -* Knows that computers collect data from various input devices, including sensors and application software (AB) - -#### Communication Networks - -* Demonstrates responsible use of technologies and online services, and knows a range of ways to report concerns Understands how search engines rank search results (AL) - -#### Information Technology - -* Collects, organizes, and presents data and information in digital content (AB) -* Makes appropriate improvements to solutions based on feedback received, and can comment on the success of the solution (EV) -* Recognises ethical issues surrounding the application of information technology beyond school. - -Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algorithmic Thinking; EV = Evaluation; GE = Generalisation - -## Activity - -* time: 20 min. -* [tutorial](/lessons/bounce-image/tutorial) -* [quiz](/lessons/bounce-image/quiz) - -## Extended Activity - -* time: 20 min. -* [challenges](/lessons/bounce-image/challenges) - -## Homework - -* Extended Activity: [challenges](/lessons/bounce-image/challenges) - -## Intended follow on - -Publish script to the classroom. - diff --git a/olddocs/js/lessons/bounce-image/challenges.md b/olddocs/js/lessons/bounce-image/challenges.md deleted file mode 100644 index 5db6b044..00000000 --- a/olddocs/js/lessons/bounce-image/challenges.md +++ /dev/null @@ -1,86 +0,0 @@ -# bounce image challenges - -Coding challenges for the bounce image tutorial. #docs - -## Before we get started - -Complete the following guided tutorial: - -* [tutorial](/lessons/bounce-image/tutorial) - -At the end of the tutorial, click `keep editing`. Your code should look like this: - -``` -basic.forever(() => { - basic.showAnimation(` -# . . . . . # . . . . . # . . . . . # . . . . . # -# . . . . . # . . . . . # . . . . . # . . . . . # -# . . . . . # . . . . . # . . . . . # . . . . . # -# . . . . . # . . . . . # . . . . . # . . . . . # -# . . . . . # . . . . . # . . . . . # . . . . . # -`, 200) -}) -``` - -### Challenge 1 - -Now, let's add frames to reverse the animation so it looks like the bar is bouncing off the right edge of the display. - -``` -basic.forever(() => { - basic.showAnimation(` -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -`, 200) // *** -}) -``` - -* Run the code to see if it works as expected. - -### Challenge 2 - -Let's add a condition for on shake! - -``` -basic.forever(() => { - basic.showAnimation(` -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -`, 200) -}) -input.onGesture(Gesture.Shake, () => { -}) // *** -``` - -### Challenge 3 - -When the BBC micro:bit is shaken we want to show a new animation. Here is an example, but you can create your own. Be creative! - -``` -basic.forever(() => { - basic.showAnimation(` -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -# . . . . . # . . . . . # . . . . . # . . . . . # . . . # . . . # . . . # . . . # . . . . -`, 200) -}) -input.onGesture(Gesture.Shake, () => { - basic.showAnimation(` -. . . . . . . . . . # # # # # . . . . . . . . . . -. . . . . . # # # . # # # # # . # # # . . . . . . -. . # . . . # # # . # # # # # . # # # . . . # . . -. . . . . . # # # . # # # # # . # # # . . . . . . -. . . . . . . . . . # # # # # . . . . . . . . . . -`, 200) // *** -}) -``` - -* Run the code to see if it works as expected. diff --git a/olddocs/js/lessons/bounce-image/quiz-answers.md b/olddocs/js/lessons/bounce-image/quiz-answers.md deleted file mode 100644 index 123096ba..00000000 --- a/olddocs/js/lessons/bounce-image/quiz-answers.md +++ /dev/null @@ -1,60 +0,0 @@ -# bounce image quiz answers - -scroll an image on the BBC micro:bit. - -This is the answer key for the [bounce image quiz](/lessons/bounce-image/quiz). - -## 1. What does it mean to 'add frames' ? - -Adding frames modifies the animation by including more still images in each animation. - -## 2. Write the code that will display this animation. - -![](/static/mb/lessons/bounce-image-0.png) - -
- -``` -basic.showAnimation(` -# . . . . -# . . . . -# . . . . -# . . . . -# . . . . -`, 400) -``` - -## 3. Write the code that will display this animation with two frames. - -![](/static/mb/lessons/bounce-image-1.png) - -
- -``` -basic.showAnimation(` -# . . . . . # . . . -# . . . . . # . . . -# . . . . . # . . . -# . . . . . # . . . -# . . . . . # . . . -`, 400) -``` - -## 4. Write the code that will display this animation with three frames. - -![](/static/mb/lessons/bounce-image-2.png) - -
- -``` -basic.showAnimation(` -# . . . . . # . . . . . # . . -# . . . . . # . . . . . # . . -# . . . . . # . . . . . # . . -# . . . . . # . . . . . # . . -# . . . . . # . . . . . # . . -`, 400) -``` - -
- diff --git a/olddocs/js/lessons/bounce-image/quiz.md b/olddocs/js/lessons/bounce-image/quiz.md deleted file mode 100644 index 9d889c91..00000000 --- a/olddocs/js/lessons/bounce-image/quiz.md +++ /dev/null @@ -1,40 +0,0 @@ -# bounce image quiz - -scroll an image on the BBC micro:bit. - -## Name - -## Directions - -Use this document to guide your work in the [bounce image tutorial](/lessons/bounce-image/tutorial) ! - -Answer the questions while completing the tutorial. Pay attention to the dialogues! - -## 1. What does it mean to 'add frames' ? - -
- -
- -## 2. Write the code that will display this animation. - -![](/static/mb/lessons/bounce-image-0.png) - -
- -## 3. Write the code that will display this animation with two frames. - -![](/static/mb/lessons/bounce-image-1.png) - -
- -
- -## 4. Write the code that will display this animation with three frames. - -![](/static/mb/lessons/bounce-image-2.png) - -
- -
-