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

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)
Clean up by resetting all GPIO channels that have been used by this program to INPUT with no pullup/pulldown and no event detection

src/p/y/python-emotiv-HEAD/examples/bbb-bci-ssvepd.py   python-emotiv(Download)
    for led in LEDS:
        GPIO.output(led[PIN], 0)
    GPIO.cleanup()
 
def sigusr1_handler(signum, stack):

src/p/i/pingo-HEAD/experiments/beagle/python/blink.py   pingo(Download)
def sair():
    print 'encerrando...'
    GPIO.cleanup()
 
atexit.register(sair)

src/a/d/Adafruit_BBIO-0.0.19/test/test_gpio_output.py   Adafruit_BBIO(Download)
def teardown_module(module):
    GPIO.cleanup()
 
class TestGPIOOutput:
    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()
        value = open('/sys/class/gpio/gpio68/value').read()
        assert not int(value)
        GPIO.cleanup()
 
    def test_direction_readback(self):
        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)
            GPIO.cleanup() 

src/a/d/Adafruit_BBIO-0.0.19/test/test_gpio_setup.py   Adafruit_BBIO(Download)
def teardown_module(module):
    GPIO.cleanup()
 
class TestSetup:
    def test_setup_output_key(self):
        GPIO.setup("P8_10", GPIO.OUT)
        assert os.path.exists('/sys/class/gpio/gpio68')
        direction = open('/sys/class/gpio/gpio68/direction').read()
        assert direction == 'out\n'        
        GPIO.cleanup()
        direction = open('/sys/class/gpio/gpio68/direction').read()
        assert direction == 'out\n'        
        GPIO.cleanup()        
 
    def test_setup_input_key(self):
        GPIO.setup("P8_10", GPIO.IN)
        assert os.path.exists('/sys/class/gpio/gpio68')
        direction = open('/sys/class/gpio/gpio68/direction').read()
        assert direction == 'in\n'        
        GPIO.cleanup()
        direction = open('/sys/class/gpio/gpio68/direction').read()
        assert direction == 'in\n'        
        GPIO.cleanup()        
 
    def test_setup_input_pull_up(self):

src/a/d/Adafruit_BBIO-0.0.19/test/test_gpio_input.py   Adafruit_BBIO(Download)
def teardown_module(module):
    GPIO.cleanup()
 
class TestGPIOInput:
    def test_input(self):
        value = open('/sys/class/gpio/gpio68/value').read()
        assert int(value) == input_value
        GPIO.cleanup()
 
    def test_direction_readback(self):