Comments (7)
The reset function is only used by the Init function to ensure that the MCP23017 starts with a defined status. Otherwise, if you reset the ESP32, you might not reset the MCP23017. And then it could still "remember" its status before the ESP32 was reset and cause problems. And of course you need the reset pin if you want to use the reset function.
from mcp23017_we.
But powering down the ESP32 and MCP23017 will reset the MCP23017 right? Unlike the ESP32 reset button?
from mcp23017_we.
Yes that's right.
from mcp23017_we.
thanks!
from mcp23017_we.
oh closed, too soon. For now I modified the library to not change the pinMode
for the reset pin (e.g. when i pass in -1) but it would be nice to make the reset pin officially optional. So maybe the default should be -1 which indicates it's optional. I wouldn't change the examples, only add a note there saying it's optional.
I commented this out for now:
void MCP23017::Init(){
//pinMode(resetPin, OUTPUT);
//reset();
ioConA = B00000000;
// etc..
from mcp23017_we.
Please try. You can use now:
MCP23017 myMCP(MCP_ADDRESS)
or
MCP23017 myMCP(MCP_ADDRESS, pinNumber)
All instructions in Init should ensure that the status of the MCP23017 is defined, even if not reset.
from mcp23017_we.
awesome, thanks!
from mcp23017_we.
Related Issues (17)
- 4 Rotary encoders HOT 11
- How to use an AC solid state relay to also switch DC? HOT 7
- Support for MCP23S17 HOT 12
- add LICENSE HOT 1
- setPinMode vs setPortMode -> INPUT_PULLUP HOT 2
- Make MCP23s17 reset pin optional HOT 3
- Using multiple MCP23S17 devices does not work HOT 10
- v1.6.1 breaks something HOT 3
- license type not mentioned in headers
- random pins are driven HOT 3
- Multiple MCP23017 outputs don't always work HOT 4
- Compile warnings HOT 2
- How to change I2C address HOT 4
- Invert pin state HOT 5
- GPA7 and GPB7 not work as input HOT 7
- Works for Arduino? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcp23017_we.