diff --git a/Examples/pca9554.ino b/examples/Blink/Blink.ino similarity index 94% rename from Examples/pca9554.ino rename to examples/Blink/Blink.ino index 3a73995..a269f3c 100644 --- a/Examples/pca9554.ino +++ b/examples/Blink/Blink.ino @@ -31,8 +31,8 @@ void setup() ioCon1.portMode(ALLOUTPUT); //Set the port as all output // Can also set pins individually using - // ioCon1.pinmode(pin number, Input/Output); - // IE: ioCon1.pinmode(1, INPUT); + // ioCon1.pinMode(pin number, Input/Output); + // IE: ioCon1.pinMode(1, INPUT); } @@ -161,4 +161,10 @@ void loop() ioCon1.digitalWritePort(~(1 << i)); delay(75); } + + // You can also read pins (if you set it's mode to INPUT in setup) + // byte x = 2; // read pin 2 + // ioCon1.digitalRead(x); + // Serial.print("pin 2 value is "); + // Serial.println(x); } diff --git a/library.properties b/library.properties new file mode 100644 index 0000000..bb0c76d --- /dev/null +++ b/library.properties @@ -0,0 +1,11 @@ +name=PCA9554 +version=0.0.1 +author=AD0ND +maintainer=AD0ND +sentence=PCA9554 8 bit I2C port expander arduino/esp library. +paragraph= +category=Communication +url=https://github.com/AD0ND/PCA9554 +architectures=* +includes=PCA9554.h + diff --git a/PCA9554.cpp b/src/PCA9554.cpp similarity index 100% rename from PCA9554.cpp rename to src/PCA9554.cpp diff --git a/PCA9554.h b/src/PCA9554.h similarity index 100% rename from PCA9554.h rename to src/PCA9554.h