Elixir driver for the MAX17040 and MAX17041 lithium battery monitoring ICs
Go to file
Renovate Bot cae2dd00e8
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
chore(deps): update dependency spark to v2.1.22
2024-05-15 04:13:59 +12:00
config feat: Driver for MAX1704x ICs. 2024-04-25 11:58:54 +12:00
lib fix: Correctly implement voltage scaling for both variants. 2024-04-25 18:22:12 +12:00
test fix: Correctly implement voltage scaling for both variants. 2024-04-25 18:22:12 +12:00
.drone.yml chore: Enable automatic release to hex. 2024-04-25 12:09:29 +12:00
.formatter.exs feat: Driver for MAX1704x ICs. 2024-04-25 11:58:54 +12:00
.gitignore feat: Driver for MAX1704x ICs. 2024-04-25 11:58:54 +12:00
.tool-versions chore(deps): update dependency erlang to v26.2.5 2024-05-03 03:32:15 +12:00
CHANGELOG.md chore: release version v0.1.0 2024-04-25 11:59:01 +12:00
LICENSE.md feat: Driver for MAX1704x ICs. 2024-04-25 11:58:54 +12:00
mix.exs chore(deps): update dependency ex_doc to ~> 0.32 2024-05-10 23:33:12 +12:00
mix.lock chore(deps): update dependency spark to v2.1.22 2024-05-15 04:13:59 +12:00
README.md docs: fix error in readme. 2024-04-25 12:20:39 +12:00
renovate.json chore: Configure Renovate (#1) 2024-04-25 18:26:28 +12:00

Max1704x

Build Status Hex.pm Hippocratic License HL3-FULL

A library for interacting with the Analog Devices MAX17040 and MAX17041 1 and 2 cell lithium battery monitors over I2C.

Usage

This library uses the Wafer project connect to the I2C device which means that it is independent of any specific I2C driver.

Example using Elixir Circuits

iex> {:ok, conn} = Wafer.Driver.CircuitsI2C.acquire(bus: "i2c-1", address: 0x36)
...> {:ok, conn} = Max1704x.acquire(conn, 0)
...> Max1704x.current_voltage(conn)
{:ok, 4.165}

Installation

The max1704x package is available on hex so it can be installed by adding max1704x to your list of dependencies in mix.exs.

def deps do
  [
    {:max1704x, "~> 0.1.0"}
  ]
end

Documentation for the latest release is always available on HexDocs and for the main branch on docs.harton.nz.

Github Mirror

This repository is mirrored on Github from it's primary location on my Forgejo instance. Feel free to raise issues and open PRs on Github.

License

This software is licensed under the terms of the HL3-FULL, see the LICENSE.md file included with this package for the terms.

This license actively proscribes this software being used by and for some industries, countries and activities. If your usage of this software doesn't comply with the terms of this license, then contact me with the details of your use-case to organise the purchase of a license - the cost of which may include a donation to a suitable charity or NGO.