Insert new hw video links (#1910)
This commit is contained in:
committed by
Peli de Halleux
parent
a4f6a553d9
commit
c4868e131d
@ -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)
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user