radio.onReceivedString(function on_received_string(receivedString: string) { rcvd = receivedString }) let rcvd = "" let chnl = 10 radio.setGroup(chnl) basic.forever(function on_forever() { if (!"this".isEmpty()) { if (rcvd.compare("N") == 0) { basic.showArrow(ArrowNames.North) } else if (rcvd.compare("S") == 0) { basic.showArrow(ArrowNames.South) } } })