Radiodocsupdate (#1430)

* a few updates

* more updates

* reorder radio blocks

* more shuffling of new radio apis

* fixing hot or ocold

* more doc fixes

* more updates

* fixing docs issues

* more doc fixes

* restore docs errors

* missing packate

* renamed argument of callback

* mssing radio

* more odcs fixes

* lock turtle

* ignore docs for now
This commit is contained in:
Peli de Halleux
2018-10-15 15:32:09 -07:00
committed by GitHub
parent 11fbbea5bd
commit 2b504d863d
49 changed files with 218 additions and 136 deletions

View File

@ -71,11 +71,11 @@ radio.setGroup(10)
serial.writeLine("Acceleration")
```
The ``||radio:on radio received||`` event reads the number value from the sending @boardname@. The number is then stored in the variable ``receivedNumber``. The last line uses the serial write command to send the text ``"z"`` label and the value of ``receivedNumber`` variable back to the Windows 10 MakeCode app. The data is sampled and send from 10 to 20 times per second.
The ``||radio:on received number||`` event reads the number value from the sending @boardname@. The number is then stored in the variable ``receivedNumber``. The last line uses the serial write command to send the text ``"z"`` label and the value of ``receivedNumber`` variable back to the Windows 10 MakeCode app. The data is sampled and send from 10 to 20 times per second.
```blocks
// onRadio receive & write z value to serial
radio.onDataPacketReceived(({ receivedNumber }) => {
radio.onReceivedNumber(function (receivedNumber) {
serial.writeValue("z", receivedNumber)
})
```