You can find a piece of code that does it if you go to
and search for "battery".
The deVBuzz website is dedicated to eVB and has its own forums and tutorials. I
have found it very helpful.
How can I find out within a program how much charge the battery has?