Closed alanchrt closed 11 years ago
Thanks Alan. The issue was that when the DigitalTrigger
initializes it call pinMode()
on the trigger pin, but I had forgotten to allow for configuring pullup/pulldown resistors. Just fixed it and pushed the changes. Update PyBBIO then just add the pull arg where you're creating the DigitalTriggers like this:
DigitalTrigger(ARM_PIN, LOW, self.arm_button, 300, pull=1)
This means you can also leave out the calls to pinMode()
for those pins.
Awesome, this is perfect!
I'm having some difficulty getting the pullup resistor functionality to work on a security system I'm building for my home.
Here's the code:
Even thought I have
pull=1
for thepinMode
, I still always getLOW
values for the state of the pins. I can substitute any of the other pins forARM_PIN
in the loop with the same result.I'm using an Ubuntu image (http://elinux.org/BeagleBoardUbuntu#Precise_12.04_armhf) and have successfully used the pullup resistors on this bone before with bonescript on Angstrom.
Any idea what could be preventing the pullup resistors from activating?