More one pager project edits (#597)

This commit is contained in:
Galen Nickel
2017-12-06 20:23:17 -08:00
committed by Peli de Halleux
parent 7ef65715d7
commit f7a2a24ed8
6 changed files with 59 additions and 61 deletions

View File

@@ -1,12 +1,12 @@
# messenger
# Messenger
![](/static/mb/projects/a9-radio.png)
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