Add some linking for hw vids (#1813)

* add linking for hw vids, fix card pages

* revert vid card page and inline youtube links
This commit is contained in:
Galen Nickel
2019-02-08 13:48:49 -08:00
committed by Peli de Halleux
parent 2352102dc5
commit ce7ff4b7a6
10 changed files with 62 additions and 13 deletions

View File

@ -19,6 +19,12 @@ basic.showLeds(`
* `interval` is an optional [number](/types/number) that means how many milliseconds to wait after showing a picture.
If you are programming with blocks, `interval` is set at 400 milliseconds.
## ~ hint
See how the @boardname@ shows numbers, text, and displays images by watching this video about [LEDs](https://www.youtube.com/watch?v=qqBmvHD5bCw).
## ~
## Example
This program shows a picture with the ``show leds`` function.

View File

@ -15,6 +15,10 @@ A **g** is as much acceleration as you get from Earth's gravity.
## ~
Watch this video to learn how the accelerometer on the @boardname@ works:
https://www.youtube.com/watch?v=byngcwjO51U
## Parameters
* **dimension**: the direction you are checking for acceleration, or the total strength of force.

View File

@ -12,11 +12,11 @@ input.buttonIsPressed(Button.A);
## Returns
* [Boolean](/blocks/logic/boolean) that is `true` if the button you are checking is pressed, `false` if it is not pressed.
* a [boolean](/blocks/logic/boolean) value that is `true` if the button you are checking is pressed, `false` if it is not pressed.
## Example
This program uses an [if](/blocks/logic/if) to run
This program uses an [``||logic:if||``](/blocks/logic/if) to run
one part of the program if the `A` button is pressed, and
another part if it is not pressed.
@ -25,14 +25,18 @@ basic.forever(() => {
let pressed = input.buttonIsPressed(Button.A)
if (pressed) {
// this part runs if the A button is pressed
basic.showNumber(1, 150)
basic.showNumber(1)
} else {
// this part runs if the A button is *not* pressed
basic.showNumber(0, 150)
basic.showNumber(0)
}
})
```
Find out how buttons provide input to the @boardname@ in this video:
https://www.youtube.com/watch?v=t_Qujjd_38o
## See also
[on button pressed](/reference/input/on-button-pressed), [if](/blocks/logic/if), [forever](/reference/basic/forever)

View File

@ -14,6 +14,10 @@ has to be turned on first.
input.lightLevel();
```
Learn more about how light level is detected in this light sensor video:
https://www.youtube.com/watch?v=TKhCr-dQMBY.
## Returns
* a [Number](/types/number) that means a light level from ``0`` (dark) to ``255`` (bright).

View File

@ -12,6 +12,10 @@ on the @boardname@.
input.onButtonPressed(Button.A, () => {})
```
Find out how buttons provide input to the @boardname@ in this video:
https://www.youtube.com/watch?v=t_Qujjd_38o
## Example: count button clicks
This example counts how many times you press the `A` button.

View File

@ -9,7 +9,9 @@ input.rotation(Rotation.Roll);
## ~hint
The @boardname@ has a part called the **accelerometer** that can
check how the @boardname@ is moving.
check how the @boardname@ is moving. Watch this video to learn how the accelerometer works:
https://www.youtube.com/watch?v=byngcwjO51U
## ~

View File

@ -9,7 +9,7 @@ input.temperature();
## Returns
* a [Number](/types/number) that means the Celsius temperature.
* a [number](/types/number) that is the temperature in degrees Celsius.
## How does it work?
@ -18,6 +18,11 @@ Because the @boardname@ does not usually get very hot, the temperature of the CP
is usually close to the temperature of wherever you are.
The @boardname@ might warm up a little if you make it work hard, though!
Learn more about how the @boardname@ can detect hot or cold in this video:
https://www.youtube.com/watch?v=_T4N8O9xsMA
## Example: @boardname@ thermometer
The following example uses `temperature` and `show number` to show the temperature of the room.

View File

@ -12,16 +12,11 @@ led.plotBrightness(0, 0, 255)
led.setBrightness(255);
led.stopAnimation();
led.plotBarGraph(0, 0);
led.fadeIn();
led.fadeOut();
led.plotAll();
led.screenshot();
led.toggleAll();
led.setDisplayMode(DisplayMode.BackAndWhite);
led.enable(false)
```
## See Also
[plot](/reference/led/plot), [unplot](/reference/led/unplot), [point](/reference/led/point), [brightness](/reference/led/brightness), [setBrightness](/reference/led/set-brightness), [stopAnimation](/reference/led/stop-animation), [plotBarGraph](/reference/led/plot-bar-graph), [fadeIn](/reference/led/fade-in), [fadeOut](/reference/led/fade-out), [plotAll](/reference/led/plot-all), [screenshot](/reference/led/screenshot), [toggle](/reference/led/toggle), [toggleAll](/reference/led/toggle-all), [setDisplayMode](/reference/led/set-display-mode), [enabled](/reference/led/enable),
[plot](/reference/led/plot), [unplot](/reference/led/unplot), [point](/reference/led/point), [brightness](/reference/led/brightness), [setBrightness](/reference/led/set-brightness), [stopAnimation](/reference/led/stop-animation), [plotBarGraph](/reference/led/plot-bar-graph), [toggle](/reference/led/toggle), [setDisplayMode](/reference/led/set-display-mode), [enabled](/reference/led/enable),
[plotBrightness](/reference/led/plot-brightness),