sumnerboy12 / mqtt-gpio-monitor

Python script for sending/receiving commands to/from GPIO pins via MQTT messages
46 stars 23 forks source link

Set pull-up or pull-down resistor in config #14

Closed Rtaxerxes closed 7 years ago

Rtaxerxes commented 8 years ago

I'm not a programmer, but I've looked through the code and can't see a way to set the pull up resistors. I see in line 272: GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP), but I don't see a way to set it.

I've done it manually on the command line by running 'gpio -g mode 17 up'.

sumnerboy12 commented 8 years ago

You are correct, there is no way to set this via configuration. I would welcome a pull request to add this if you are interested.

Rtaxerxes commented 8 years ago

I can try...

filcole commented 7 years ago

I've made this change in my branch. I can submit a pull request if wanted. https://github.com/filcole/mqtt-gpio-monitor. There's quite a few other tweaks in there too.

sumnerboy12 commented 7 years ago

Yes please.

On 23/04/2017 1:52 AM, Phil Cole wrote:

I've made this change in my branch. I can submit a pull request if wanted. https://github.com/filcole/mqtt-gpio-monitor. There's quite a few other tweaks in there too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sumnerboy12/mqtt-gpio-monitor/issues/14#issuecomment-296374713, or mute the thread https://github.com/notifications/unsubscribe-auth/AE046vNv2BHW4IOsaBA4DA0LSOFW54Vwks5rygYOgaJpZM4KZ6Xh.

sumnerboy12 commented 7 years ago

Resolved via https://github.com/sumnerboy12/mqtt-gpio-monitor/pull/15.