Asked — Edited

Ez-Script If And And And Syntax?

I'm trying to teach my robot to center a red can with the cameraX variables and use the center of 3 ping sensors to know when it's in punching distance per my video.

Click To Watch Video

Is there currently a way to do the equivalent of this C# script in ARC: if ((LeftDistance>Far) && (CenterDistance>Far) && (RightDistance>Far)){ ezb0.Movement.GoReverse(50); System.Threading.Thread.Sleep(100); };

in the Ez-Script?

Here are some things I've tried:


if (($camx>70) and ($distance>25) and ($Cam>70))
Forward(100,100)

if $Camera>20
if $CameraC>20
if $Cam>20
Forward(100,100)

My robot got a lot smarter with the addition of the $CameraCenterX variable but to complete allowing it to autonomously search for a can around the house, punch it and verify that it has fallen over I believe the and commands will suffice. Or if it's easier, perhaps they the CameraCenterX variables could be added to the built in C# scripting language that works with these if and syntax? But I sooooo much like the EZ-Script over the C# script.

Thanks in advance.


ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.