
robotmaker
USA
Asked
— Edited
how can i add offset to sonars or IR sensors ,some sensors dont read the distance correct ,like sonars its 6 inches
how can i add offset to sonars or IR sensors ,some sensors dont read the distance correct ,like sonars its 6 inches
You mentioned the program you are working with is C#.
If it is EZ-Script, than you will do this...
First you just need to figure out your scalar. And use the tape measure like my prevoius response
OK thanks DJ ,last question i need in inches
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.
they say that the analog ouput is not very stable,this sonar has the best accuracy of all the sonars pwm is very stable