Joystick (Direct Input) icon Joystick (Direct Input) — DirectInput joystick control for ARC: drive movement panels, control servos, assign button scripts, variable speed and rumble feedback. Try it →

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

Author Avatar
Canada
#1  

There are several UART command when you open/edit Script . Just do UART search under Script Help

there is also UART example available in ARC(EZ-Script Function Syntax)

You may also refer to a recent post https://synthiam.com/Community/Questions/6241

#2  

There are only three UART designations 0, 1, & 2. The firmware determines which digital port is used during a receive or transmit command.

#3  

That would be 3 UART ports... No need to designate RX and Tx ports...

Sample code on how to use them is below (using a Roomba)... using uart port 3


uartinit(0, 2, 57600) #initiate the port
sleep(20)

repeatUntil(1=2)
 uartWrite(0,2,142,7) #Check Roomba Create Bump and wheel drop sensor

sleep(20)
  
  IF (UARTAvailable(0,2)>0)
    $x=UARTRead(0,2,1)
    $x=GetByte($x)
print($x)
endif
sleep(50)
endrepeatUntil