I've found examples on the web for this- none of which are for C. Can anyone provide an example of a C program that scans a laptop's battery charge and writes that to a float value? I'm not at all sure how to go about doing this.

Thanks in advance!