Open TBobsin opened 4 years ago
I have the same question/request - are there any news on this?
I am preparing a pull request for #30 that will add this feature.
This was merged with #48 and can be closed.
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 https://github.com/JamesBarwell/rpi-gpio.js/issues/71
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?
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.
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: https://github.com/ExplorationSystems/opengpio/issues/1
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.