- Posts: 58
- Thank you received: 0
How to read GPIO in real time?
4 years 2 months ago #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
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.
4 years 2 months ago #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
forum.linuxcnc.org/27-driver-boards/3770...r-raspberry-pi-gpios
Please Log in to join the conversation.
4 years 2 months ago #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.
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
