Skip to content

How use GetVBatt  #7

@wataruland

Description

@wataruland

Hello, how should this library be used to read the value in volts of a battery in pin A2, I have this:

VoltVCC = SystemStatus (). GetVCC ();
SystemStatus (). Pin_batt = PB4; // I tested with A2
VoltBateria = SystemStatus (). GetVBatt (VoltVCC);

I have the ATTiny is powered by 5v and the battery is 1.5v,
and if the function getVCC () works for me, but I do not know how to do it with getVBatt (). always returns 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions