How to use the anyio.GPIO.output function in anyio

To help you get started, we’ve selected a few anyio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github whaleygeek / anyio / testHardware.py View on Github external
index = 0
      
    elif last:
      index = len(LED_GPIO)-1
      
    elif left:
      if index > 0:
        index -= 1
      
    elif right:
      if index < len(LED_GPIO)-1:
        index += 1

        
    # FLASH PRESENTLY SELECTED LED
    GPIO.output(LED_GPIO[index], True)
    time.sleep(FLASH_TIME/2)
    GPIO.output(LED_GPIO[index], False)
    time.sleep(FLASH_TIME/2)
github whaleygeek / anyio / testHardware.py View on Github external
elif last:
      index = len(LED_GPIO)-1
      
    elif left:
      if index > 0:
        index -= 1
      
    elif right:
      if index < len(LED_GPIO)-1:
        index += 1

        
    # FLASH PRESENTLY SELECTED LED
    GPIO.output(LED_GPIO[index], True)
    time.sleep(FLASH_TIME/2)
    GPIO.output(LED_GPIO[index], False)
    time.sleep(FLASH_TIME/2)
github whaleygeek / anyio / testHardware.py View on Github external
def setup():
  GPIO.setmode(GPIO.BCM)
  for l in LED_GPIO:
    GPIO.setup(l, GPIO.OUT)
    GPIO.output(l, False)

  for b in BUTTON_GPIO:
    GPIO.setup(b, GPIO.IN)