diff --git a/docs/reference/radio/write-received-packet-to-serial.md b/docs/reference/radio/write-received-packet-to-serial.md index 8d06fe8b..26fc44b6 100644 --- a/docs/reference/radio/write-received-packet-to-serial.md +++ b/docs/reference/radio/write-received-packet-to-serial.md @@ -30,22 +30,26 @@ the second @boardname@), this program sends temperature data to the serial port. ```blocks -input.onButtonPressed(Button.A, () => { - radio.sendNumber(input.temperature()); - radio.sendValue("temperature", input.temperature()); - radio.sendString("It's warm now"); - - -}); +input.onButtonPressed(Button.A, function () { + radio.sendNumber(input.temperature()) + radio.sendValue("temp", input.temperature()) + radio.sendString("It's warm now") +}) radio.onReceivedNumber(function (receivedNumber) { - radio.writeReceivedPacketToSerial(); -}); + radio.writeReceivedPacketToSerial() +}) +radio.onReceivedValue(function (name, value) { + radio.writeReceivedPacketToSerial() +}) +radio.onReceivedString(function (receivedString) { + radio.writeReceivedPacketToSerial() +}) ``` Sample output to serial when ``A`` button pressed: ```json {"t":323,"s":0,"v":27} -{"t":325,"s":0,"n":"temperature","v":27} +{"t":325,"s":0,"n":"temp","v":27} {"t":326,"s":0,"n":"It's warm now"} ``` @@ -59,4 +63,4 @@ Sample output to serial when ``A`` button pressed: ```package radio -``` \ No newline at end of file +```