本文整理汇总了Python中GPIO.output方法的典型用法代码示例。如果您正苦于以下问题:Python GPIO.output方法的具体用法?Python GPIO.output怎么用?Python GPIO.output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GPIO
的用法示例。
在下文中一共展示了GPIO.output方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: lcd_toggle_enable
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def lcd_toggle_enable():
# Toggle enable
time.sleep(E_DELAY)
GPIO.output(LCD_E, True)
time.sleep(E_PULSE)
GPIO.output(LCD_E, False)
time.sleep(E_DELAY)
示例2: hvgv_off
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def hvgv_off(self): # Close High Vacuum Gate Valve
GPIO.output(self.hvgv_pin, 0)
print "hvgv closed"
示例3: lcd_byte
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def lcd_byte(bits, mode):
# Send byte to data pins
# bits = data
# mode = True for character
# False for command
GPIO.output(LCD_RS, mode) # RS
# High bits
GPIO.output(LCD_D4, False)
GPIO.output(LCD_D5, False)
GPIO.output(LCD_D6, False)
GPIO.output(LCD_D7, False)
if bits & 0x10 == 0x10:
GPIO.output(LCD_D4, True)
if bits & 0x20 == 0x20:
GPIO.output(LCD_D5, True)
if bits & 0x40 == 0x40:
GPIO.output(LCD_D6, True)
if bits & 0x80 == 0x80:
GPIO.output(LCD_D7, True)
# Toggle 'Enable' pin
lcd_toggle_enable()
# Low bits
GPIO.output(LCD_D4, False)
GPIO.output(LCD_D5, False)
GPIO.output(LCD_D6, False)
GPIO.output(LCD_D7, False)
if bits & 0x01 == 0x01:
GPIO.output(LCD_D4, True)
if bits & 0x02 == 0x02:
GPIO.output(LCD_D5, True)
if bits & 0x04 == 0x04:
GPIO.output(LCD_D6, True)
if bits & 0x08 == 0x08:
GPIO.output(LCD_D7, True)
# Toggle 'Enable' pin
lcd_toggle_enable()
示例4: tmp_off
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def tmp_off(self): # Switch OFF Turbo Molecular Pump
GPIO.output(self.tmp_pin, 0)
print "tmp off"
示例5: hvgv_on
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def hvgv_on(self): # Open High Vacuum Gate Valve
GPIO.output(self.hvgv_pin, 1)
print "hvgv open"
示例6: tmp_on
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def tmp_on(self): # Switch ON Turbo Molecular Pump
GPIO.output(self.tmp_pin, 1)
print "tmp on"
示例7: pp_off
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def pp_off(self): # Switch OFF Primary Pump
GPIO.output(self.pp_pin, 0)
print "pp off"
示例8: pp_on
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def pp_on(self): # Switch ON Primary Pump
GPIO.output(self.pp_pin, 1)
print "pp on"
示例9: vv_off
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def vv_off(self): # Close Venting Valve
GPIO.output(self.vv_pin, 0)
print "vv closed"
示例10: vv_on
# 需要导入模块: import GPIO [as 别名]
# 或者: from GPIO import output [as 别名]
def vv_on(self): # Open Venting Valve
GPIO.output(self.vv_pin, 1)
print "vv open"