Jump to content

hrkzkb

Newcomers
  • Posts

    1
  • Joined

  • Last visited

hrkzkb's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I'm Japanese, so I apologize for my poor English. I purchased ANALOG DISCOVERY 3 and would like to receive TX and RX separately. I executed the script below, but TX and Rx are received together. // Script using Protocol UART. if(!('Protocol' in this)) throw "Please open the Protocol tool"; Protocol.Mode.text = "UART" // make sure UART tab is selected Protocol.UART.TX.value = 2 Protocol.UART.RX.value = 3 Protocol.config() Protocol.UART.Receiver() // reset receiver print("") for (;;) { wait(0.1) var rx = Protocol.UART.Receives() if (rx[0] != "") { var d = new Date() print("TX:" + d.getMinutes() + "m" + d.getSeconds() + 's:' + rx[0]) } if (rx[1] != "") { var d = new Date() print("RX:" + d.getMinutes() + "m" + d.getSeconds() + 's:' + rx[1]) } } Output RX:54m20s:\x02J RX:54m20s:\x03\x02J00000 RX:54m21s:\x03 RX:54m25s:\x02J RX:54m25s:\x03\x02J00000 RX:54m26s:\x03 RX:54m30s:\x02J RX:54m30s:\x03\x02J00000 RX:54m31s:\x03 If anyone knows how to receive them separately, I would appreciate it if you could let me know.
×
×
  • Create New...