0.1.3 MCP23008 fix example

This commit is contained in:
rob tillaart 2023-03-16 12:02:41 +01:00
parent 50381c8f9e
commit 4ecc80feef
2 changed files with 5 additions and 3 deletions

View File

@ -55,7 +55,9 @@ Can be overruled with Wire0..WireN.
### Single pin interface
- **bool pinMode(uint8_t pin, uint8_t mode)** pin = 0..7, mode = INPUT, OUTPUT. Returns true if successful.
- **bool pinMode(uint8_t pin, uint8_t mode)** pin = 0..7, mode = INPUT, OUTPUT.
0xFF is all pins are input, 0x1F are 5 inputs and 3 outputs.
Returns true if successful.
- **bool digitalWrite(uint8_t pin, uint8_t value)** pin = 0..7, value = LOW(0) HIGH (!0). Returns true if successful.
- **uint8_t digitalRead(uint8_t pin)** pin = 0..7, returns LOW or HIGH, might set the lastError();
- **bool setPolarity(uint8_t pin, bool reversed)** pin = 0..7, set reversed flag. Returns true if successful.

View File

@ -20,7 +20,7 @@ void setup()
Wire.begin();
MCP.begin();
MCP.pinMode8(0x00);
MCP.pinMode8(0xFF);
Serial.println("TEST digitalRead(pin)");
for (int pin = 0; pin < 8; pin++)
@ -37,4 +37,4 @@ void loop()
}
// -- END OF FILE --
// -- END OF FILE --