Mac programmer Amit Singh, who in February figured out how to access and manipulate the motion sensor in Appleis laptops, has published an explanation of the ambient light sensor also found in the companyis latest portables. The ambient light sensor detects the amount of light in a room and brightens the laptopis keyboard as needed.
Apple has not published any APIs for programmers to use when accessing the motion or ambient light sensors. Working with his MacBook Pro, Mr. Singh has figured out how to retrieve readings from the ambient light sensor, retrieve and set the backlit keyboardis brightness value, configure a fade to a target brightness, and retrieve and set the displayis brightness.
Mr. Singh provides code on his blog so that other programmers can replicate his work. He only tested his programs on his laptop, however, so he is unsure if they will work with Appleis other portables.
Thanks to MacNN for the link.