Is there a way to programmatically detect if the Pokitto is charging?


#1

I know there’s a few functions for interfacing with the Pokitto’s battery
(which seem to be at least semi functional),
but is there any way to test if the Pokitto is currently charging?


#2

Could that question be related to something else that might need to know if it’s charging to display something? :stuck_out_tongue:


#3

Not unless you monitor the battery voltage and detect it going up


#4

I might give that a go at some point to see how accurate it is.
It’s a shame there isn’t a simpler way, but it’s no great loss.


#5

Its not a bad idea and could be implemented in a future revision

Why exactly are you interested in being able to detect it?

EDIT: actually… we should be able to detect the presence of usb connection


#6

Just to be able to display a ‘charging’ icon on the screen.
(I know there’s already a light for that, but an icon would be cool.)

Good point. That would sort of work too, since a USB connection would almost certainly be piping power in.


#7

Probably only if there’s a data link. I don’t think USB could detect a power only charger.