Exemple #1
0
    def pi_revision(self):
        """Get the version number of the Raspberry Pi board.

        Args:
            None
        Returns:

            An int containing the Pi board revision (1 or 2).
            If error, returns 0.
        """
        return i2c.revision()
Exemple #2
0
    def pi_revision(self):
        """Get the version number of the Raspberry Pi board.

        Args:
            None
        Returns:

            An int containing the Pi board revision (1 or 2).
            If error, returns 0.
        """
        return i2c.revision()
Exemple #3
0
    def pi_i2c_bus_number(self):
        """Get the I2C bus number /dev/i2c.

        Args:
            None
        Returns:
            An int containing i2c bus number
        """
        if i2c.revision() > 1:
            return 1
        else:
            return 0
Exemple #4
0
    def pi_i2c_bus_number(self):
        """Get the I2C bus number /dev/i2c.

        Args:
            None
        Returns:
            An int containing i2c bus number
        """
        if i2c.revision() > 1:
            return 1
        else:
            return 0