
Gerald
USA
Asked
— Edited
I got a problem when I got my distance sensor. Is there any tutorials that teach how to connect the distance sensor in EV4?
I got a problem when I got my distance sensor. Is there any tutorials that teach how to connect the distance sensor in EV4?
I did the way you told me, but it still failed to detect any distances.
What I did is connect trigger pin to port 23, echo pin to port 22, and connect ground and vcc pins to port 21, but ARC can't show any distance but 255.
Here are the images of my settings.
And I'm sure this ultrasonic distance sensor works because I test it in arduino successfully.
I'm not sure which step is wrong!
Did you ever connect it without the voltage regulator? If it receives more than 5 volts, it will instantly fry and from then on will always show a distance of 255.
Alan
I did, the regulator is in the first image I uploaded, you believe you can find that.
As Alan said... if you hooked it up even briefly without the 5V regulator you might have just killed your ping....
@Gerald.
As well as what Alan has already mentioned, another thing to check is if you wired up the regulator correctly, by that I mean EZ-B to "V IN" and "V OUT" to sensor. If it's reversed, that could damage the regulator and possably the sensor also. Check the sensor with the Arduino again and see if it's still working.
@Gerald I believe your issue is likely that you are using D23, we have recently found that it isn't working with the Ultrasonic please try 21 and 22, or 20 and 21. I have mentioned it to DJ and it's likely on the list to be looked at.
I connected mine with no problem. I believe that the regulator is in line, as stated already.
@Gerald, You said in one of posts;
Try connecting the ground and VCC to the same pin as your trigger. For example: Vcc, Ground and Trigger - Port22 and Echo to Port 23. (You can any 2 ports) That's how I have mine set up and they work great.