diff options
Diffstat (limited to 'MCP23017/with_lib/with_lib.ino')
| -rw-r--r-- | MCP23017/with_lib/with_lib.ino | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/MCP23017/with_lib/with_lib.ino b/MCP23017/with_lib/with_lib.ino deleted file mode 100644 index 98d36b8..0000000 --- a/MCP23017/with_lib/with_lib.ino +++ /dev/null @@ -1,26 +0,0 @@ -/** Inputs.ino - * Sets port 7 on bank B to INPUT_PULLUP and copies its - * state to the built-in LED on the board - * https://github.com/ndomx/MCP23017-Arduino-Library - */ - -#include <mcp23017.h> - -#define MCP_ADDR (0) - -MCP23017 mcp(MCP_ADDR); - -void setup(void){ - Serial.begin(9600); - pinMode(LED_BUILTIN, OUTPUT); - - mcp.start(); - mcp.pinMode(GPB7, INPUT_PULLUP); -} - -void loop(void){ - byte mcp_input = mcp.digitalRead(GPB7); - digitalWrite(LED_BUILTIN, mcp_input); - Serial.println(mcp_input); - delay(500); -} |
