GithubHelp home page GithubHelp logo

mcp4725's Introduction

MCP4725

Build Status MIT license

Swift Swift Swift

SwiftPM

Raspbian

A Swift driver for the MCP4725 DAC over I2C, using SingleBoard.

Getting Started

Pre-built boards using this in a 0-10V configuration can be found from Aptinex and ncd.io. A breakout board that works in the 0-5V configuration is available from Adafruit.

A simple example looks like this:

// Most prototype boards have the default address as 0x62
// you can override this with an address parameter.
let mcp4725 = MCP4725(i2cBus: SingleBoard.raspberryPi.i2cMainBus)

// Voltages are the lower 12-bits of a 16-bit value. The top 4 bits are ignored.
// This writes a default setting into the EEPROM of the chip.
mcp4725.setDefault(voltage: 0, mode: .normal)

// Sets the voltage to maximum (5V)
mcp4725.set(voltage: 4095)

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Adam Thayer - Initial work - Kaiede

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

mcp4725's People

Contributors

kaiede avatar

Watchers

James Cloos 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.