Quote:
Originally Posted by pabigfe97
Hello All!
How can I code a Sharp IR sensor in Labview so that it accurately measures distance and changes in distance.
Thanks in advance for your help!
|
First of all, everybody, read what he asked. He said Labview.
What you didn't say was the model of the Sharp sensor. But don't even bother telling us that until you've taken that model number and put it into Google and found a spec sheet. That will tell you what kind of output it gives you. It may answer your question, or it may just let you ask a more specific question that people can give you help on.
Many such sensors give an analog output that is proportional to the distance. The spec sheet will give you a formula or a chart that shows the voltage that corresponds to a distance.
Good news is you have analog inputs on the Crio. They accept 0-5 volts. If the sensor also gives an output of 0-5 volts, you're good. If it's more, say 0-10 volts, you will need to scale it. That can be done as simply as a voltage divider with a couple of resistors.
If the sensor has some other output, say serial or I2C, you may be up to programming it or not. I don't know you level of programming ability.
But the first thing you need to know is what you're up against. The spec sheet will tell you that.