Millimeter distance using the IR-kit (JBot Code)
johnatwork
Posts: 7
Hello,
I managed to get the IR-kit (the one that came with the Boe-bot) working using the attached code (from the JBot project) It seems to work, moving my hand closer to the sensor yields a lower value and further away yields a higher value (~5-15) In a seemingly linear fashion.
The problem is that I don't know what these values mean and I would prefer the them in Millimeters. The first idea I had was to simply use my hand and a ruler to map each value to a given distance, but there has to be a better way.
I noticed another thread posted here, basically asking the same question, however I want to use the code I already got working and not rewrite it using FreqOut or anything similar.
Any ideas?
I managed to get the IR-kit (the one that came with the Boe-bot) working using the attached code (from the JBot project) It seems to work, moving my hand closer to the sensor yields a lower value and further away yields a higher value (~5-15) In a seemingly linear fashion.
The problem is that I don't know what these values mean and I would prefer the them in Millimeters. The first idea I had was to simply use my hand and a ruler to map each value to a given distance, but there has to be a better way.
I noticed another thread posted here, basically asking the same question, however I want to use the code I already got working and not rewrite it using FreqOut or anything similar.
Any ideas?
Comments
The values 0-14 represent some distance but those are not specified.
Take some readings and note the distances for readings 0 to 14.
That gives you a value-to-distance table·which you can
use in your program to translate values into distance.
regards peter
This should provide 4x better resolution.
Question is if you can have millimeter resolution with IR.
Acoustic distance measurement may be more accurate.
regards peter
With only 16 levels and millimeter resolution you would only
have a distance variation of 16 millimeter, which is in my opinion
of no use.
I still think for those resolutions and some larger distances
that an acoustic solution like the Ping is better suited.
regards peter