當前位置: 首頁>>代碼示例>>Python>>正文


Python GPIO.LOW屬性代碼示例

本文整理匯總了Python中Adafruit_BBIO.GPIO.LOW屬性的典型用法代碼示例。如果您正苦於以下問題:Python GPIO.LOW屬性的具體用法?Python GPIO.LOW怎麽用?Python GPIO.LOW使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在Adafruit_BBIO.GPIO的用法示例。


在下文中一共展示了GPIO.LOW屬性的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: input

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def input(self, pin):
        """Read the specified pin and return HIGH/true if the pin is pulled high,
        or LOW/false if pulled low."""
        raise NotImplementedError 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:6,代碼來源:GPIO.py

示例2: low

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def low(self):
        GPIO.output(self.port, GPIO.LOW) 
開發者ID:daq-tools,項目名稱:kotori,代碼行數:4,代碼來源:gpio.py

示例3: output

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def output(self, pin, value):
        """Set the specified pin the provided high/low value.  Value should be
        either HIGH/LOW or a boolean (true = high)."""
        raise NotImplementedError 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:6,代碼來源:GPIO.py

示例4: set_low

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def set_low(self, pin):
        """Set the specified pin LOW."""
        self.output(pin, LOW) 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:5,代碼來源:GPIO.py

示例5: is_low

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def is_low(self, pin):
        """Return true if the specified pin is pulled low."""
        return self.input(pin) == LOW


# Basic implementation of multiple pin methods just loops through pins and
# processes each one individually. This is not optimal, but derived classes can
# provide a more optimal implementation that deals with groups of pins
# simultaneously.
# See MCP230xx or PCF8574 classes for examples of optimized implementations. 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:12,代碼來源:GPIO.py

示例6: output_pins

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def output_pins(self, pins):
        """Set multiple pins high or low at once.  Pins should be a dict of pin
        name to pin value (HIGH/True for 1, LOW/False for 0).  All provided pins
        will be set to the given values.
        """
        # General implementation just loops through pins and writes them out
        # manually.  This is not optimized, but subclasses can choose to implement
        # a more optimal batch output implementation.  See the MCP230xx class for
        # example of optimized implementation.
        for pin, value in iter(pins.items()):
            self.output(pin, value) 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:13,代碼來源:GPIO.py

示例7: input_pins

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def input_pins(self, pins):
        """Read multiple pins specified in the given list and return list of pin values
        GPIO.HIGH/True if the pin is pulled high, or GPIO.LOW/False if pulled low.
        """
        # maybe rpi has a mass read...  it would be more efficient to use it if it exists
        return [self.rpi_gpio.input(pin) for pin in pins] 
開發者ID:adafruit,項目名稱:Adafruit_Python_GPIO,代碼行數:8,代碼來源:GPIO.py

示例8: set_enabled

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def set_enabled(self):
    GPIO.output(self.pin, GPIO.LOW) 
開發者ID:intelligent-agent,項目名稱:redeem,代碼行數:4,代碼來源:Enable.py

示例9: reverse

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def reverse(self, rpm):
        GPIO.output(self.directionPin, GPIO.LOW)
        self.setSpeed(rpm) 
開發者ID:ericboehlke,項目名稱:BB-8,代碼行數:5,代碼來源:StepperMotor.py

示例10: ledBlink

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def ledBlink(data):
  if data.data = true:
     GPIO.output(LED, GPIO.HIGH)
     time.sleep(0.5)
     GPIO.output(LED, GPIO.LOW)
     time.sleep(0.5) 
開發者ID:PacktPublishing,項目名稱:ROS-Robotics-Projects-SecondEdition,代碼行數:8,代碼來源:beagleboneblack_gpio.py

示例11: __init__

# 需要導入模塊: from Adafruit_BBIO import GPIO [as 別名]
# 或者: from Adafruit_BBIO.GPIO import LOW [as 別名]
def __init__(self):
        global GPIO
        try:
            import Adafruit_BBIO.GPIO as GPIO
        except ImportError:
            raise ImportError(self._import_error_msg)

        super(BeagleBoneBlack, self).__init__()

        self.PIN_MODES = {
            pingo.IN: GPIO.IN,
            pingo.OUT: GPIO.OUT,
        }

        self.PIN_STATES = {
            pingo.HIGH: GPIO.HIGH,
            pingo.LOW: GPIO.LOW,
        }

        gpio_pins = [pingo.DigitalPin(self, location, gpio_id)
                     for location, gpio_id in self.PINS.items()]
        ground_pins = [pingo.GroundPin(self, location)
                       for location in self.GND_PINS]
        vcc_pins = [pingo.VccPin(self, location, voltage)
                    for location, voltage in self.VCC_PINS.items()]

        self._add_pins(gpio_pins + ground_pins + vcc_pins) 
開發者ID:pingo-io,項目名稱:pingo-py,代碼行數:29,代碼來源:bbb.py


注:本文中的Adafruit_BBIO.GPIO.LOW屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。