Giter VIP home page Giter VIP logo

arduino-mcp23017's Introduction

MCP23017

Build Status License

This library provides full control over the Microchip's MCP23017, including interrupt support.

Features

  • Individual pins read & write
  • Ports read & write
  • Registers read & write
  • Full interrupt support

Usage

Unlike most Arduino library, no default instance is created when the library is included. It's up to you to create one using the appropriate I2C address based on MCP23017 A0, A1 and A2 pins wirings. Available addresses go from 0x20 to 0x27, allowing up to 8 MCP23017 on the same I2C bus.

#include <Arduino.h>
#include <MCP23017.h>

MCP23017 mcp = MCP23017(0x24);

Additionaly, you can specify the Wire instance to use as a second argument. For instance MCP23017(0x24, Wire1).
See included examples for further usage.

Remarks

Major renames have been performed in v2.0.0 to improve compatibility with a variety of platforms. Existing code will break when you update from version v1.x.

Name in v1.x Name in v2.x
MCP23017_PORT MCP23017Port
MCP23017_REGISTER MCP23017Register
MCP23017_INTMODE MCP23017InterruptMode

In addition to this, every member of the MCP23017Register enum were renamed to avoid possible conflicts with macro definitions. GPIOA was renamed to GPIO_A, INTCAPA to INTCAP_A and so on...

arduino-mcp23017's People

Contributors

blemasle avatar cwverhey avatar muman613 avatar trycoon avatar yanzixiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.