Asked — Edited

What Do You Think Is Wrong With My Script

:start stop() :test #See if someone comes too close to it GetPing( d18, d17) GetPing( d9, d8 )
Ping_wait(d17,d18,LOWER,20) Ping_wait(d8,d9,LOWER,20) goto (alarm) goto(test) :alarm ControlCommand("Soundboard",Track_10) goto(start) say ("Exit ting Security Mode!") halt() RETURN()


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

#1  

I forgot to mention that it is a Security Guard program script for use with PINGS and whatever. Those SF04 units have given me problems because I was used to the parallax PING 3 pin unit. Also, the EZ-Max1. But, I got them working. I just can't figure a way to TEST for the correct distance with all of them to make the robot respond in a way that I want. As you see from my icon logo, I have 3 sharp units and One scanning PING. It worked good and never ran into anything. I just have to learn to adjust.

Thanks in Advance

Mel

#2  

Ping_Wait(d18,d17,LOWER,20); Ping_Wait(d9,d8,LOWER,20);

Ping_Wait (triggerPort, echoPort, [higher/lower/equals], distance) GetPing( trigger port, echo port )

#3  

I'm sorry, I don't get what you are saying. Are you saying Put the Pingwait thingy before getping thingy?

I don't quite understand. confused

#4  

look at the ping_wait statement you posted see anything wrong with the trigger and echo port declaration

#5  

I see that Ping_Wait is Ping_wait. I also see that the end of line ; is not there. And I see that GET_Ping is After instead of Before. I am correct on all of those? I figured you would have to get it before you wait on it. But, maybe I was wrong.

Just let me know if I am correct on all counts. I don't remember putting a ; at the end of the line in the EZScripts, only in the C-Scripts.

Well, let me know.

Thanks Orwnic82!

#6  

Sorry I am sure the ; is not suppost to be there it is something I am use to adding to my code. I was simply saying in GetPing( trigger port, echo port ) you have it declared as: GetPing( d18, d17)

but for Ping_Wait (triggerPort, echoPort, [higher/lower/equals], distance) you have: Ping_wait(d17,d18,LOWER,20)

notice that your triggerport and echo port are backwards for the Ping_wait

I am sure you have GetPing right being declared before Ping_wait

#7  

Oh, I could not see the forest for the trees. That is because on my notes, I had a discrepancy. Thank You so much for calling that to my attention. I am blind in one eye and can hardly see out of the other.

Thanks, I really appreciate that.

Mel

#8  

No problem. Sorry it took me so long to get that across.

#9  

I have a DENSE mind. I am surprised that I get anything done in the course of a day. God Bless You!