Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Steve G!

What Is Matrix?

i get an error trying to use the ping sensor.something about matrix is not good.

User-inserted image


and the text is in nederlands written

bigger pic

User-inserted image

AI Support Bot
Related Content
Synthiam
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
PRO
Belgium
#55  
rr
the previous one stops rotating and disconnects the ezbv4
#56  
Which script? What post #?

How long are those sound files 4 and 5 when you play them on their own? 1,2 or more seconds long?

Take out the ControlCommand("Soundboard v4", Stop commands and see if it still disconnects... Make sure you battery is good as well... a weak battery would cause your ezb to disconnect while moving or attempting to move servos...
PRO
Belgium
#57  
rr
i just try post #55 and post #53
bolt doesn move the servo and disconnect the ezbv4
PRO
Belgium
#58  
batt are fully charged

sound files are 4 seconds each.
took the command stop out.
last little longer but disconnect ezbv4
#59  
It works for fine for me albeit I am using different sound files and a fresh battery...

You'll to write your own then because I don't know your set up so that's the best I can do... Like I said... check your battery
#60  
One last try... see if this works ... problem will be it will only play track 5 once until it sees an object...

Code:


setVolume(100)
:top
ControlCommand(Soundboard V4, Track_5)
repeatuntil(0)
$distance=GetPing(D20,D21) #check ping
if ($distance<50)
servo(D3,90)
ControlCommand("Soundboard v4", Stop)
sleep(25)
ControlCommand(Soundboard V4, Track_4)
sleep(4000) # change to what works best
ControlCommand("Soundboard v4", Stop)
sleep(25)
goto(top)
endif
servo(D3,50)
sleep(500)
servo(D3,130)
sleep(500)
endrepeatuntil
PRO
Belgium
#61  
rr

#you may need a sleep command here.i put one in and it doesn disconnect the,
ezbv4.ok i will test further.thank you
#62  
Ok, work with that one then... the one I just in posted in post #61 probably will work, but it won't play track 5 continually...
#63  
@Nomad maybe a possible feature request is to be able to have tracks in the soundboard auto replay so you don't have the call it to play continually in a program repeatuntil or goto loop...... In your case track 5 is only 4 seconds long so having it auto replay would make what you want to do much easier... So this way you start track 5 (ping sound) and it plays over and over until you see an object that is detected with the ping ... Then track 4 plays... When the object is no longer in range your program starts track 5 again...
PRO
Belgium
#64  
rr

i jus found it the code do just that.am uploding a video.
so one thing to be found is when he spot an object servo must stay ,
in the direction off the object
#65  
Get rid of servo(D3,90) in my code and the ping should point to the object it sees..
PRO
Belgium
#66  
dj has fix the bug on port d22 and i downloded the new version.
here the video what we have sofar.


#67  
Looks like you almost got it working... awesome...:)
PRO
Belgium
#68  
yes now looking to make the servo stop when he detects an object and say.
stop surrender now ,got the sound file.
gonna make a motion for the ping make a special movement when he detects,
the anemy.
PRO
Belgium
#69  
i made a video.what i want him to do when he spotted an object.
can i wright that in the script next to a soundfile?


User-inserted image



#70  
@nomad you can add a new line anywhere you want... see below

Code:


setVolume(100)
repeatuntil(0)
$distance=GetPing(D20,D21) #check ping
if ($distance<50)
servo(D3,90)
ControlCommand(Soundboard V4, Track_4)

#new line
#new line
#another new line

sleep(3000) # change to what works best
else
ControlCommand(Soundboard V4, Track_5)
#may need a sleep command here
endif
servo(D3,50)
sleep(250)
servo(D3,130)
sleep(250)
endrepeatuntil
PRO
Belgium
#71  
and it will play soundfile and motionfile same time?
#72  
It depends on what you are doing and how you code it...
PRO
Belgium
#73  
next to the soundfile danger danger i want that he does the movement like in the last video.same time.
#74  
Just code the movement on the next line after track 4 (danger, danger, danger)...