
PRO
dbeard
USA
Asked
— Edited

I am trying to get the HC-Sr04 sonar to work with the EZB. I use the add for my project, select radar view and the value stays at 255. I am using port D0 and D1. Could the sensor be bad? It is brand new, just received it in box with other components.
thanks
Black wire goes to black pin on EZB (D0)
Red wire goes to red pin on the ezb (D0)
White wire will be either white pin of the EZB on D0 or D1
Green wire will be on white pin of the EZB either D0 or D1
Then I have green on echo going to d1 white
nothing 255.
Thanks for your photos they really help! A couple other quick checks for you:
The Default value of the Ultrasonic is 255 until an object passes in front of it, have you tried placing your hand in front of the sensor at a fairly close distance (ex: 6 inches)?
How high of voltage input are you providing to the EZ-B?
Do you have the voltage input (Vin) side of the provided Ultrasonic 5V regulator connected to the EZ-B side or to the Ultrasonic side? It should be on the EZ-B side.
my 2 cents.
Richard
edit.....So I tried it out with no other ground than the 5 volt ac adapter on the sensor with the radar window,it is showing multiple red dots near bottom but hand in front of sensor then shows a red ping further to top of radar window and motors go into obstacle turning so I guess I can just run the sensor with it's own battery and nothing but signal wires to white ports EZ-B?will his cause any future harm if no extra ground to EZ-B?
next edit.....so since I was getting crazy random pings everywhere,thought I would add the ground wire on eZ-B and then $$bingo all the random pings stopped,now i was getting accurate steady red dot line showing the roof as my sensor was facing the roof and when I put my hand in front of sensor it showed up a red dot on radar closer to bottom,think that's it ,working good!
Good job solving your own question @RoboRad
Also (you already appear to know this) but as a reminder, do not exceed the 5volts for your ultrasonic sensor or you will damage it.