More one pager project edits (#597)
This commit is contained in:
committed by
Peli de Halleux
parent
7ef65715d7
commit
f7a2a24ed8
@@ -1,12 +1,12 @@
|
||||
# messenger
|
||||
# Messenger
|
||||
|
||||

|
||||
|
||||
Use the radio to create an app that sends "YO" messages.
|
||||
Use the radio in an app that sends "YO" messages.
|
||||
|
||||
## Step 1
|
||||
|
||||
Use [on button pressed](/reference/input/on-button-pressed) to send the number "0" over radio.
|
||||
Use ``||input:on button pressed||`` to send the number `0` over radio.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@@ -16,7 +16,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 2
|
||||
|
||||
Use [radio on data packet received](/reference/radio/on-data-packet-received) display "YO" when the number ``0`` is received
|
||||
Use ``||radio:on data packet received||`` display "YO" when the number ``0`` is received
|
||||
by radio.
|
||||
|
||||
```blocks
|
||||
@@ -29,11 +29,11 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
})
|
||||
```
|
||||
|
||||
Download the program and **upload the same .hex file to 2 devices!**
|
||||
Download the program to one @boardname@ and then to another. Press button **A** on one and see if the other gets a message.
|
||||
|
||||
## Step 3
|
||||
|
||||
Use [on button pressed](/reference/input/on-button-pressed) to send the number "1" over radio.
|
||||
Use ``||input:on button pressed||`` to send the number `1` over radio.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
@@ -43,7 +43,7 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
## Step 4
|
||||
|
||||
Add blocks in [radio on data packet received](/reference/radio/on-data-packet-received) to display "BYE" when the number ``1`` is received
|
||||
Add blocks in ``||radio:on data packet received||`` to display "BYE" when the number ``1`` is received
|
||||
by radio.
|
||||
|
||||
```blocks
|
||||
@@ -59,6 +59,7 @@ radio.onDataPacketReceived(({ receivedNumber }) => {
|
||||
})
|
||||
```
|
||||
|
||||
Download the program to the @boardname@s again and try your messenger!
|
||||
|
||||
```package
|
||||
radio
|
||||
|
||||
Reference in New Issue
Block a user