Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(33)  |  Call(33)  |  Derive(0)  |  Import(0)
Output to a GPIO channel
gpio  - gpio channel
value - 0/1 or False/True or LOW/HIGH

src/p/y/python-emotiv-HEAD/examples/bbb-bci-ssvepd.py   python-emotiv(Download)
        pass
    for led in LEDS:
        GPIO.output(led[PIN], 0)
    GPIO.cleanup()
 
    for led in LEDS:
        led[VALUE] = 0
        GPIO.output(led[PIN], led[VALUE])
 
    # If stimulation is turned off, block until another SIGUSR1
    for led in LEDS:
        GPIO.setup(led[PIN], GPIO.OUT)
        GPIO.output(led[PIN], led[VALUE])
        led[HZ] = float(freqs.pop(0))
        led[PERIOD] = 1 / (led[HZ] * 2.0)
                if (time.time() - led[TIMER]) >= led[PERIOD]:
                    # Toggle led
                    GPIO.output(led[PIN], led[VALUE] ^ 1)
                    led[TIMER] = time.time()
                    led[VALUE] ^= 1

src/o/s/OSPi-HEAD/gpio_pins.py   OSPi(Download)
def enableShiftRegisterOutput():
    """Enable output from shift register."""
    try:
        GPIO.output(pin_sr_noe, GPIO.LOW)
    except NameError:
def disableShiftRegisterOutput():
    """Disable output from shift register."""
    try:
        GPIO.output(pin_sr_noe, GPIO.HIGH)
    except NameError:
def setShiftRegister(srvals):
    """Set the state of each output pin on the shift register from the srvals list."""
    try:
        GPIO.output(pin_sr_clk, GPIO.LOW)
        GPIO.output(pin_sr_lat, GPIO.LOW)
        for s in range(gv.sd['nst']):
            GPIO.output(pin_sr_clk, GPIO.LOW)

src/m/a/matrix_keypad-1.2.2/matrix_keypad/BBb_GPIO.py   matrix_keypad(Download)
        for j in range(len(self.COLUMN)):
            GPIO.setup(self.COLUMN[j], GPIO.OUT)
            GPIO.output(self.COLUMN[j], GPIO.LOW)
 
        # Set all rows as input
        # Switch the i-th row found from scan to output
        GPIO.setup(self.ROW[rowVal], GPIO.OUT)
        GPIO.output(self.ROW[rowVal], GPIO.HIGH)
 
        # Scan columns for still-pushed key/button

src/p/i/pingo-HEAD/experiments/beagle/python/blink.py   pingo(Download)
 
while True:
    GPIO.output("P9_16", GPIO.HIGH)
    sleep(1)
    GPIO.output("P9_16", GPIO.LOW)

src/p/y/pynrf24-HEAD/nrf24.py   pynrf24(Download)
    def ce(self, level):
        if level == NRF24.HIGH:
            GPIO.output(self.ce_pin, GPIO.HIGH)
        else:
            GPIO.output(self.ce_pin, GPIO.LOW)

src/p/i/pingo-HEAD/experiments/beagle/python/blink_pot.py   pingo(Download)
 
while True:
    GPIO.output("P9_16", GPIO.HIGH)
    sleep(1)
    GPIO.output("P9_16", GPIO.LOW)

src/p/i/pingo-HEAD/experiments/beagle/python/anima.py   pingo(Download)
while True:
    for pino in pinos:
        GPIO.output("P9_" + str(pino), GPIO.HIGH)
        tempo = ADC.read('P9_39')
        print tempo
        sleep(tempo)
        GPIO.output("P9_" + str(pino), GPIO.LOW)

src/p/i/pingo-HEAD/experiments/beagle/anima.py   pingo(Download)
while True:
    for pino in pinos:
        GPIO.output("P9_" + str(pino), GPIO.HIGH)
        tempo = ADC.read('P9_39')
        print tempo
        sleep(tempo)
        GPIO.output("P9_" + str(pino), GPIO.LOW)

src/s/m/smokematic-0.1.0/smokematic/baster.py   smokematic(Download)
 
        GPIO.setup(self._baster_pin, GPIO.OUT)
        GPIO.output(self._baster_pin, GPIO.LOW)
 
    def config(self, frequency, duration):
            self._baste_off_handle = None
 
        GPIO.output(self._baster_pin, GPIO.HIGH)
        self._baste_off_handle = ioloop.add_timeout(
            datetime.timedelta(seconds=self._duration),
    def _baste_off(self):
        """
        Turns off the basting
        """
        GPIO.output(self._baster_pin, GPIO.LOW)

src/a/d/Adafruit_BBIO-0.0.19/test/test_gpio_output.py   Adafruit_BBIO(Download)
    def test_output_high(self):
        GPIO.setup("P8_10", GPIO.OUT)
        GPIO.output("P8_10", GPIO.HIGH)
        value = open('/sys/class/gpio/gpio68/value').read()
        assert int(value)
        GPIO.cleanup()
 
    def test_output_low(self):
        GPIO.setup("P8_10", GPIO.OUT)
        GPIO.output("P8_10", GPIO.LOW)
    def test_output_greater_than_one(self):
        GPIO.setup("P8_10", GPIO.OUT)
        GPIO.output("P8_10", 2)
        value = open('/sys/class/gpio/gpio68/value').read()
        assert int(value)
        GPIO.cleanup()
 
    def test_output_of_pin_not_setup(self):
        with pytest.raises(RuntimeError):
            GPIO.output("P8_11", GPIO.LOW)
    def test_output_setup_as_input(self):
        GPIO.setup("P8_10", GPIO.IN)
        with pytest.raises(RuntimeError):
            GPIO.output("P8_10", GPIO.LOW)
            GPIO.cleanup()