Dec-30-2020, 08:11 PM
Hi.
Im new to python and electronics. Im trying to use interrupt on a NEotrellis Board. It did worked with Arduino (with the sample code from Adafruit), but I need it to work on raspberry pi and Adafruits sample code doesnt include it ( it says it does work with python)
SO, Im trying this.
Im new to python and electronics. Im trying to use interrupt on a NEotrellis Board. It did worked with Arduino (with the sample code from Adafruit), but I need it to work on raspberry pi and Adafruits sample code doesnt include it ( it says it does work with python)
SO, Im trying this.
import RPi.GPIO as GPIO BUTTON_GPIO = 16 if __name__ == '__main__': GPIO.setmode(GPIO.BCM) GPIO.setup(BUTTON_GPIO, GPIO.IN, pull_up_down=GPIO.PUD_UP) while True: GPIO.wait_for_edge(BUTTON_GPIO, GPIO.FALLING) print("Button pressed!")But cant make it work. Does anyone know if it could work?