unable to get gpio to work on Raspberry Pi 5 using latest image

More
1 year 5 months ago #327701 by Grad
Well, that thread helped me before but i somehow did not notice the "Basic Mill Config Using hal_gpio" ...would have saved me a lot of time... anyways - works fine now - Thank you!

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

More
1 year 5 months ago #328770 by mikereid0817
Hi Andy... I am muddling my way through this and have things working really well, except inputs. Gpio reads gpio13 fine in python, hal_gpio always shows high in hal scope, meter etc. Any ideas? Is there a way to set gpio characteristics with hal?

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

More
1 year 5 months ago #328773 by unknown
If you want help, you will have to upload your hal & ini files, otherwise no one knows exactly what you are doing.

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

More
1 year 5 months ago #328796 by andypugh

Hi Andy... I am muddling my way through this and have things working really well, except inputs. Gpio reads gpio13 fine in python, hal_gpio always shows high in hal scope, meter etc. Any ideas? Is there a way to set gpio characteristics with hal?
 
You can try setting the various modifiers for GPIO13 and see if that helps.
opendrain
opensource
biasdisable
pulldown
pullup
As described in  linuxcnc.org/docs/devel/html/drivers/hal_gpio.html#_usage

I am not clear if you are saying that it is always set and the input can not be changed, even if pulled low?

Have you checked with gpioinfo that nothing is claiming the pin?
 

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

More
1 year 5 months ago #328878 by mikereid0817
Thanks, Andy, you steered me in the right direction.

GPIO13 would not work at all, continuing to research that.

GPIO25, once pullup=GPIO25 was added, works.

I only have 1 limit switch setup, so I'm fully functional with the official image, Byte2Bot board, and my old Probotix motor driver setup.  Attached are the .hal and .ini files that worked, and my config.txt

 

File Attachment:

File Name: cncrouter.hal
File Size:3.33 KB

File Attachment:

File Name: cncrouter.ini
File Size:3.06 KB

File Attachment:

File Name: config.txt
File Size:2.79 KB

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

Time to create page: 0.079 seconds
Powered by Kunena Forum