Insert new hw video links (#1910)

This commit is contained in:
Galen Nickel
2019-03-11 15:04:38 -07:00
committed by Peli de Halleux
parent a4f6a553d9
commit c4868e131d
15 changed files with 111 additions and 5 deletions

View File

@ -29,6 +29,12 @@ instead of the USB cable.
* ``name`` means the pin that is being pressed, either `P0`, `P1`, or `P2`
## Pin presses in action
See how the @boardname@ detects a press at a pin or on something connected to a pin in this video:
https://www.youtube.com/watch?v=GEpZrvbsO7o
## Example: pin pressed counter
This program counts how many times you press the `P0` pin.
@ -36,10 +42,10 @@ Every time you press the pin, the program shows the number of times on the scree
```blocks
let count = 0
basic.showNumber(count, 100)
basic.showNumber(count)
input.onPinPressed(TouchPin.P0, () => {
count = count + 1
basic.showNumber(count, 100)
basic.showNumber(count)
})
```

View File

@ -25,6 +25,12 @@ instead of the USB cable.
* a [boolean](/blocks/logic/boolean) that means whether the pin you say is pressed (`true` or `false`)
## Pin presses in action
See how the @boardname@ detects a press at a pin or on something connected to a pin in this video:
https://www.youtube.com/watch?v=GEpZrvbsO7o
## Example
This program shows `1` if `P0` is pressed, and `0` if `P0` is not pressed:

View File

@ -11,6 +11,14 @@ radio.onReceivedNumber(function (receivedNumber) {})
* **receivedNumber**: The [number](/types/number) that was sent in this packet or `0` if this packet did not contain a number. See [send number](/reference/radio/send-number) and [send value](/reference/radio/send-value)
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Examples
### Tell me how fast

View File

@ -10,6 +10,14 @@ radio.onReceivedString(function (receivedString) {})
* **receivedString**: The [string](/types/string) that was sent in this packet or the empty string if this packet did not contain a string. See [send string](/reference/radio/send-string) and [send value](/reference/radio/send-value)
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Example
This program continuously sends a cheerful message. It also receives a messages from nearby @boardname@s. It shows these messages on the screen.

View File

@ -11,6 +11,14 @@ radio.onReceivedValue(function (name, value) {})
* **name**: a [string](/types/string) that is a name for the value received.
* **value**: a [number](/types/number) that is the value received.
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Example
This program keeps sending numbers that say how fast the @boardname@ is

View File

@ -10,6 +10,13 @@ radio.sendNumber(0);
* **value**: a [number](/types/number) to send.
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Examples

View File

@ -11,6 +11,13 @@ radio.sendString("Hello!")
* **msg**: a [string](/types/string) to send by radio.
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Example: Two-way radio

View File

@ -12,6 +12,14 @@ radio.sendValue("name", 0);
* **name**: a [string](/types/string) that is the name of the value to send.
* **value**: a [number](/types/number) that is the value to send.
## ~ hint
Watch this video to see how the radio hardware works on the @boardname@:
https://www.youtube.com/watch?v=Re3H2ISfQE8
## ~
## Example: Broadcasting acceleration
This program sends your @boardname@'s **acceleration** (amount it is