How to read GPIO in real time?

More
4 years 2 months ago #249873 by chen1234
Guys, I'm using a raspberry pi as a controller,
and this controller needs to read a lot of GPIO (not including home and limits).

I'm trying to poll read GPIO using threads in my custom Glade UI.
But I found that this read is not timely and will be a little later than my signal.

How should I get these GPIOs, so that this IO can be read interrupted?
(I'm a newbie and don't know much about the underlying stuff)
Hope you can give me some advice?

thanks,chen

Please Log in to join the conversation.

More
4 years 2 months ago #249889 by elovalvo
I think the best solution is to use the hal_pi_gpio module:

forum.linuxcnc.org/27-driver-boards/3770...r-raspberry-pi-gpios

Please Log in to join the conversation.

More
4 years 2 months ago #250512 by andypugh
Your GUI will never be able to respond to GPIO inputs in real=time as the GUIs are not realtime.

You should leave home and limits to be handled by the normal realtime motion module.

Please Log in to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum