Micropython to hanlde hardware interrupts for gpio

I’m looking to implement interrupt driven code for a button connected via the gipo pins. Is it possible to handle hardware interrupts for gpio in micropython or is it only possible to wake from sleep off of gpio? I haven’t seen any examples that show how to use micropython to write interrupt service routines that are triggered from edge triggers on gpio.

I see you going through something similar to what I went through. I’m an electrical engineer and as my project became more complex I came across the information that Xbee 3.0 in micropython mode did not support the 1-wire library, asynchronous library and hardware interrupts (irq). There are other ways to overcome the absence of these characteristics.

Hi! did you get any resolution on this? I have the exact same issue haha

Answering your inquiry. I posted this image below because I thought it was relevant to your question. I believe this topic helped me to persist on my learning path.

https://forums.digi.com/t/finding-libraries-to-control-neopixel-programmable-led-strips/27417/12
@miadrew

About “use an Intermediary Microcontroller:”
I’m working on this kind of solution for my own.
In the first version of PCB design I used UART protocol and experienced unsatisfactory results. The image below show my second version of PCB layout . This time the approach is 100% SPI protocol, I will soon validate the level of reliability in my project. :thinking: My goal is handle gpio interrupts in microython.

If you want more information, just contact me privately.

2024-01-10T23:37:00Z
timezone: UTC-03:00

@Reacquire5985 Yes, Digi does have sample Micro Python code that will allow you to push a button and trigger some code to perform a function. I would suggest looking at the Sample apps in the PyCharm plugin.

Thanks! and yes, I also opted to use an external microcontroller to implement the interrupts I required. Very strange that Xbee doesn’t have these basic features.

nice, this is good articel