Skip to content

Conversation

@zachstence
Copy link

Expected behavior:
Inkplate.readBattery should read the battery level of an Inkplate 6 Color

Actual behavior:
The following error occurs:

Traceback (most recent call last):
  File "<stdin>", line 22, in <module>
  File "inkplate6_COLOR.py", line 467, in readBattery
AttributeError: type object 'Inkplate' has no attribute 'VBAT_EN'

Problem:
The GPIO pins were not being correctly initialized for reading the battery.
The readBattery function was not correctly using the PCAL6416A class

Solution:
Initialize GPIO pins for reading battery
Update readBattery function to properly read the voltage
Add a comment explaining the battery voltage calculation equation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant