Exemple #1
0
    def ping(self):
        """
        Returns True if OPSOROHAT rev3 is connected.

        :return:         True if shield is connected
        :rtype:          bool
        """
        return SPI.command(CMD_PING, returned=1)[0] == 0xAA
Exemple #2
0
 def led_off(self):
     """Turns status LED off."""
     SPI.command(CMD_LEDOFF)
Exemple #3
0
 def led_on(self):
     """Turns status LED on."""
     SPI.command(CMD_LEDON)
Exemple #4
0
 def reset(self):
     """Resets the ATmega328, MPR121 and PCA9685."""
     SPI.command(CMD_RESET, delay=2)