-
Notifications
You must be signed in to change notification settings - Fork 36
Making the initialization of MCP23017 class optional? #23
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
Comments
Maybe try something like what's discussed here: |
I'd suggest we add a |
@tannewt Ok, I'll take a look at doing that |
hi @postal Can you share the code you're using? I'd like to be able to test this with that exact code so I can be sure what you're trying to do will work. |
hi @dherrada, this is the script which is executed by cronjob after a restarting the Pi, to setup the mcp23017. `#!/bin/bash echo "setup all gpio on bank B to input (0xff)" echo "setup pullup resistors on bank B (0xff)" All these settings are reset when the library is initialized. |
@postal Great. Thanks. I'll load this on my pi and try to add the reset keyword |
@dherrada Hey, I am having the same problem. Did you find any solution yet? :) |
@JuliaHorvath Hey. I don't think I ever ended up getting to it. Is there a way to set those settings after the library has been initialized? If there is, that would probably be a pretty simple workaround. @tannewt Is this still something you think I should do? If so, I can add to my list |
@dherrada Yup! We should still do it. We actually have sleep support now so this will be even more useful. |
@JuliaHorvath @postal can ya try the PR ? |
@JuliaHorvath @postal Let me know if you tried the PR. I think we are good to close this issue. Thanks. |
yes, it is working now! Thanks! |
@JuliaHorvath Thanks :) |
Adafruit_CircuitPython_MCP230xx/adafruit_mcp230xx/mcp23017.py
Line 65 in 31b5825
I have connected an MCP23017 to my Raspberry Pi. During reboot the MCP23017 is used to configure the inputs, outputs and pullup resistors. If I use the library afterwards, the configuration is reset when the class is initialized.
Is there a way to bypass the initialization?
The text was updated successfully, but these errors were encountered: