1

I'm adding some features to Open hardware Monitor. I have found a cool class for C# to read the battery info.

I need three (and maybe more in the future):
Battery temperature
Battery voltage
battery Life remaining.

Now I have found some classes for C# with this information. But how can I use those classes. I will use the battery class from Microsoft. (http://msdn.microsoft.com/en-us/library/microsoft.spot.hardware.battery(v=vs.102).aspx).

I does not get the class to work when I call it (can't call it).

Or if you guys have some C# api with battery info that I can use please let me know.

JimmyD
  • 2,629
  • 4
  • 29
  • 58
  • What did you try? What error did you get? – SLaks Mar 18 '14 at 17:37
  • 1
    The MSDN document you have linked is not for regular computers. It is for microcontrollers that run .Net micro framework. – David Mar 18 '14 at 17:38
  • Ok didn't know that's for microcontrollers tnx. But I can find the remaining life with PowerStatus class. But can't find anything for temperature and voltage. Do you know some source to read this information? – JimmyD Mar 18 '14 at 17:45
  • You should use `WMI`. See the link below: http://stackoverflow.com/questions/8945986/find-out-battery-status-in-c-sharp-or-net – SepehrM Aug 02 '14 at 14:04

0 Answers0