Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure internal Pull UP/Down Resistor #31

Open
TBobsin opened this issue Jun 17, 2020 · 7 comments
Open

Configure internal Pull UP/Down Resistor #31

TBobsin opened this issue Jun 17, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@TBobsin
Copy link

TBobsin commented Jun 17, 2020

Hello,
i found no comment about the internal resistors and how they are set with rpi.2

It shoult be possible to configure the Resistor to Pull up or down when i set an GPIO as Input

Please Dokument how the resistor ist set in the actual Version.

@volkerverkamp
Copy link

I have the same question/request - are there any news on this?

@raintonr
Copy link
Collaborator

raintonr commented Dec 4, 2020

I am preparing a pull request for #30 that will add this feature.

@raintonr
Copy link
Collaborator

raintonr commented Dec 7, 2020

This was merged with #48 and can be closed.

@raintonr raintonr self-assigned this Feb 11, 2023
@raintonr
Copy link
Collaborator

Ah... in fact I am going to re-open this because although rpi_gpio_buttons has a usePullUp option this doesn't actually control pull up/down hardware configuration.

To correctly implement this would need a change in the underlying rpi-gpio package as per JamesBarwell/rpi-gpio.js#71

@raintonr raintonr reopened this Feb 11, 2023
@mcm1957 mcm1957 added the enhancement New feature or request label May 1, 2023
@DrThriller
Copy link

DrThriller commented May 17, 2023

Normally the GPIOs inputs are pulled to low, accept when I set them all to high in the settings, right?
Or are the inputs normally undefined?

@raintonr
Copy link
Collaborator

Sadly all this setting does is logically NOT the input. It doesn't actually configure the hardware.

I have actually given up on this adapter as it's just as easy to write your own script and run inside Javascript adapter. Eg. install rpio module in Javascript adapter settings and do something like...

const rpio = require('rpio');

// Use GPIO numbers *NOT* pin numbers
rpio.init({ mapping: 'gpio' });

// Configure hardware GPIO internal pull up
rpio.open(23, rpio.INPUT, rpio.PULL_UP);

// Start polling
rpio.poll(23, () => { /* Called when GPIO23 changes */ });

FYI, pigpio also works well here.

@Garfonso
Copy link

Yes, this is still missing. Currently (since libgpiod is mandatory on newer raspian versions) this is blocked by an issue on the library we use:
ExplorationSystems/opengpio#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants