-
Notifications
You must be signed in to change notification settings - Fork 381
Fix error with physical pull up resistors #380
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
Conversation
Get latest changes from Adafruit original repo
Get latest from upstream
Add virtualenvironments folders
|
hi why not just catch the exception in the DHT library and print out a warning there? we don't want to change the behavior of setting a pull_up - it should raise an exception if using libgpiod without pull up support? |
|
Hey @ladyada, I tried to catch the exception on DHT library but the pin does not get initialized even being setup as pull-up in the DHT library. The generic pin object does not have the option to pass an argument to tell it that it will be using physical resistor. Even passing such argument will need to add some similar conditional check againts this argument. |
|
you could catch the exception here? |
|
But then on lines https://github.com/adafruit/Adafruit_Blinka/blob/master/src/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py#L52-L63 you'll get the raise exception and it will not be initialized if "external pull-up" is passed, shouldn't it? I can also make it be Thank you very much for your quick reply BTW. Want me to make the changes on the DHT library then? |
|
where is the pin initialized with a pullup in DHT library, we only see it assigned on the line |
|
Hey @ladyada, You were totally right 👍🏽 my apologies for creating a not needed PR. I have file the PR on DHT library (adafruit/Adafruit_CircuitPython_DHT#56) Regards. P.D: Want me to close this one? |
Should close adafruit/Adafruit_CircuitPython_DHT#32 and also help on using other boards that RPI with external pull resistors.
If something else is needed just let me know and I'll be more than happy to help.