Skip to content

DFRobot/DFRobot_LPUPS

Repository files navigation

DFRobot_LPUPS

A UPS for LP, providing corresponding power supply for LP's equipment.

产品实物图

SKU: DFR0682

Table of Contents

Summary

  • Obtain battery information from LPUPS via I2C and report this information to LP via USB-HID.

Installation

There two methods:

  1. This library uses HID and depends on the HIDPowerDevice library (https://github.com/abratchik/HIDPowerDevice). To install and run this library, you must also install its dependencies.
  2. To use this library, first download the library file, paste it into the \Arduino\libraries directory, then open the examples folder and run the demo in the folder.
  3. Search the DFRobot_LPUPS library from the Arduino Software Library Manager and download it.

Methods

  /**
   * @fn begin
   * @brief Init function
   * @return int type, indicates returning init status
   * @retval 0 NO_ERROR
   * @retval -1 ERR_DATA_BUS
   * @retval -2 ERR_IC_VERSION
   */
  virtual int begin(void);

  /**
   * @fn getChipData
   * @brief Retrieve chip data.
   * @param regBuf register data
   * @return None
   */
  void getChipData(uint8_t * regBuf);

  /**
   * @fn setMaxChargeVoltage
   * @brief Set maximum charging voltage.
   * @param data Maximum charging voltage:
   * @n          Three batteries: 11100 ~ 12600 mV
   * @n          Four batteries: 14800 ~ 16800 mV
   * @return None
   */
  void setMaxChargeVoltage(uint16_t data);

Compatibility

MCU Work Well Work Wrong Untested Remarks
Arduino Leonardo

History

  • 2022/11/23 - Version 1.0.0 released.
  • 2023/08/09 - Version 1.0.1 released.

Credits

Written by qsjhyy([email protected]), 2022. (Welcome to our website)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages