Update radio event parm usage descriptions (#2165)

This commit is contained in:
Galen Nickel
2019-06-14 09:27:04 -07:00
committed by Abhijith Chatra
parent 16a3828b1c
commit bf68646d18
8 changed files with 9 additions and 10 deletions

View File

@ -116,7 +116,7 @@ radio.onReceivedNumber(function (receivedNumber) {
})
```
Go to ``||variables:Variables||`` and get the ``||variables:receivedNumber||`` variable and put it in first slot of the ``||logic:0 = 0||``. Change the `0` in the second slot to `1`.
Pull the ``||variables:receivedNumber||`` variable down from the ``||radio:radio on received receivedNumber||`` and put it in first slot of the ``||logic:0 = 0||``. Change the `0` in the second slot to `1`.
```blocks

View File

@ -28,8 +28,7 @@ radio.onReceivedString(function (receivedString) {
## Displaying text @fullscreen
Add a ``||basic:show string||`` to display the string on the screen. You will find the ``receivedString`` variable
under **Variables** in the toolbox.
Add a ``||basic:show string||`` to display the string on the screen. Pull the ``||variables:receivedString||`` out of ``||radio:on received string||`` and put it into ``||basic:show string||``.
```blocks
radio.onReceivedString(function (receivedString) {

View File

@ -12,7 +12,7 @@ You will need 2 @boardname@ for this part. By using the radio, we can make the M
Download the code below to the @boardname@ on the Milk Carton Monster and another "controller" @boardname@. Whenever ``A`` is pressed, the Milk Carton Monster will move once.
```blocks
radio.onReceivedNumber(({ receivedNumber }) => {
radio.onReceivedNumber((receivedNumber) => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 180)

View File

@ -12,7 +12,7 @@ You will need a second @boardname@ for this part. By using the radio, we can con
Download the code below to the @boardname@ that's on the Milky Monster and again to another "controller" @boardname@. Whenever button **A** is pressed, the Milky Monster will move one time.
```blocks
radio.onReceivedNumber(({ receivedNumber }) => {
radio.onReceivedNumber((receivedNumber) => {
pins.servoWritePin(AnalogPin.P0, 0)
basic.pause(500)
pins.servoWritePin(AnalogPin.P0, 180)

View File

@ -38,7 +38,7 @@ basic.forever(function () {
### Red light, green light
Use the ``||radio:on button pressed||`` block to run code when button ``A`` and ``B`` are pressed.
Use the ``||input:on button pressed||`` block to run code when button ``A`` and ``B`` are pressed.
When ``A`` is pressed, the game goes into ``GREENLIGHT`` mode. When ``B`` is pressed, the game
goes into ``REDLIGHT`` mode. We also use ``||basic:show icon||`` to display the current game state.