https://github.com/Kaiede/MCP4725
Swift library for interacting with the MCP4725 I2C 12-bit DAC.
https://github.com/Kaiede/MCP4725
Last synced: 6 months ago
JSON representation
Swift library for interacting with the MCP4725 I2C 12-bit DAC.
- Host: GitHub
- URL: https://github.com/Kaiede/MCP4725
- Owner: Kaiede
- License: mit
- Created: 2019-03-28T22:23:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-07T22:22:21.000Z (almost 6 years ago)
- Last Synced: 2025-04-01T15:09:13.360Z (7 months ago)
- Language: Swift
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-embedded-swift - MCP4725 - Swift library for interacting with the MCP4725 I2C 12-bit DAC. (Modules / Networking, IoT, Bus Protocols, …)
README
# MCP4725
[](https://github.com/Kaiede/MCP4725/actions)
[](http://opensource.org/licenses/MIT)





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
* [SingleBoard](https://github.com/Kaiede/SingleBoard)
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Authors
* **Adam Thayer** - *Initial work* - [Kaiede](https://github.com/Kaiede)
See also the list of [contributors](https://github.com/Kaiede/RPiLight/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details