-sentence=DFRobot Standard library(SKU:DFR0563).
-paragraph=Gravity: I2C 3.7V Li Battery Fuel Gauge.
-category=Sensors
-url=https://github.com/DFRobot/DFRobot_MAX17043
-architectures=*
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/DFRobot_MAX17043.py b/lib/lib_i2c/DFRobot_MAX17043/python/micropython/DFRobot_MAX17043.py
deleted file mode 100644
index b7ac8b9e8..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/DFRobot_MAX17043.py
+++ /dev/null
@@ -1,111 +0,0 @@
-'''!
- @file DFRobot_MAX17043.py
- @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
- @license The MIT License (MIT)
- @author [ouki.wang](ouki.wang@dfrobot.com)
- @version V1.0
- @date 2018-4-14
- @url https://github.com/DFRobot/DFRobot_MAX17043
-'''
-
-import time
-
-from machine import I2C, Pin
-
-## Get I2C bus
-i2c = I2C(scl = Pin(22), sda = Pin(21), freq=400000)
-
-MAX17043_ADDR = 0x36
-MAX17043_VCELL = 0x02
-MAX17043_SOC = 0x04
-MAX17043_MODE = 0x06
-MAX17043_VERSION = 0x08
-MAX17043_CONFIG = 0x0c
-MAX17043_COMMAND = 0xfe
-
-class DFRobot_MAX17043():
-
- def __init__(self):
- '''!
- @brief create MAX17043 object
- @return MAX17043 object
- '''
- pass
-
- def begin(self):
- '''!
- @brief MAX17043 begin and test moudle
- @return initialization result:
- @retval 0 successful
- @retval -1 faild
- '''
- self._write16(MAX17043_COMMAND, 0x5400)
- time.sleep(0.01)
- if self._read16(MAX17043_CONFIG) == 0x971c:
- self._write16(MAX17043_MODE, 0x4000)
- time.sleep(0.01)
- self._write16(MAX17043_CONFIG, 0x9700)
- return 0
- else:
- return -1
-
- def read_voltage(self):
- '''!
- @brief read battery voltage in mV
- @return voltage in mV
- '''
- return (1.25 * (self._read16(MAX17043_VCELL) >> 4))
-
- def read_percentage(self):
- '''!
- @brief read battery remaining capacity in percentage
- @return battery remaining capacity in percentage
- '''
- tmp = self._read16(MAX17043_SOC)
- return ((tmp >> 8) + 0.003906 * (tmp & 0x00ff))
-
- def set_Interrupt(self, per):
- '''!
- @brief set MAX17043 interrput threshold
- @param per interrupt threshold as %1 - 32% (integer)
- '''
- if per > 32:
- per = 32
- elif per < 1:
- per = 1
- per = 32 - int(per)
- self._write_reg_bits(MAX17043_CONFIG, per, 0x01f, 0)
-
- def clear_interrupt(self):
- '''!
- @brief clear MAX17043 interrupt.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 0, 0x01, 5)
-
- def set_sleep(self):
- '''!
- @brief set MAX17043 in sleep mode.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 1, 0x01, 7)
-
- def set_wakeup(self):
- '''!
- @brief wake up MAX17043.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 0, 0x01, 7)
-
- def _write16(self, reg, dat):
- buf = bytearray(2)
- buf[0] = dat >> 8
- buf[1] = dat & 0x00ff
- i2c.writeto_mem(MAX17043_ADDR, reg, buf)
-
- def _read16(self, reg):
- buf = i2c.readfrom_mem(MAX17043_ADDR, reg, 2)
- return ((buf[0] << 8) | buf[1])
-
- def _write_reg_bits(self, reg, dat, bits, offset):
- tmp = self._read16(reg)
- tmp = (tmp & (~(bits << offset))) | (dat << offset)
- self._write16(reg, tmp)
-
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README.md b/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README.md
deleted file mode 100644
index 106363df4..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# DFRobot_MAX17043
-
-* [中文版](./README_CN.md)
-
-The MAX17043 is ultra-compact, low-cost,host-side fuel-gauge systems for lithium-ion (Li+) batter-ies in handheld and portable
-equpiment.It employs Gravity I2C interface,ultra-low opearting current, and real-time tracking of the relative state of charge
-(SOC) of the battery through Maxim's patented algorithm,eliminating the need for full-to-empty relearning and offset accumualtion
-errors.Plug and play to accurately measure the voltage and remaining power of the battery. The module also features as a low
-battery power alert interrupt function. When the battery power falls below specified threshold, the ALR pin generates a falling
-pluse to trigger the external interrupt of the controller.One thing should mention that the default value of the battery low power
-interrupt alert threshold is 32%, this threshold can be set by the function set_interrupt().
-
-
-
-## Product Link([https://www.dfrobot.com/product-1734.html](https://www.dfrobot.com/product-1734.html))
- SKU: DFR0563
-
-## Table of Contents
-* [Summary](#summary)
-* [connection](connection)
-* [Installation](#installation)
-* [Methods](#methods)
-* [Compatibility](#compatibility)
-* [History](#history)
-* [Credits](#credits)
-
-## Summary
-Provides a microPython library for reading and interperting MAX17043 data over I2C.
-
-## Connection
-Wires of the same color are linked together,and We only exemplify how this board is connected to the Fuel Gauge.
-When connecting , it is necessary to pay attention to the correspondence among pins, the connection diagram is as fellows.
-
-* ESP32
-
-
-
-
-
-
-## Installation
-
-To use this library download the zip file, uncomperss it to a folder named DFRobot_MAX17043 in your upyCraft workspace.
-
-## Methods
-
-```python
- '''!
- @brief MAX17043 begin and test moudle
- @return initialization result:
- @retval 0 successful
- @retval -1 faild
- '''
- def begin(self):
-
- '''!
- @brief read battery voltage in mV
- @return voltage in mV
- '''
- def read_voltage(self):
-
- '''!
- @brief read battery remaining capacity in percentage
- @return battery remaining capacity in percentage
- '''
- def read_percentage(self):
- '''!
- @brief set MAX17043 interrput threshold
- @param per interrupt threshold as %1 - 32% (integer)
- '''
- def set_interrupt(self, per):
-
- '''!
- @brief clear MAX17043 interrupt.
- '''
- def clear_interrupt(self):
-
- '''!
- @brief set MAX17043 in sleep mode.
- '''
- def set_sleep(self):
-
- '''!
- @brief wake up MAX17043.
- '''
-
-```
-## Compatibility
-
-| MCU | Work Well | Work Wrong | Untested | Remarks |
-| ------------------ | :-------: | :--------: | :------: | ------- |
-| ESP32 | √ | | |
-
-## History
-
-- 2018/04/14 - Version 1.0.0 released.
-
-## Credits
-
-Written by ouki.wang(ouki.wang@dfrobot.com), 2018. (Welcome to our [website](https://www.dfrobot.com/))
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README_CN.md b/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README_CN.md
deleted file mode 100644
index 48af8058c..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/README_CN.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# DFRobot_MAX17043
-
-* [English Version](./README.md)
-
-Gravity 3.7V锂电池电量计使用Gravity I2C接口,超低工作电流,通过Maxim专利算法,实时跟踪电池的相对充电状态(SOC,State-Of-Charge),无需充放电学习过程,无积累误差,即插即用,准确地测量锂电池的当前电压和剩余电量。模块预留低电量报警中断引脚,当电池电量低于指定电量时,该引脚产生一个下跳脉冲,触发主控的外部中断。
-
-
-
-
-## 产品链接([https://www.dfrobot.com.cn/goods-1743.html](https://www.dfrobot.com.cn/goods-1743.html))
- SKU: DFR0563
-
-## 目录
-
-* [概述](#概述)
-* [连接](连接)
-* [库安装](#库安装)
-* [方法](#方法)
-* [兼容性](#兼容性)
-* [历史](#历史)
-* [创作者](#创作者)
-
-## 概述
-提供 microPython 库,用于通过 I2C 读取和解释 MAX17043 数据
-
-## 连接
-相同颜色的线连接在一起,我们只举例说明主板是如何连接到电量计的。接线时要注意管脚的对应关系,接线图如下:
-
-* ESP32
-
-
-
-
-
-
-## 库安装
-
-要使用此库,请下载 zip 文件,将其解压缩到 upyCraft 工作区中名为 DFRobot_MAX17043 的文件夹中。
-
-## 方法
-
-```python
- '''!
- @brief 构造MAX17043对象
- @return MAX17043 初始化
- @retval 0 成功
- @retval -1 失败
- '''
- def begin(self):
-
- '''!
- @brief 读电池电压,单位: mV
- @return 电池电压,单位:mV
- '''
- def read_voltage(self):
-
- '''!
- @brief 读取剩余电池容量的百分比
- @return 剩余电池容量的百分比
- '''
- def read_percentage(self):
- '''!
- @brief 设置 MAX17043 中断阈值
- @param per 中断阈值范围: %1 - 32% (整数)
- '''
- def set_interrupt(self, per):
-
- '''!
- @brief 清除 MAX17043 中断.
- '''
- def clear_interrupt(self):
-
- '''!
- @brief 设置 MAX17043 进入睡眠模式
- '''
- def set_sleep(self):
-
- '''!
- @brief 唤醒 MAX17043
- '''
- def set_wakeup(self):
-```
-
-## 兼容性
-
-| MCU | Work Well | Work Wrong | Untested | Remarks |
-| ------------------ | :-------: | :--------: | :------: | ------- |
-| ESP32 | √ | | |
-
-## 历史
-
-- 2018/04/14 - 1.0.0 版本
-
-## 创作者
-
-Written by ouki.wang(ouki.wang@dfrobot.com), 2018. (Welcome to our [website](https://www.dfrobot.com/))
-
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/demo_MAX17043.py b/lib/lib_i2c/DFRobot_MAX17043/python/micropython/demo_MAX17043.py
deleted file mode 100644
index d6d5e2f54..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/micropython/demo_MAX17043.py
+++ /dev/null
@@ -1,38 +0,0 @@
-'''!
- @file demo_MAX17043.py
- @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
- @license The MIT License (MIT)
- @author [ouki.wang](ouki.wang@dfrobot.com)
- @version V1.0
- @date 2018-4-14
- @url https://github.com/DFRobot/DFRobot_MAX17043
-'''
-
-import time
-from machine import Pin
-from DFRobot_MAX17043 import DFRobot_MAX17043
-
-gauge = DFRobot_MAX17043()
-
-def interruptCallBack(channel):
- gauge.clear_interrupt()
- print('Low power alert interrupt!')
- #put your battery low power alert interrupt service routine here
-
-pin_irq = Pin(25, Pin.IN)
-pin_irq.irq(trigger = Pin.IRQ_FALLING, handler = interruptCallBack)
-
-rslt = gauge.begin()
-
-while rslt != 0:
- print('gauge begin faild')
- time.sleep(2)
- rslt = gauge.begin()
-
-#gauge.set_Interrupt(32) #use this to modify alert threshold as 1% - 32% (integer)
-print('gauge begin successful')
-
-while True:
- time.sleep(2)
- print('voltage: ' + str(gauge.read_voltage()) + 'mV')
- print('percentage: ' + str(round(gauge.read_percentage(), 2)) + '%')
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/DFRobot_MAX17043.py b/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/DFRobot_MAX17043.py
deleted file mode 100644
index 1ddc751ca..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/DFRobot_MAX17043.py
+++ /dev/null
@@ -1,109 +0,0 @@
-'''!
- @file DFRobot_MAX17043.py
- @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
- @license The MIT License (MIT)
- @author [ouki.wang](ouki.wang@dfrobot.com)
- @version V1.0
- @date 2018-4-14
- @url https://github.com/DFRobot/DFRobot_MAX17043
-'''
-
-import smbus
-import time
-import datetime
-
-# Get I2C bus
-bus = smbus.SMBus(1)
-
-MAX17043_ADDR = 0x36
-MAX17043_VCELL = 0x02
-MAX17043_SOC = 0x04
-MAX17043_MODE = 0x06
-MAX17043_VERSION = 0x08
-MAX17043_CONFIG = 0x0c
-MAX17043_COMMAND = 0xfe
-
-class DFRobot_MAX17043():
-
- def __init__(self):
- '''!
- @brief create MAX17043 object
- @return MAX17043 object
- '''
- pass
-
- def begin(self):
- '''!
- @brief MAX17043 begin and test moudle
- @return initialization result:
- @retval 0 successful
- @retval -1 faild
- '''
- self._write16(MAX17043_COMMAND, 0x5400)
- time.sleep(0.01)
- if self._read16(MAX17043_CONFIG) == 0x971c:
- self._write16(MAX17043_MODE, 0x4000)
- time.sleep(0.01)
- self._write16(MAX17043_CONFIG, 0x9700)
- return 0
- else:
- return -1
-
- def read_voltage(self):
- '''!
- @brief read battery voltage in mV
- @return voltage in mV
- '''
- return (1.25 * (self._read16(MAX17043_VCELL) >> 4))
-
- def read_percentage(self):
- '''!
- @brief read battery remaining capacity in percentage
- @return battery remaining capacity in percentage
- '''
- tmp = self._read16(MAX17043_SOC)
- return ((tmp >> 8) + 0.003906 * (tmp & 0x00ff))
-
- def set_interrupt(self, per):
- '''!
- @brief set MAX17043 interrput threshold
- @param per interrupt threshold as %1 - 32% (integer)
- '''
- if per > 32:
- per = 32
- elif per < 1:
- per = 1
- per = 32 - int(per)
- self._write_reg_bits(MAX17043_CONFIG, per, 0x01f, 0)
-
- def clear_interrupt(self):
- '''!
- @brief clear MAX17043 interrupt.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 0, 0x01, 5)
-
- def set_sleep(self):
- '''!
- @brief set MAX17043 in sleep mode.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 1, 0x01, 7)
-
- def set_wakeup(self):
- '''!
- @brief wake up MAX17043.
- '''
- self._write_reg_bits(MAX17043_CONFIG, 0, 0x01, 7)
-
- def _write16(self, reg, dat):
- buf = [dat >> 8, dat & 0x00ff]
- bus.write_i2c_block_data(MAX17043_ADDR, reg, buf)
-
- def _read16(self, reg):
- buf = bus.read_i2c_block_data(MAX17043_ADDR, reg, 2)
- return ((buf[0] << 8) | buf[1])
-
- def _write_reg_bits(self, reg, dat, bits, offset):
- tmp = self._read16(reg)
- tmp = (tmp & (~(bits << offset))) | (dat << offset)
- self._write16(reg, tmp)
-
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README.md b/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README.md
deleted file mode 100644
index 47bd42678..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README.md
+++ /dev/null
@@ -1,128 +0,0 @@
-# DFRobot_MAX17043
-
-* [中文版](./README_CN.md)
-
-The MAX17043 is ultra-compact, low-cost,host-side fuel-gauge systems for lithium-ion (Li+) batter-ies in handheld and portable
-equpiment.It employs Gravity I2C interface,ultra-low opearting current, and real-time tracking of the relative state of charge
-(SOC) of the battery through Maxim's patented algorithm,eliminating the need for full-to-empty relearning and offset accumualtion
-errors.Plug and play to accurately measure the voltage and remaining power of the battery. The module also features as a low
-battery power alert interrupt function. When the battery power falls below specified threshold, the ALR pin generates a falling
-pluse to trigger the external interrupt of the controller.One thing should mention that the default value of the battery low power
-interrupt alert threshold is 32%, this threshold can be set by the function set_interrupt().
-
-
-
-## Product Link([https://www.dfrobot.com/product-1734.html](https://www.dfrobot.com/product-1734.html))
- SKU: DFR0563
-
-## Table of Contents
-* [Summary](#summary)
-* [connection](connection)
-* [Installation](#installation)
-* [Methods](#methods)
-* [Compatibility](#compatibility)
-* [History](#history)
-* [Credits](#credits)
-
-## Summary
-
-Provides an Raspberry pi library for reading and interperting MAX17043 data over I2C.
-
-## Connection
-Wires of the same color are linked together,and We only exemplify how these three boards are connected to the Fuel Gauge.
-When connecting , it is necessary to pay attention to the correspondence among pins, the connection diagram is as fellows.
-
-* Raspberry Pi
-
-
-
-
-## Installation
-
-Download and install smbus library on Raspberry pi. Steps to install smbus are provided at:
-
-```python
-$> sudo apt-get install -y python-smbus
-$> sudo apt-get install -y i2c-tools
-```
-
-1. To use this library, first download the library file
-```python
-sudo git clone https://github.com/DFRobot/DFRobot_MAX17043
-```
-2. Open and run the routine. To execute a routine demo_x.py, enter python demo_x.py in the command line. For example, to execute the demo_read_and_int.py.py routine, you need to enter :
-
-```python
-python demo_read_and_int.py.py
-or
-python2 demo_read_and_int.py.py
-```
-
-## Methods
-
-```python
- '''!
- @brief MAX17043 begin and test moudle
- @return initialization result:
- @retval 0 successful
- @retval -1 faild
- '''
- def begin(self):
-
- '''!
- @brief read battery voltage in mV
- @return voltage in mV
- '''
- def read_voltage(self):
-
- '''!
- @brief read battery remaining capacity in percentage
- @return battery remaining capacity in percentage
- '''
- def read_percentage(self):
- '''!
- @brief set MAX17043 interrput threshold
- @param per interrupt threshold as %1 - 32% (integer)
- '''
- def set_interrupt(self, per):
-
- '''!
- @brief clear MAX17043 interrupt.
- '''
- def clear_interrupt(self):
-
- '''!
- @brief set MAX17043 in sleep mode.
- '''
- def set_sleep(self):
-
- '''!
- @brief wake up MAX17043.
- '''
- def set_wakeup(self):
-
-
-```
-
-## Compatibility
-
-| 主板 | 通过 | 未通过 | 未测试 | 备注 |
-| ------------ | :--: | :----: | :----: | :--: |
-| RaspberryPi2 | | | √ | |
-| RaspberryPi3 | | | √ | |
-| RaspberryPi4 | √ | | | |
-
-* Python 版本
-
-| Python | 通过 | 未通过 | 未测试 | 备注 |
-| ------- | :--: | :----: | :----: | ---- |
-| Python2 | √ | | | |
-| Python3 | | | √ | |
-
-## History
-
-- 2018/04/14 - Version 1.0.0 released.
-
-## Credits
-
-Written by ouki.wang(ouki.wang@dfrobot.com), 2018. (Welcome to our [website](https://www.dfrobot.com/))
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README_CN.md b/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README_CN.md
deleted file mode 100644
index 00894b09a..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/README_CN.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# DFRobot_MAX17043
-
-* [English Version](./README.md)
-
-Gravity 3.7V锂电池电量计使用Gravity I2C接口,超低工作电流,通过Maxim专利算法,实时跟踪电池的相对充电状态(SOC,State-Of-Charge),无需充放电学习过程,无积累误差,即插即用,准确地测量锂电池的当前电压和剩余电量。模块预留低电量报警中断引脚,当电池电量低于指定电量时,该引脚产生一个下跳脉冲,触发主控的外部中断。
-
-
-
-
-## 产品链接([https://www.dfrobot.com.cn/goods-1743.html](https://www.dfrobot.com.cn/goods-1743.html))
- SKU: DFR0563
-
-## 目录
-
-* [概述](#概述)
-* [连接](连接)
-* [库安装](#库安装)
-* [方法](#方法)
-* [兼容性](#兼容性)
-* [历史](#历史)
-* [创作者](#创作者)
-
-## 概述
-
-提供 python 库,用于通过 I2C 读取和解释 MAX17043 数据。
-
-## 连接
-相同颜色的线连接在一起,我们只举例说明主板是如何连接到电量计的。接线时要注意管脚的对应关系,接线图如下:
-
-* Raspberry Pi
-
-
-
-
-## 库安装
-1. 下载库至树莓派,要使用这个库,首先要将库下载到Raspberry Pi,命令下载方法如下:
-```python
-sudo git clone https://github.com/DFRobot/DFRobot_MAX17043
-```
-2. 打开并运行例程,要执行一个例程demo_x.py,请在命令行中输入python demo_x.py。例如,要执行 demo_read_and_int.py例程,你需要输入:
-
-```python
-python demo_read_and_int.py
-或
-python2 demo_read_and_int.py
-```
-
-## 方法
-
-```python
- '''!
- @brief 构造MAX17043对象
- @return MAX17043 初始化
- @retval 0 成功
- @retval -1 失败
- '''
- def begin(self):
-
- '''!
- @brief 读电池电压,单位: mV
- @return 电池电压,单位:mV
- '''
- def read_voltage(self):
-
- '''!
- @brief 读取剩余电池容量的百分比
- @return 剩余电池容量的百分比
- '''
- def read_percentage(self):
- '''!
- @brief 设置 MAX17043 中断阈值
- @param per 中断阈值范围: %1 - 32% (整数)
- '''
- def set_interrupt(self, per):
-
- '''!
- @brief 清除 MAX17043 中断.
- '''
- def clear_interrupt(self):
-
- '''!
- @brief 设置 MAX17043 进入睡眠模式
- '''
- def set_sleep(self):
-
- '''!
- @brief 唤醒 MAX17043
- '''
- def set_wakeup(self):
-```
-
-## 兼容性
-
-| 主板 | 通过 | 未通过 | 未测试 | 备注 |
-| ------------ | :--: | :----: | :----: | :--: |
-| RaspberryPi2 | | | √ | |
-| RaspberryPi3 | | | √ | |
-| RaspberryPi4 | √ | | | |
-
-* Python 版本
-
-| Python | 通过 | 未通过 | 未测试 | 备注 |
-| ------- | :--: | :----: | :----: | ---- |
-| Python2 | √ | | | |
-| Python3 | | | √ | |
-
-## 历史
-
-- 2018/04/14 - 1.0.0 版本
-
-## 创作者
-
-Written by ouki.wang(ouki.wang@dfrobot.com), 2018. (Welcome to our [website](https://www.dfrobot.com/))
-
-
-
-
-
-
diff --git a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/examples/demo_read_and_int.py b/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/examples/demo_read_and_int.py
deleted file mode 100644
index dd328c640..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/python/raspberry/examples/demo_read_and_int.py
+++ /dev/null
@@ -1,44 +0,0 @@
-'''!
- @file demo_read_and_int.py
- @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
- @license The MIT License (MIT)
- @author [ouki.wang](ouki.wang@dfrobot.com)
- @version V1.0
- @date 2018-4-14
- @url https://github.com/DFRobot/DFRobot_MAX17043
-'''
-
-import sys
-sys.path.append('../')
-import time
-
-sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
-from DFRobot_MAX17043 import DFRobot_MAX17043
-import RPi.GPIO as GPIO
-
-gauge = DFRobot_MAX17043()
-
-GPIO.setmode(GPIO.BOARD)
-GPIO.setup(7, GPIO.IN)
-
-def interruptCallBack(channel):
- gauge.clear_interrupt()
- print('Low power alert interrupt!')
- #put your battery low power alert interrupt service routine here
-
-GPIO.add_event_detect(7, GPIO.FALLING, callback = interruptCallBack, bouncetime = 5)
-
-rslt = gauge.begin()
-
-while rslt != 0:
- print('gauge begin faild')
- time.sleep(2)
- rslt = gauge.begin()
-
-gauge.set_interrupt(32) #use this to modify alert threshold as 1% - 32% (integer)
-print('gauge begin successful')
-
-while True:
- time.sleep(2)
- print('voltage: ' + str(gauge.read_voltage()) + 'mV')
- print('percentage: ' + str(round(gauge.read_percentage(), 2)) + '%')
diff --git a/lib/lib_i2c/DFRobot_MAX17043/readme.md b/lib/lib_i2c/DFRobot_MAX17043/readme.md
deleted file mode 100644
index fdc79ac77..000000000
--- a/lib/lib_i2c/DFRobot_MAX17043/readme.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# DFRobot_MAX17043
-
-* [中文版](./README_CN.md)
-
- The MAX17043 is ultra-compact, low-cost,host-side fuel-gauge systems for lithium-ion (Li+) batter-ies in handheld and portable
-equipment.It employs Gravity I2C interface,ultra-low opearting current, and real-time tracking of the relative state of charge (SOC)
-of the battery through Maxim's patented algorithm,eliminating the need for full-to-empty relearning and offset accumualtion errors.
-Plug and play to accurately measure the voltage and remaining power of the battery. The module also features as a low battery power
-alert interrupt function. When the battery power falls below specified threshold, the ALR pin generates a falling pluse to trigger
-the external interrupt of the controller.One thing should mention that the default value of the battery low power interrupt alert
-threshold is 32%, this threshold can be set by the function setInterrupt().
-
-
-
-## Product Link([https://www.dfrobot.com/product-1734.html](https://www.dfrobot.com/product-1734.html))
- SKU: DFR0563
-
-## Table of Contents
-* [Summary](#summary)
-* [connection](connection)
-* [Installation](#installation)
-* [Methods](#methods)
-* [Compatibility](#compatibility)
-* [History](#history)
-* [Credits](#credits)
-
-## Summary
-
-Provides an Arduino library for reading and interperting MAX17043 data over I2C.
-
-## Connection
-Wires of the same color are linked together,and We only exemplify how these the boards are connected to the Fuel Gauge.
-When connecting , it is necessary to pay attention to the correspondence among pins, the connection diagram is as fellows.
-
-* Arduino UNO
-
-
-
-
-* ESP32
-
-
-
-
-
-## Installation
-
-To use this library download the zip file, uncomperss it to a folder named DFRobot_MAX17043 in Arduino library.
-## Methods
-
-```C++
- /**
- * @fn DFRobot_MAX17043
- * @brief create MAX17043 object
- * @return MAX17043 object
- */
- DFRobot_MAX17043();
- /**
- * @fn begin
- * @brief MAX17043 begin and test moudle
- *
- * @return initialization result
- * @retval 0 successful
- * @retval -1 faild
- */
- int begin();
- /**
- * @fn readVoltage
- * @brief read battery voltage in mV
- * @return voltage in mV
- */
- float readVoltage();
- /**
- * @fn readPercentage
- * @brief read battery remaining capacity in percentage
- *
- * @return battery remaining capacity in percentage
- */
- float readPercentage();
- /**
- * @fn setInterrupt
- * @brief set MAX17043 interrput threshold
- *
- * @param per interrupt threshold as %1 - 32% (integer)
- */
- void setInterrupt(uint8_t per);
- /**
- * @fn clearInterrupt
- * @brief clear MAX17043 interrupt
- */
- void clearInterrupt();
- /**
- * @fn setSleep
- * @brief set MAX17043 in sleep mode
- *
- */
- void setSleep();
- /**
- * @fn setWakeUp
- * @brief wake up MAX17043
- *
- */
- void setWakeUp();
-
-```
-
-## Compatibility
-
-| MCU | Work Well | Work Wrong | Untested | Remarks |
-| ------------------ | :-------: | :--------: | :------: | ------- |
-| FireBeetle-ESP32 | √ | | |
-| FireBeetle-ESP8266 | √ | | |
-| Arduino uno | √ | | |
-
-## History
-
-- 2018/04/14 - Version 1.0.0 released.
-
-## Credits
-
-Written by ouki.wang(ouki.wang@dfrobot.com), 2018. (Welcome to our [website](https://www.dfrobot.com/))
-
diff --git a/lib/lib_i2c/DFRobot_MAX17043/resources/images/DFR0563.jpg b/lib/lib_i2c/DFRobot_MAX17043/resources/images/DFR0563.jpg
deleted file mode 100644
index eb0370a56c7a5819263a3f203dadfe10ecc6f234..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 12228
zcmXxKbyU>P_dkvzjg(40rC*c+lJ1g{3)0=9EDZw7(kUPfPf9>aP!Oa$q^o-=pmKJFu2T^072kd_b&3+u6>f~+PM)&tbPri_pMZzfzP
zH0@va0I3O+#wr;Cw*Czc)s?m7ZcoPe`1qgQ)Pz7FXTNEU4E5p@;z^&9u(7d*goZ>%M-B}QM52N?U7%)g
zvyF{)X(_4iSy{7lvjq5fw6wHdUS3_DtrbD?4Gr~qxj)s*qhc<5X~Nb0
zecFNjZsez5U)6_^CQjkW3_5wLIvFBVSxLi;RA-#Opp%-&qMz&fN`vM92T7@LZXwkF
zfuSu}Jr3CYALK(Poz1{#_Jqu{&R?%=_>~hJQV-uoOk1WZ*!)pW7!{NI)@{R_7f#8-
zCoR@5Bu4uqp;U55fi8Kg>2IRq(tE`3}cY$nJMV#ypU
z{9q_!F5#uB6Ack-o?kS@S-ZOPbse`;j=8^&(47G$zTMxf9hsL%*L(?l@H|T%`<)nN
zpk;gz8`ft5(oeD^kJD5}*Q}$tpT&{>b!Rh7o_7UZdP^N7OIFve&hm>$|6|1C7~qJ$G4Ck<=8J2#u{fkLGw+ZB(Ow&2RRCFq!t*m
zO|7ozy%Y9yxfuVPNttFS55vza&CJy!HaUT^h1
zU184}dCoe)l4;leV2Vwq=#^Z(LqOBuHjAtJRR5rJ#^-|%l?IwY7tRngZQVBqqhP6h
z30js-`ui3A2(
ziS(8D#MZo`#DYDCh8h}W@81yfj=w) |