Why is the Ambient Light sensor showing 0, and never updates? RRS feed

  • Question

  • Hello.

    I'm trying out the Windows 7 Sensors API, using .NET. When reading the ambient light sensor (the only one I have acces to), I only get zeroes, and a timestamp from when the computer was rebooted. Do you have any tips what might be wrong?

    Background: I use the .NET Sensor interoperability framework. Enumerating all sensors, properties, etc., work. So does the synchronous readout, it seems (i.e. no exceptions are thrown.) I've enabled the sensor in the Control Panel, and I receive the StateChange event without problems. I also set the ReportInterval to MinReportInterval. (MinReportInterval is 4. What is the unit for this?)

    However, I never receive the DataUpdated event, even though the sensor state is Ready. When reading synchronously, I only get:

    2011-03-14 23:15:00 
    Light: 0 lux 
    Light, Chromacity: [0; 0; 0; 0; 0; 0; 0; 0] 
    Light, Temperature: 0 K 
    Timestamp: 2011-03-14 21:11:23 

    Thanks in advance,
    Peter Waher

    Monday, March 14, 2011 10:27 PM

All replies