Skip to content

Fix Inkplate 6 Color battery reading#21

Closed
zachstence wants to merge 2 commits intoSolderedElectronics:devfrom
zachstence:feat/read-battery
Closed

Fix Inkplate 6 Color battery reading#21
zachstence wants to merge 2 commits intoSolderedElectronics:devfrom
zachstence:feat/read-battery

Conversation

@zachstence
Copy link
Copy Markdown

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

@JosipKuci
Copy link
Copy Markdown
Member

Hello @zachstence,
I am very sorry that your PR was ignored for so long, we are currently in a restructuring of the micropython module and thus i am unable to merge this.
Best regards,
JosipKuci

@JosipKuci JosipKuci closed this Apr 17, 2026
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.

2 participants