I have one sharp sensor and I have to use it to measure the height of a block (6cm - 12 cm). How can I accomplish this ? Actually it is to be connected to a robot which will move near the box and determine its height.
About GP2Y0A21YK0F: http://www.sharpsma.com/webfm_send/1489
The robot is like this: https://i.sstatic.net/YdKFP.jpg
If possible please suggest a solution that doesn't require moving the sensor. But any method will do fine.