Class SensorMux

    • Constructor Detail

      • SensorMux

        public SensorMux​(I2CPort port)
        Constructor
        Parameters:
        port - the port
      • SensorMux

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

      • getType

        public int getType()
        Return the type
        Returns:
        the type
      • isBatteryLow

        public boolean isBatteryLow()
        Method used to get if battery status is low.
        Returns:
        true if the battery is low, else false
      • configurate

        public void configurate()
        This method is necessary to execute to connect sensors on it
      • getDistance

        public int getDistance​(int channel)
        Method used to use a US with the sensor and get the distances
        Parameters:
        channel - the index of the channel
        Returns:
        the distance
      • isPressed

        public int isPressed​(int channel)
        Method used to manage a Touch Sensor
        Parameters:
        channel - the index of the channel
        Returns:
        true if the sensor is presed, else false
      • readValue

        public int readValue​(int channel)
        Method used to receive data from a Sound Sensor
        Parameters:
        channel - the index of the channel
        Returns:
        the value