Coder Social home page Coder Social logo

aw9523_rp2040's Introduction

AW9523 for RP2040

A demo of the AW9523 I2C GPIO expander for RP2040. The library is ported from the Adafruit Library for this; I've removed the Adafruit_I2CRegister abstraction provided by Adafruit_BusIO and just used raw Pico SDK i2c commands.

Currently this is configured for a pico_w in CMakeLists.txt; you should probably change that to pico for a regular board. I just had a Pico W on hand to test this with.

Connections

Connect an AW9523 over I2C, connecting SDA/SCL to GPIO4/5, respectively.

Connect pullups (around 4k7/5k6) between SDA/SCL and VCC.

Connect a push button between VCC and AW9523 pin 8. Connect a pull-up resistor between pin 8 and VCC.

Connect the cathodes of four LEDs to AW9523 IOs 1-4. Connect the anode to VCC. You do not need resistors.

Connect AW9523 VDD to 3V3, and GND to Ground.

Usage

By default, the demo will light LEDs on pins 1-4 at about 25% brightness.

Push the button to toggle to pulsing them through all brightnesses; each LED will be 90ΒΊ out of phase, creating a scrolling effect. (I wouldn't recommend using floating point math and sin in a production object, but it'll do for our demo).

Library Usage

You need aw9523.cpp and aw9523.h included in your project via CMake, and then you'll be able to use and instantiate the library.

aw9523_rp2040's People

Contributors

infovore avatar

Watchers

 avatar  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.