Lynxmotion Smart Servos icon Lynxmotion Smart Servos Compact Lynxmotion Smart Servos with position feedback, safety features and UART TX/RX for Arduino/EZ-B v4; scriptable temp, load, load-dir and ping. Try it →

ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

Author Avatar
United Kingdom
YouTube
#17  

I think I'll leave this to Richard as I'm not near a Computer right now.

Author Avatar
United Kingdom
YouTube
#18  

@nomad.

See what you gone and did... You went and broke the EZ Robot website, lol.:P

Anyway back to your problem. Try this...

:loop
Ping_wait(D21,D22,Lower,50)
Servo(D3,90)
SayEZB("Danger, danger, danger")
Sleep(3000)
Goto(loop)

When you start the script the Ping sensor will start detecting distance. Now when the value goes below 50, the EZ-B will say Danger. It will sleep for three seconds and start start detecting distance again.

Hope it helps.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#19  

ooops, a bug in Ping_Wait() .. I'll fix it right away

Temporary work around: Use ports between D0 - D21

Author Avatar
PRO
Belgium
Thingiverse
#20  

hi guys

sorry late respons.i couldn get on the forum here.

rr

yes the ping works at port D22 AND D22 but not the script thanks averyone

#21  

@nomad... Just after the site went down I remembered there is a bug that DJ knows about... Some ping commands (haven't checked all of them) do not work on ports 23 and 22... As DJ mentioned, you need you use ports 21 or lower...

Author Avatar
United Kingdom
YouTube
#22  

@nomad.

If my script doesn't work for you (it does work as I tested it) then it maybe what Richard said about using port 22.

Author Avatar
PRO
Belgium
Thingiverse
#24  

allright it works,just need some volume

thanks you all