
nyyirsS
Mauritius
Asked
— Edited

Hello Community,
I would like a script that will allow ultrasonic to sense a close distance and play a music file.
Can anyone help me to create such script?
Br,
Nyyir
This is very simple to do. All you have to do is use an If statement. Example:
This will run once and play a sound if the distance if at the set number. change #distance to the output of the ping sensor that is the distance you want.
assuming you have a Soundboard control added to your project
try this:
@MazeHorizonTech you beat me in 6 seconds... not fair you are around the corner (Canada)
@MazeHorizonTech
Missing:
Something like this:
The easiest way...
Thank you very much guys for helping
@ptp My bad. ARC didn't complain when I wrote it out in full interestingly.
If @nyyirsS uses Richards, all he has to do is add a loop if he wants it to repeatedly happen.
@MazeHorizonTech
All answers is good. I give credit to ptp bkoz he usues comments which makes me understand as I have no previous knowledge in ez script..
Still Thank you everyone for your help