{"type":"mcp_client","name":"Adafruit-MCP23017-Arduino-Library","description":"This repository provides an Arduino library for the MCP23008/17 I2C and MCP23S08/17 SPI port expanders, enabling users to easily interface with and control these devices using Arduino boards. Pin addressing","category":"Developer Tools","language":"C++","stars":380,"forks":205,"owner":"adafruit","github_url":"https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library","homepage":null,"setup":"## Setup\nTo install, use the Arduino IDE Library Manager.","tools":"## Available Tools\n\n1.  MCP23008/17 I2C and MCP23S08/17 SPI Port Expanders (Provides I/O expansion capabilities).\n2.  `pinMode(pinId, dir)` (Sets the mode of a specific pin).\n3.  `digitalRead(pinId)` (Reads the digital value of a specific pin).\n4.  `digitalWrite(pinId, val)` (Writes a digital value to a specific pin).\n5.  HW pin addressing (A2, A1, A0 for S17 and A1, A0 for S08) (Supports hardware pin addressing for SPI devices).\n6.  `begin_SPI(CS, SPI, HW_ADDR)` (Initializes SPI communication with a specific hardware address).\n7.  `enableAddrPins()` (Enables hardware address recognition by setting the IOCON.HAEN bit).","faq":null,"created_at":"2012-02-14T17:02:06+00:00","updated_at":"2025-03-28T21:39:29+00:00","source_url":"https://model-context-protocol.com/clients/arduino-mcp23017-port-expander-library","related_articles":[]}