GithubHelp home page GithubHelp logo

tca6416a's Introduction

TCA6416A Arduino Library

This is an Arduino library for the TCA6416A, a 16-bit I/O expander for the I2C bus.

Installation in Arduino IDE

You should be able to install this library from the Arduino IDE's Library Manager. If you prefer to install it manually, follow these steps:

  1. Download the library as a ZIP file.
  2. In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library and select the downloaded file.

Usage

Include the library in your sketch:

#include <TCA6416A.h>

Create an instance of the TCA6416A class:

TCA6416A expander;

In your setup function, initialize the TCA6416A:

void setup() {
	while (!pins.begin(0, &Wire)) { // replace 0 with the address bit of your TCA6416A
    	Serial.println("TCA6416A not found");
		delay(1000);
	}
}

You can then use the various methods provided by the library to interact with the TCA6416A. For example, to set a pin as output and write a HIGH signal:

expander.pin_mode(0, OUTPUT);
expander.pin_write(0, HIGH);

To read the state of a pin:

int state = expander.pin_read(0);

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This library is licensed under the MIT License. See the LICENSE file for more information.

tca6416a's People

Contributors

eddwhite avatar haakonnessjoen avatar presslab-us 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.