Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.


Here's an EZ-Script that uses the built in camera variables that started with update 2012.10.09.

I'm trying to make a robot that's smarter than a dog that can be told to autonomously find, knock over a red can, and confirm it completed the task.

Yet note that my commented out if statement with 3 ands isn't functional yet unless I'm doing it wrong. Once the EZ-Script can accept multiple conditions I'll have a robot that will autonomously search around for a red can and punch it over with its 6 axis robotic arm.

The autonomous navigation script is complete and is done with the built in c# script because of it's ability to handle multiple ands in conditional If statements. But I like the EZ-Script much better.

There appear to be very few of us who learn best from example code in this forum. But I get it that this is a work in progress and it's magnitudes ahead of other robotic applications. If you have MS developer studio or know c++ this project is complete. But DJ is constantly building more into the scripting languages that are easier to understand.

Print($CameraCenterY) Print($CameraCenterX)


#Print( $CenterDistance)
$CenterDistance=GetPing(d1, d0)

# below will punch the can after it the function below inches close enough
#if (($camx>70) and ($camx70) and ($camx13))
#Forward( 100, 100 )

#Currently it uses the center of 3 ping sensors distance to know it's lined up with the can before punching it. 
if $CenterDistance60)
say("We knocked the can over")

if ($GroundFrontNow<60)
say("The can is still standing")