PWM Servo Feedback (I2c) icon PWM Servo Feedback (I2c) — Real-time servo position input via Arduino ADC over I2C; supports Nano (6 channels) or Mega (16), configurable I2C address and scalable chaining. Try it →

ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#9  

You mentioned the program you are working with is C#.

If it is EZ-Script, than you will do this...


$value = GetPing(d0, d5) * 0.5

First you just need to figure out your scalar. And use the tape measure like my prevoius response:)

#10  

OK thanks DJ ,last question i need in inches

Author Avatar
Canada
#11  

Hi @robotmaker From what you posted re: the specs on the LV-MaxSonar-EZ1T, (1 inch resolution and 0-254 inch range)... since that matches the ADC range of 0-255 then I would think that you could use the Analog Output of your sensor and an ADC port on the EZ-B.

The ADC Value control does have the option to type in your unit of measurement (for our visual purposes only) and a multiplier feature, which if set to 0 should represent 1 inch for each displayed number.

You may not need a scaler (multiplier) but if you do then the math is the same, just do the calibration steps @DJ mentioned using inches, and enter the scaler number in the multiplier field (i.e. 0.5 using @DJ's example).

Hope this helps.

#12  

they say that the analog ouput is not very stable,this sonar has the best accuracy of all the sonars pwm is very stable