Asked — Edited

Ping Sensor Offset

how can i add offset to sonars or IR sensors ,some sensors dont read the distance correct ,like sonars its 6 inches


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Synthiam
#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

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