Python Forum
Adafruits Neotrellis interrupt with RAsp and Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adafruits Neotrellis interrupt with RAsp and Python
#1
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.

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?
Reply


Messages In This Thread
Adafruits Neotrellis interrupt with RAsp and Python - by Moris526 - Dec-30-2020, 08:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  add interrupt for next task kucingkembar 0 769 Oct-07-2022, 12:15 PM
Last Post: kucingkembar
  Determine if keyboard interrupt versus SIGINT trapped? Jibunnokage 5 1,775 Sep-30-2022, 06:54 AM
Last Post: Gribouillis
  Enabling interrupt on Adafruits button/led board Moris526 0 2,016 Apr-30-2021, 03:29 PM
Last Post: Moris526
  python delay without interrupt the whole code Nick_tkinter 4 5,134 Feb-22-2021, 10:51 PM
Last Post: nilamo
  Interrupt for Adafruits Neotrellis button/led board Moris526 0 1,795 Dec-28-2020, 05:42 AM
Last Post: Moris526
  input interrupt Nickd12 1 4,245 Dec-09-2020, 05:01 PM
Last Post: Gribouillis
  python ibeacon rasp pi localization joefreedy 13 6,195 Feb-12-2019, 08:52 PM
Last Post: joefreedy
  Rasp Pi: "lp: not allowed to print" when using a python script montypython76 1 3,245 Jun-13-2017, 09:10 AM
Last Post: DeaD_EyE
  Interrupt/Break Function sdprelude 2 6,034 Feb-17-2017, 12:19 AM
Last Post: Ofnuts
  interrupt serial port trainee1 9 18,879 Feb-15-2017, 08:19 AM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020