#!/usr/bin/env python3 import turris_gpio as gpio gpio.setmode(gpio.BCM) gpio.setup(33, gpio.OUT) gpio.setup(18, gpio.IN) gpio.output(33, 0) if not gpio.input(18): print("0 fine") else: print("0 failed") gpio.output(33, 1) if gpio.input(18): print("1 fine") else: print("1 failed") gpio.cleanup()