Cognitive Emotion icon Cognitive Emotion — Uses Microsoft Cognitive Emotion cloud to analyze camera images, returning emotion descriptions and confidence for speech/output (requires internet). Try it →

ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

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