Hardware Interrupt Micropython Xbee3

Hi all,

I have a program that requires an external interrupt to trigger an immediate action. I have used irq interrupts in the past with python, but it looks like this is not supported in micropython on Xbee. Are there any alternatives to have a gpio interrupt in my program?

Thanks in advance!

1 Like

I would suggest looking at Digi MicroPython Programming Guide

https://www.digi.com/resources/documentation/digidocs/90002219/#tasks/t_run_stored_code.htm?Highlight=interrupt

Thank you for the response, but I am not sure I understand. The board is already running a micropython program at startup. I wanted to implement an interrupt to that running program.

The links I provided are links to functions you can include into your application that should allow you to perform the functions you are looking for.

Maybe you sent me a wrong link? What I see is a page about running code at startup or interrupting using a keyboard. This is not an interrupt.

Hi,

If there is no IRQ pins to control, maybe see this. But i don’t know how program it in MycroPython…

Digital I/O change detection

1 Like

If I understand what you want, you would have the read of the pin in a loop.

Yea I figured there was no IRQ. I implemented a rising edge detector but it would not react while the system is on time.sleep() . I’ll find ways around it. Thanks !

Thanks again. It seems like this topic is beyond your scope. I was looking at interrupts as defined here Interrupts - GeeksforGeeks. I saw that there are no IRQ pins on Xbees so I will find a way around it.

Micropython to hanlde hardware interrupts for gpio
Micropython to hanlde hardware interrupts for gpio - #5 by mvut

I would like to give you @pedroc an update on the current status of my project. The main objective of this application is to overcome the lack of features like IRQ and async. The image below shows the circuit working using the SPI protocol. All pre-elimination tests were positive. However, the final test that really matters will be in the industrial field. I’ll be back soon with more information. :gear: :satellite:


2024-01-26T02:08:00Z
Timezone: UTC-03:00

1 Like