MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / set_grove_state

Method set_grove_state

Software/Python/gopigo3.py:624–633  ·  view source on GitHub ↗

Set grove output pin LOW/HIGH Keyword arguments: pin -- The grove pin(s). GROVE_1_1, GROVE_1_2, GROVE_2_1, and/or GROVE_2_2. state -- The pin state. GROVE_LOW or GROVE_HIGH.

(self, pin, state)

Source from the content-addressed store, hash-verified

622 reply = self.spi_transfer_array(outArray)
623
624 def set_grove_state(self, pin, state):
625 """
626 Set grove output pin LOW/HIGH
627
628 Keyword arguments:
629 pin -- The grove pin(s). GROVE_1_1, GROVE_1_2, GROVE_2_1, and/or GROVE_2_2.
630 state -- The pin state. GROVE_LOW or GROVE_HIGH.
631 """
632 outArray = [self.SPI_Address, self.SPI_MESSAGE_TYPE.SET_GROVE_STATE, pin, state]
633 reply = self.spi_transfer_array(outArray)
634
635 def set_grove_pwm_duty(self, pin, duty):
636 """

Callers 1

Grove_LED.pyFile · 0.45

Calls 1

spi_transfer_arrayMethod · 0.95

Tested by

no test coverage detected