diff options
| author | Abel Tim <abel@main.home> | 2024-06-05 20:47:02 +0200 |
|---|---|---|
| committer | Abel Tim <abel@main.home> | 2024-06-05 20:47:02 +0200 |
| commit | beb0c97c58d9246e7a7312cfccb940c5be32b3f1 (patch) | |
| tree | 4b839d1dcd065cee3a106e7c65f7e5190bd58448 | |
| parent | fb9cb6c32e04434fd689aea99143d96aa2811656 (diff) | |
| download | robotica-beb0c97c58d9246e7a7312cfccb940c5be32b3f1.tar.gz robotica-beb0c97c58d9246e7a7312cfccb940c5be32b3f1.zip | |
add mcu
| -rw-r--r-- | MCP23017/with_lib/with_lib.ino | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/MCP23017/with_lib/with_lib.ino b/MCP23017/with_lib/with_lib.ino index f99065a..98d36b8 100644 --- a/MCP23017/with_lib/with_lib.ino +++ b/MCP23017/with_lib/with_lib.ino @@ -10,8 +10,7 @@ MCP23017 mcp(MCP_ADDR); -void setup(void) -{ +void setup(void){ Serial.begin(9600); pinMode(LED_BUILTIN, OUTPUT); @@ -19,8 +18,7 @@ void setup(void) mcp.pinMode(GPB7, INPUT_PULLUP); } -void loop(void) -{ +void loop(void){ byte mcp_input = mcp.digitalRead(GPB7); digitalWrite(LED_BUILTIN, mcp_input); Serial.println(mcp_input); |
