Skip to content

DFRobot/DFRobot_LPUPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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. 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.
  2. 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)

The library includes code from the HIDPowerDevice library originally Written by abratchik .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages