Any Framework
Iot.Device.MAX1704x assembly for .NET nanoFramework C# projects
Published
Mar 22, 2024
2y ago
Total Downloads
8.4K
8,403
Install
dotnet add package nanoFramework.Iot.Device.Max1704x --version 1.0.49
No framework information available.
README
MAX1704x/MAX17043/MAX17044/MAX17048/MAX17049 - Battery gauge
Library designed for controlling MAX1704x IC.
Functions
The binding supports all functionalities for MAX1704x family. Implemented based on SparkFun implementation.
Classes
- Max17043 - class for MAX17043
- Max17044 - class for MAX17044
- Max17048 - class for MAX17048
- Max17049 - class for MAX17049
- Max1704x - base class for all max IC
Usage
// Make sure your pins are configured correctly especially for ESp32
var i2cDevice = I2cDevice.Create(new I2cConnectionSettings(1, Max1704X.DefaultAddress));
var max = new Max17048(i2cDevice);
Console.WriteLine($"Voltage: {max.BatteryVoltage.Volts} V");
Console.WriteLine($"Percent: {max.BatteryPercent.Percent} %");
Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice.
//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);
Changes from Previous Version
No structural changes between v1.0.29 and v1.0.49.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.