Revision 1549
Updated IR rangefinder lookup table. Now reports in millimeters with an accuracy of +-10mm.
rangefinder.c | ||
---|---|---|
88 | 88 |
10cm from the detector. See the datasheet for more information. |
89 | 89 |
*/ |
90 | 90 |
|
91 |
static int IR_dist_conversion[114] PROGMEM = { |
|
92 |
800,791,751,714,681,651,623,597,574,552,531,512,494,478,462,447 |
|
93 |
,434,421,408,397,386,375,365,356,347,338,330,322,315,307,301,294 |
|
94 |
,288,282,276,270,265,260,255,250,245,241,237,232,228,224,221,217 |
|
95 |
,213,210,207,203,200,197,194,191,189,186,183,181,178,176,173,171 |
|
96 |
,169,166,164,162,160,158,156,154,152,151,149,147,145,144,142,140 |
|
97 |
,139,137,136,134,133,131,130,129,127,126,125,124,122,121,120,119 |
|
98 |
,118,117,115,114,113,112,111,110,109,108,107,106,105,105,104,103 |
|
99 |
,102,101 |
|
91 |
static int IR_dist_conversion[72] PROGMEM = { |
|
92 |
327,315,303,291,281,271,262,253,245,238,231,224,218,212,206,200, |
|
93 |
195,190,185,181,177,173,168,165,161,158,155,151,148,145,143,140, |
|
94 |
137,134,132,130,127,125,123,121,119,117,115,114,111,110,108,106, |
|
95 |
105,104,102,100,99,98,97,95,94,93,91,90,89,88,87,86,84,83,83,82, |
|
96 |
81,80,79,78 |
|
100 | 97 |
}; |
101 | 98 |
|
102 | 99 |
/** |
Also available in: Unified diff