Class MindsensorsLineLeader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, SensorConstants, SensorMode, SensorModes, SampleProvider

    public class MindsensorsLineLeader
    extends I2CSensor
    MindSensors Line Follower Sensor
    This sensor an array of 8 sensors with controlled light source, returning you values of the sensor readings.

    The code for this sensor has not been tested. Please report test results to the leJOS forum.

    Supported modes
    Mode name Description unit(s) Getter
    Red Measures the light value when illuminated with a red light source. N/A, normalized getRedMode()

    Sensor configuration
    The sensor can be calibrated for black and white using the calibrateWhite and calibrateBlack methods.

    The sensor can be put in and out of sleep mode (lights off) using the sleep method and wakeUp methods.

    See Sensor datasheet See Sensor Product page See The leJOS sensor framework See leJOS conventions for SampleProviders

    Author:
    Juan Antonio Brenha Moral, Eric Pascual (EP)
    • Constructor Detail

      • MindsensorsLineLeader

        public MindsensorsLineLeader​(I2CPort port,
                                     int address)
        Constructor
        Parameters:
        port -
        address - I2C address for the device
      • MindsensorsLineLeader

        public MindsensorsLineLeader​(I2CPort port)
        Constructor
        Parameters:
        port -
      • MindsensorsLineLeader

        public MindsensorsLineLeader​(Port port,
                                     int address)
        Constructor
        Parameters:
        port -
        address - I2C address for the device
      • MindsensorsLineLeader

        public MindsensorsLineLeader​(Port port)
        Constructor
        Parameters:
        port -
    • Method Detail

      • init

        protected void init()
      • sendCommand

        public void sendCommand​(char cmd)
        Send a single byte command represented by a letter
        Parameters:
        cmd - the command to be sent
      • sleep

        public void sleep()
        Sleep the sensor
      • wakeUp

        public void wakeUp()
        Wake up the sensor
      • calibrateWhite

        public void calibrateWhite()
      • calibrateBlack

        public void calibrateBlack()
      • getRedMode

        public SensorMode getRedMode()
        Return a sample provider in that measures the light reflection of a surface illuminated with a red led light. The sensor houses 8 light sensors. Each element in the sample represents one light sensor.