GP2X How Do I Get The Battery Level?


darionapole

Member
Joined
Jul 10, 2008
Messages
221
well as i get better with c++ i'm trying new things.

i read the source of the fw4.1.0 looking for the part where it reads the battery level with no succes.
As far as i know in the old gp2xs had /dev/batt which returned a number from 1000 to 0

is there any code sample, tip or anything on how to read the battery in the new models ?
 
@exo, tried with an inclinometer without succes, both batteries are at exactly 180°
@yaKC no, i already said that i have no /dev/batt in my f200
Code:
 sh-3.2# uname -a
 Linux open2x 2.4.26-open2x #21 Tue Mar 31 05:11:36 MDT 2009 armv4l  unknown
 sh-3.2# cat /dev/batt
 cat: can't open '/dev/batt': No such file or directory

i don't know what GPH did with the lastests f200s if it's hardware, software or what, but i dont' have a /dev/batt and can't understand how the fw 4.1.1 did to read the battery level

what i saw the source did was to read something from /dev/mmsp2adc and then didn't undestand anything.
 
well, i got better with C++ and now i did undestand the gp2xmenu's source code, and i also made a program to read the battery level, but sadly still from 0 to 3.
Anyway, googled some info and found this http://www.gp32x.de/board/index.php?/topic/40423-devbatt-doesnt-exist-on-f200-any-alternative/#entry883398

so let's continue there instead as i'm going to fix it :p
 
Last edited by a moderator:
Back
Top