Asked
— Edited
Resolved by Rich!
Can anyone give me info on how to program an If-Then sequence? Ex. If the robot sees a red ball, it will stop, if it sees a green one, it will go forward. Also a screenshot of the programming would be helpful. Thanks!
I have covered IF statements in a few topics, I'll list them in a sec. But to answer this question is very simple;
First you need to make sure you have the camera control set up for colour detection, this will give ARC the global variable called $CameraObjectColor
Then your script would need the following IF statement
Here are the topics I mentioned which may be of benefit to read through.
If ElseIf Else Got & Return
An Introduction To Scripting
I've also posted a few other scripts which use IFs, my Ping Roam has a lot of IF statements. As do most of my files on the EZ-Cloud
Thanks! I will test that out.
There are dozens of example projects in ARC that demonstrates everything.
Start ARC
Press OPEN file the FILE menu
Press the EXAMPLES button
You will now see sub directories for SCRIPT examples and FUNCTION examples
I still keep forgetting about the examples already in ARC, must remember next time
Thanks for the help! I am excited to test it out!