Table of Contents

Class Ip5306

Namespace
Iot.Device.Ip5306
Assembly
Iot.Device.Ip5306.dll

IP5306 - Power management device

public class Ip5306
Inheritance
Ip5306

Constructors

Ip5306(I2cDevice)

Creates an instance of IP5306

public Ip5306(I2cDevice i2c)

Parameters

i2c I2cDevice

Fields

DefaultI2cAddress

Default IP5306 I2C address

public const int DefaultI2cAddress = 234

Field Value

int

SecondaryI2cAddress

Possible address as well, used in M5Stack

public const int SecondaryI2cAddress = 117

Field Value

int

Properties

AutoPowerOnEnabled

Auto power on enabled. True as default.

public bool AutoPowerOnEnabled { get; set; }

Property Value

bool

BoostEnabled

Boost enabled. True as default.

public bool BoostEnabled { get; set; }

Property Value

bool

BoostOutputEnabled

Boost output enabled. True as default.

public bool BoostOutputEnabled { get; set; }

Property Value

bool

BoostWhenVinUnpluggedEnabled

Bosst when V in unplugges enabled. True as default.

public bool BoostWhenVinUnpluggedEnabled { get; set; }

Property Value

bool

ButtonOffEnabled

Button off enabled. False as default.

public bool ButtonOffEnabled { get; set; }

Property Value

bool

ChargerEnabled

Charger enabled. true as default.

public bool ChargerEnabled { get; set; }

Property Value

bool

ChargingBatteryVoltage

Charging battery voltage. Default to 4.2 Volt.

public ChargingBatteryVoltage ChargingBatteryVoltage { get; set; }

Property Value

ChargingBatteryVoltage

ChargingCurrent

Charging current.

public ElectricCurrent ChargingCurrent { get; set; }

Property Value

ElectricCurrent

Remarks

Typical valut is between 50 and 3150 milli Ampere. Values are capted to 50 for anything under or 3150 for anything higher.

ChargingCutOffCurrent

Charging cut off current. Default to 400 mA.

public ChargingCutOffCurrent ChargingCutOffCurrent { get; set; }

Property Value

ChargingCutOffCurrent

ChargingCuttOffVoltage

Charging cut off voltage. Default to 4.185 Volt.

public ChargingCutOffVoltage ChargingCuttOffVoltage { get; set; }

Property Value

ChargingCutOffVoltage

ChargingLoopSelection

Charging loop selection. Defautl to V in.

public ChargingLoopSelection ChargingLoopSelection { get; set; }

Property Value

ChargingLoopSelection

ChargingUnderVoltage

Charging under voltage. Default to 4.7 Volt.

public ChargingUnderVoltage ChargingUnderVoltage { get; set; }

Property Value

ChargingUnderVoltage

ConstantChargingVoltage

Constant charging voltage. Default to 14 milli Volt.

public ConstantChargingVoltage ConstantChargingVoltage { get; set; }

Property Value

ConstantChargingVoltage

FlashLightBehavior

Flash light behavior. Defautl to double click.

public ButtonPress FlashLightBehavior { get; set; }

Property Value

ButtonPress

IsBatteryFull

True if the battery is full.

public bool IsBatteryFull { get; }

Property Value

bool

IsCharging

True if the battery is charging.

public bool IsCharging { get; }

Property Value

bool

IsOutputLoadHigh

True if the output is loaded to high.

public bool IsOutputLoadHigh { get; }

Property Value

bool

LightDutyShutdownTime

Light duty shutdown time. Default to 8 seconds.

public LightDutyShutdownTime LightDutyShutdownTime { get; set; }

Property Value

LightDutyShutdownTime

LowPowerOffEnabled

Low power off enabled. True as default.

public bool LowPowerOffEnabled { get; set; }

Property Value

bool

ShortPressToSwitchBosst

Short press to switch boost enabled. False as default.

public bool ShortPressToSwitchBosst { get; set; }

Property Value

bool

SwitchOffBoostBehavior

Switch off boost behavior. Default to long press.

public ButtonPress SwitchOffBoostBehavior { get; set; }

Property Value

ButtonPress

Methods

GetButtonStatus()

Gets the button status.

public ButtonPressed GetButtonStatus()

Returns

ButtonPressed