Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Updated Needed For Script Help

Small fix/correction suggested for the "Script Help". The Script Help states:

IsConnected( boardIndex )
Returns TRUE or FALSE if the specified EZ-B board index is connected
Example: $status = IsConnected(0)

It does not appear to actually return a value of TRUE/FALSE it returns a value of 1/0, where 1 means connected and 0 represents disconnected.

This leads me to a question on how to use "Print". In my code below the value for $status is printed (either a 1 or a 0 for connected for disconnected).

Code:


$status = IsConnected(0)
Print($status)


If I run this from the options (or edit) of a script and then select the console tab and run it, I see the printed output. Is there any other place I can see the printed output, or not so much? This makes me want a virtual LCD screen to print things too. :)


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
United Kingdom
#1  

Code:

IF(IsConnected(0) = 1)
$Status = "True"
Else
$Status = "False"
EndIf


Pop that in a script in script manager somewhere and call it with ControlCommand each time you want to check status to save typing it each time.

Not sure if you wanted a work around or not but there it is anyway:)


P.S. Virtual LCD sounds awesome however since different LCD displays are controlled differently it may not be as useful as first thought. What I have done is resized the script control so it displays the correct number of characters and rows which works for the most part:)
PRO
Synthiam
#3  
In programming, this is the same for TRUE...

Code:


if ($x = true)


and

Code:


if ($x >= 1)


And this is also the same for FALSE...

Code:


if ($x = false)


and

Code:


if ($x = 0)



Remember, that TRUE and "TRUE" are no the same thing