当前位置: 首页>>代码示例>>Python>>正文


Python GPIO.HIGH属性代码示例

本文整理汇总了Python中Adafruit_BBIO.GPIO.HIGH属性的典型用法代码示例。如果您正苦于以下问题:Python GPIO.HIGH属性的具体用法?Python GPIO.HIGH怎么用?Python GPIO.HIGH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在Adafruit_BBIO.GPIO的用法示例。


在下文中一共展示了GPIO.HIGH属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: high

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [as 别名]
def high(self):
        GPIO.output(self.port, GPIO.HIGH) 
开发者ID:daq-tools,项目名称:kotori,代码行数:4,代码来源:gpio.py

示例2: output

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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

示例3: input

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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

示例4: set_high

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [as 别名]
def set_high(self, pin):
        """Set the specified pin HIGH."""
        self.output(pin, HIGH) 
开发者ID:adafruit,项目名称:Adafruit_Python_GPIO,代码行数:5,代码来源:GPIO.py

示例5: output_pins

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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

示例6: input_pins

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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.
        """
        # General implementation that can be optimized by derived classes.
        return [self.input(pin) for pin in pins] 
开发者ID:adafruit,项目名称:Adafruit_Python_GPIO,代码行数:8,代码来源:GPIO.py

示例7: set_disabled

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [as 别名]
def set_disabled(self):
    GPIO.output(self.pin, GPIO.HIGH) 
开发者ID:intelligent-agent,项目名称:redeem,代码行数:4,代码来源:Enable.py

示例8: forward

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [as 别名]
def forward(self, rpm):
        GPIO.output(self.directionPin, GPIO.HIGH)
        self.setSpeed(rpm) 
开发者ID:ericboehlke,项目名称:BB-8,代码行数:5,代码来源:StepperMotor.py

示例9: ledBlink

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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

示例10: __init__

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [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

示例11: _get_pin_state

# 需要导入模块: from Adafruit_BBIO import GPIO [as 别名]
# 或者: from Adafruit_BBIO.GPIO import HIGH [as 别名]
def _get_pin_state(self, pin):
        return pingo.HIGH if GPIO.input(pin.location) else pingo.LOW 
开发者ID:pingo-io,项目名称:pingo-py,代码行数:4,代码来源:bbb.py


注:本文中的Adafruit_BBIO.GPIO.HIGH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。