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.
Finished the code and get this error. Block directions - Start Block directions - Error on line 3: Missing String Quotes or Invalid Expression: < Block directions - Done (00:00:00.0156001)
Script:
Code:
#Check Left
If (GetPing(d0, d1)=<20) $Noleft=1 EndIF
#check Forward If GetPing(d2, d3)=<30) $Noforward=1 Endif
#Check Right If (Getping(d4, d5)=<20) $Noright=1 Endif
This is just a practice script. Plan on doing a lot more work with it.
Also you really don't need to use the = sign in your if statements here. The less than sign is sufficient... the ping return is so varied that it will rarely ever equal any variable/Constant you may have set anyway...
I can confirm GetPing() works in the latest version of ARC. Check the EZ-Script help on the right of the EZ-Script dialogue.
If you code looks like this
then it is incorrect.Code:
GetPing (and any of the "Get" functions) must be used as part of something bigger, for instnace;
Code:
Block directions - Start
Block directions - Error on line 3: Missing String Quotes or Invalid Expression: <
Block directions - Done (00:00:00.0156001)
Script:
Code:
This is just a practice script. Plan on doing a lot more work with it.
You're also missing the open bracket on the second IF.
You will find this code works;
Code:
Personally I always use the <= but it's personal preference.