RaspberryPi 4 GPIO - Use internal Pull-Up/Down Resistors
- Maschde
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
29 Dec 2022 22:38 #260514
by Maschde
RaspberryPi 4 GPIO - Use internal Pull-Up/Down Resistors was created by Maschde
Hi everyone,
i am currently using a RaspberryPi 4 for my DIY 3-axis CNC mill.
At connecting my sensors to the GPIOs i noticed that some inputs are per default high, others low.
I can't find a function anywhere in hal_pi_gpio.c that sets the internal resistors.
In the included "bcm2835.h" a function declaired but it seems that this is not used.
Is it possible to set the resistors in hal_pi_gpio.c?
I know that GPIO 2 and 3 are exceptions because of the permanently installed resistiors.
Thank you guys
i am currently using a RaspberryPi 4 for my DIY 3-axis CNC mill.
At connecting my sensors to the GPIOs i noticed that some inputs are per default high, others low.
I can't find a function anywhere in hal_pi_gpio.c that sets the internal resistors.
In the included "bcm2835.h" a function declaired but it seems that this is not used.
Is it possible to set the resistors in hal_pi_gpio.c?
I know that GPIO 2 and 3 are exceptions because of the permanently installed resistiors.
Thank you guys
Please Log in or Create an account to join the conversation.
- elovalvo
- Offline
- Elite Member
Less
More
- Posts: 202
- Thank you received: 125
30 Dec 2022 07:28 #260539
by elovalvo
Replied by elovalvo on topic RaspberryPi 4 GPIO - Use internal Pull-Up/Down Resistors
Unfortunately it is not possible, at the moment, to set the resistors directly from hal_pi_gpio.
The solution I use
forum.linuxcnc.org/9-installing-linuxcnc...ware-stepping#260086
is to use a command file (initgpio.txt), based on the raspi-gpio command
github.com/RPi-Distro/raspi-gpio
to run before launching LinuxCNC
The solution I use
forum.linuxcnc.org/9-installing-linuxcnc...ware-stepping#260086
is to use a command file (initgpio.txt), based on the raspi-gpio command
github.com/RPi-Distro/raspi-gpio
to run before launching LinuxCNC
Please Log in or Create an account to join the conversation.
- Maschde
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
31 Dec 2022 07:52 #260624
by Maschde
Replied by Maschde on topic RaspberryPi 4 GPIO - Use internal Pull-Up/Down Resistors
Thank you very much, i will try it.
I think i get it working.
I think i get it working.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds