Giter Site home page Giter Site logo

mcp23s17-wiring's Introduction

A C++ wrapper for the Microchip MCP23S17.

SAMPLES:

  /****************/
 /* Hello Blinky */
/****************/
#include "mcp23s17/mcp23s17.h"

const int LED_PIN = 7;
mcp23s17 gpio_x(mcp23s17::HardwareAddress::HW_ADDR_0); // All addressing pins set to GND

void setup (void) {
    gpio_x.pinMode(LED_PIN, mcp23s17::PinMode::OUTPUT);
}

void loop (void) {
    gpio_x.digitalWrite(LED_PIN, mcp23s17::PinLatchValue::HIGH);
    delay(500);
    gpio_x.digitalWrite(LED_PIN, mcp23s17::PinLatchValue::LOW);
    delay(500);
}

TODO:

Implement interrupts

ATTRIBUTION:

  • The makefiles used for compiling the Google Unit Test where taken from Google.

LICENSE:

  • The MIT License (MIT). Refer to the LICENSE file for more details.

mcp23s17-wiring's People

Contributors

zfields avatar

Stargazers

Conner Brooks avatar

Watchers

James Cloos avatar  avatar

mcp23s17-wiring's Issues

I ❤️️ the tests!

I just have to say, fantastic job creating tests for this library! I'm always looking for good examples on how to do that.

If you're ever looking for techniques for offline testing of Particle apps, feel free to take a look at some of the apps I wrote for my Carloop project.

https://github.com/carloop/app-reminder/blob/master/tests/app-reminder-tests.cpp

I use Catch, a single header file testing framework and run the main loop inside the test to do integration style testing of the app.

Anyway, I just wanted to say thanks for making high quality libraries and for contributing to the Particle ecosystem!

Julien @ Particle

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.