From 041b10ef0460652102bfa48524e74b406e70f054 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Wed, 15 Jun 2016 07:55:19 -0400 Subject: [PATCH] fix broken links --- docs/about.md | 6 +++--- docs/blocks/logic/if.md | 4 ++-- docs/blocks/loops/while.md | 7 ++----- docs/lessons/counter.md | 2 +- docs/lessons/headbands.md | 15 +++++++-------- docs/lessons/speed-button.md | 6 +++--- docs/lessons/stem.md | 6 +++--- docs/reference/images/pixel.md | 2 +- docs/reference/images/set-pixel.md | 2 +- docs/reference/input/button-is-pressed.md | 2 +- docs/reference/input/pin-is-pressed.md | 2 +- docs/reference/led/point.md | 2 +- docs/reference/radio/receive-number.md | 6 +++--- docs/reference/radio/received-signal-strength.md | 2 +- docs/reference/types/number.md | 4 ++-- docs/reference/types/string-functions.md | 3 +++ 16 files changed, 35 insertions(+), 36 deletions(-) create mode 100644 docs/reference/types/string-functions.md diff --git a/docs/about.md b/docs/about.md index 395626bf..104dfb50 100644 --- a/docs/about.md +++ b/docs/about.md @@ -31,7 +31,7 @@ Just like Arduino, the micro:bit can be connected to and interact with sensors, ## Blocks or JavaScript -The student can program the BBC micro:bit using Blocks or JavaScript. +The student can program the BBC micro:bit using [Blocks](/blocks) or [JavaScript](/typescript), via the [micro:bit APIs](/reference): ```blocks basic.showString("Hi!"); @@ -41,7 +41,7 @@ basic.showString("Hi!"); When a user has her code ready, she can connect her BBC micro:bit to a computer via a USB cable, so it appears as a mounted drive (named MICROBIT). -Compilation to the ARM thumb machine code happens in the browser. +Compilation to ARM thumb machine code from [Blocks](/blocks) or [JavaScript](/typescript) happens in the browser. The student is prompted to save the ARM binary program to a file, which she then simply drags to the micro:bit mounted drive, which flashes the micro:bit device with the new program. @@ -56,7 +56,7 @@ The simulator has support for the LED screen, buttons, as well as compass, accel The [C++ BBC micro:bit runtime](http://lancaster-university.github.io/microbit-docs/), created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit, as well as a set of helper functions (such as displaying a number/image/string on the LED screen). -The JavaScript micro:bit library mirrors the functions of the C++ library. +The [micro:bit library](/reference) mirrors the functions of the C++ library. When code is compiled to ARM machine code, the calls to JavaScript micro:bit functions are replaced with calls to the corresponding C++ functions. ## Open Source diff --git a/docs/blocks/logic/if.md b/docs/blocks/logic/if.md index 82c7da3e..d8755a88 100644 --- a/docs/blocks/logic/if.md +++ b/docs/blocks/logic/if.md @@ -3,7 +3,7 @@ ### @parent blocks/language -Conditionally run code depending on whether a [Boolean](/reference/types/boolean) condition is true or false. +Conditionally run code depending on whether a [Boolean](/blocks/logic/boolean) condition is true or false. ```blocks if(true) { @@ -24,5 +24,5 @@ If the [light level](/reference/input/light-level) is `< 100`, this code sets th ### See also -[while loop](/blocks/loops/while), [for](/blocks/loops/for), [boolean](/reference/types/boolean) +[while loop](/blocks/loops/while), [for](/blocks/loops/for), [boolean](/blocks/logic/boolean) diff --git a/docs/blocks/loops/while.md b/docs/blocks/loops/while.md index 1b1c6867..8f2c3b10 100644 --- a/docs/blocks/loops/while.md +++ b/docs/blocks/loops/while.md @@ -1,16 +1,13 @@ # While -### @parent blocks/language - - -Repeat code while a [Boolean](/reference/types/boolean) `condition` is true. +Repeat code while a [Boolean](/blocks/logic/boolean) `condition` is true. ```blocks while(true) { } ``` -The while loop has a *condition* that evaluates to a [Boolean](/reference/types/boolean) value. After the `do` keyword, add the code that you want to run while the `condition` is `true`. The while loop concludes with `end while`. +The while loop has a *condition* that evaluates to a [Boolean](/blocks/logic/boolean) value. After the `do` keyword, add the code that you want to run while the `condition` is `true`. The while loop concludes with `end while`. The condition is tested before any code runs. Which means that if the condition is false, the code inside the loop doesn't execute. diff --git a/docs/lessons/counter.md b/docs/lessons/counter.md index 7721de6a..3f557b40 100644 --- a/docs/lessons/counter.md +++ b/docs/lessons/counter.md @@ -34,7 +34,7 @@ basic.showLeds(` `) ``` -* **variable**: [read more...](/reference/variables/var) +* **variable**: [read more...](/blocks/variables) * **arithmetic operators**: [read more...](/reference/types/number) * **on button pressed** : [read more...](/reference/input/on-button-pressed) * **show number** : [read more...](/reference/basic/show-number) diff --git a/docs/lessons/headbands.md b/docs/lessons/headbands.md index 1ba22641..13f8298e 100644 --- a/docs/lessons/headbands.md +++ b/docs/lessons/headbands.md @@ -42,19 +42,18 @@ Learn how to create a charades game with **collections**, ` create -> Collection ## Documentation * **collection** -* **global variables** : [read more...](/reference/variables/globals.md) -* **Boolean** : [read more...](/reference/types/boolean) -* **on logo up** [read more...](/functions/on-logo-up) -* **on screen down** [read more...](/functions/on-screen-down) -* **on screen up** [read more...](/functions/on-screen-up) +* **variables** : [read more...](/blocks/variables) +* **Boolean** : [read more...](/blocks/logic/boolean) +* **on logo up** [read more...](/reference/input/on-gesture) +* **on screen down** [read more...](/reference/input/on-gesture) +* **on screen up** [read more...](/reference/input/on-gesture) * **show string** : [read more...](/reference/basic/show-string) -* **game library** : [read more...](/reference/game-library) +* **game library** : [read more...](/reference/game) ## Resources * Activity: [tutorial](/lessons/headbands/activity) -* Activity: [quiz](/lessons/headbands/quiz) -* Extended Activity: [challenges](/lessons/headbands/challenges) +* Quiz: [quiz](/lessons/headbands/quiz) ## Objectives diff --git a/docs/lessons/speed-button.md b/docs/lessons/speed-button.md index c3304b83..206eea3a 100644 --- a/docs/lessons/speed-button.md +++ b/docs/lessons/speed-button.md @@ -22,10 +22,10 @@ Learn how to declare a **Boolean** variable, `var t:= true` `var f:=false` for o ## Documentation * **running time** : [read more...](/reference/input/running-time) -* **global variable** : [read more...](/reference/variables/globals) -* **Boolean** : [read more...](/reference/types/boolean) +* **variable** : [read more...](/blocks/variables) +* **Boolean** : [read more...](/blocks/logic/boolean) * **on button pressed** : [read more...](/reference/input/on-button-pressed) -* **if** : [read more...](/reference/logic/if) +* **if** : [read more...](/blocks/logic/if) * **show string** : [read more...](/reference/basic/show-string) ## Objectives diff --git a/docs/lessons/stem.md b/docs/lessons/stem.md index 82923ee5..7d79dbcd 100644 --- a/docs/lessons/stem.md +++ b/docs/lessons/stem.md @@ -9,9 +9,9 @@ Overview of Blocks lessons for the BBC micro:bit. ## Science * [Night Light](/lessons/night-light), dim the LEDs with set brightness -* [Hack your headphones](/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones -* [Banana Keyboard](/lessons/banana-keyboard), create music with fruits -* [Telegraph](/lessons/telegraph), play the telegraph game between 2 BBC micro:bits +* [Hack your headphones](/projects/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones +* [Banana Keyboard](/projects/banana-keyboard), create music with fruits +* [Telegraph](/projects/telegraph), play the telegraph game between 2 BBC micro:bits * [Zoomer](/lessons/zoomer), measure the force with acceleration * [Glowing pendulum](/lessons/glowing-pendulum), construct a pendulum that glows using acceleration diff --git a/docs/reference/images/pixel.md b/docs/reference/images/pixel.md index 629d96c9..9cada335 100644 --- a/docs/reference/images/pixel.md +++ b/docs/reference/images/pixel.md @@ -21,7 +21,7 @@ To figure out the ``x``, ``y`` coordinates, see [LED screen](/device/screen). ### Returns -* [Boolean](/reference/types/boolean) - `true` for on and `false` for off +* [Boolean](/blocks/logic/boolean) - `true` for on and `false` for off ### Example diff --git a/docs/reference/images/set-pixel.md b/docs/reference/images/set-pixel.md index 4fdd9f89..0432f594 100644 --- a/docs/reference/images/set-pixel.md +++ b/docs/reference/images/set-pixel.md @@ -14,7 +14,7 @@ export function setPixel(_this: micro_bit.Image, x: number, y: number, value: bo * x - [Number](/reference/types/number); the *x coordinate* or horizontal position of a pixel in an [image](/reference/images/image) * x - [Number](/reference/types/number); the *y coordinate* or vertical position of a pixel in an [image](/reference/images/image) -* value -[Boolean](/reference/types/boolean); the on/off state of a pixel; `true` for on, `false` for off +* value -[Boolean](/blocks/logic/boolean); the on/off state of a pixel; `true` for on, `false` for off ### x, y coordinates? diff --git a/docs/reference/input/button-is-pressed.md b/docs/reference/input/button-is-pressed.md index bdd3a5a7..0562758b 100644 --- a/docs/reference/input/button-is-pressed.md +++ b/docs/reference/input/button-is-pressed.md @@ -12,7 +12,7 @@ input.buttonIsPressed(Button.A); ### Returns -* [Boolean](/reference/types/boolean) that is `true` if the button you are checking is pressed, `false` if it is not pressed. +* [Boolean](/blocks/logic/boolean) that is `true` if the button you are checking is pressed, `false` if it is not pressed. ### Example diff --git a/docs/reference/input/pin-is-pressed.md b/docs/reference/input/pin-is-pressed.md index a1f4f528..14d3db6f 100644 --- a/docs/reference/input/pin-is-pressed.md +++ b/docs/reference/input/pin-is-pressed.md @@ -23,7 +23,7 @@ instead of the USB cable. ### returns -* a [boolean](/reference/types/boolean) that means whether the pin you say is pressed (`true` or `false`) +* a [boolean](/blocks/logic/boolean) that means whether the pin you say is pressed (`true` or `false`) ### Example diff --git a/docs/reference/led/point.md b/docs/reference/led/point.md index b3505775..6ce3e3a2 100644 --- a/docs/reference/led/point.md +++ b/docs/reference/led/point.md @@ -17,7 +17,7 @@ other than 0 to 4), this function will return `false`. ### Returns -* a [boolean](/reference/types/boolean). If it is `true`, that means the LED is on. If it is `false`, that means the LED is off. +* a [boolean](/blocks/logic/boolean). If it is `true`, that means the LED is on. If it is `false`, that means the LED is off. ### ~hint diff --git a/docs/reference/radio/receive-number.md b/docs/reference/radio/receive-number.md index 532e6145..f0a375c6 100644 --- a/docs/reference/radio/receive-number.md +++ b/docs/reference/radio/receive-number.md @@ -23,7 +23,7 @@ radio.onDataReceived(() => { ### Example: Light level receiver -This example shows the light level from the [light level sender example](/reference/input/send-number) +This example shows the light level from the [light level sender example](/reference/radio/send-number) as a number. ```blocks @@ -36,7 +36,7 @@ basic.forever(() => { ### Example: Mailbot -This example receives the light level from the [light level sender example](/reference/input/send-number) +This example receives the light level from the [light level sender example](/reference/radio/send-number) and shows a text string like **ALERT** if the light level becomes much brighter. To find when the mail arrives, you can put the light level sender in your mailbox and it will tell you when someone opens the box. You can try this with a normal @@ -58,5 +58,5 @@ basic.forever(() => { ### See also -[send number](/reference/input/send-number), [on data received](/reference/radio/on-data-received) +[send number](/reference/radio/send-number), [on data received](/reference/radio/on-data-received) diff --git a/docs/reference/radio/received-signal-strength.md b/docs/reference/radio/received-signal-strength.md index e5ab2b0d..513e8164 100644 --- a/docs/reference/radio/received-signal-strength.md +++ b/docs/reference/radio/received-signal-strength.md @@ -20,7 +20,7 @@ This function only works on the micro:bit, not in browsers. ### Example This example shows how strong the radio signal of the -[light level sender example](/reference/input/send-number) is. +[light level sender example](/reference/radio/send-number) is. ```blocks let x = 0; diff --git a/docs/reference/types/number.md b/docs/reference/types/number.md index dbb9c27b..970416ae 100644 --- a/docs/reference/types/number.md +++ b/docs/reference/types/number.md @@ -27,7 +27,7 @@ The following arithmetic operators work on numbers and return a [Number](/refere ### Relational operators -The following relational operators work on numbers and return a [Boolean](/reference/types/boolean): +The following relational operators work on numbers and return a [Boolean](/blocks/logic/boolean): * equality: `(3 + 1) = 4` * inequality: `3 != 4` @@ -67,5 +67,5 @@ basic.showNumber(abs); ### See also -[math](/blocks/math), [var](/blocks/variables/var), [Boolean](/reference/types/boolean), [show number](/reference/basic/show-number) +[math](/blocks/math), [var](/blocks/variables/var), [Boolean](/blocks/logic/boolean), [show number](/reference/basic/show-number) diff --git a/docs/reference/types/string-functions.md b/docs/reference/types/string-functions.md new file mode 100644 index 00000000..a4909c2e --- /dev/null +++ b/docs/reference/types/string-functions.md @@ -0,0 +1,3 @@ +## String functions + +TBD \ No newline at end of file