How to read GPIO in real time?

  • chen1234
  • chen1234's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
16 Aug 2022 10:13 #249873 by chen1234
How to read GPIO in real time? was created 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 or Create an account to join the conversation.

More
16 Aug 2022 13:50 #249889 by elovalvo
Replied by elovalvo on topic How to read GPIO in real time?
I think the best solution is to use the hal_pi_gpio module:

forum.linuxcnc.org/27-driver-boards/3770...r-raspberry-pi-gpios
The following user(s) said Thank You: chen1234

Please Log in or Create an account to join the conversation.

More
26 Aug 2022 14:15 #250512 by andypugh
Replied by andypugh on topic How to read GPIO in real time?
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.
The following user(s) said Thank You: chen1234

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum