Page 1 of 1

EV3 IR sensor capabilities

Posted: 01 Oct 2013, 20:02
by pepijndevos
I was wondering what the IR sensor is capable of. I found this bit in the LejOS source:

Code: Select all

    /**
     * return the bearing and distance to one or more IR beacons. Up to four
     * beacons (on different channels 0-3) can be detected. Each beacon has an
     * associated two byte value (so the beacon on channel 0 will have values
     * in locations 0 and 1 in the array. The first location contains the relative
     * bearing to the beacon, the second the distance.<br>
     * The bearing values range from -12 to +12 (with values increasing clockwise
     * when looking from behind the sensor. A bearing of 0 indicates the beacon is
     * directly in front of the sensor. Distance values (0-100) are in cm and if no
     * beacon is detected a bearing of 0 and a distance of -128(255) is returned.
     * @param bearings
     * @param offset
     * @param len
     */
So it can measure distance in centimetres of up to 4 beacons and direction in... what?

If that where any sensible and linear unit, you could do triangulation with a few beacons.

Re: EV3 IR sensor capabilities

Posted: 02 Oct 2013, 08:46
by gloomyandy
Everything I know about the sensor is in that comment. If you want to determine what units are used for the bearing (and how accurate and linear they are), then you will probably have to set up a test to find out.

Re: EV3 IR sensor capabilities

Posted: 02 Oct 2013, 11:22
by pepijndevos
Will do.