Experimenting With Light on Apple Laptops
venkatg writes "Soon after Apple introduced sudden motion sensors in their PowerBooks in early 2005, Amit Singh had shown how these sensors can be used for creative purposes (covered by Slashdot earlier as Having Fun With PowerBook Motion Sensors and PowerBook As A New Kind Of Human Interface Device). This time around Singh discusses 'Experimenting With Light' in a new article whereby by light he means the ambient light sensors and the illuminated backlight keyboard sensors in Apple's laptops. The article shows (source code is included) how one can measure ambient light and do things with it. It also shows things like how to get/set illuminated keyboard brightness and display brightness or do fade transitions of the keyboard lighting. So now that we have all these motion and light sensors under control, is there a MacBook discotheque in the works?"
Is it just one light, or can individual keys be lit up? You could do a lot more with it that way.
When the MacBook gets too hot. Honestly, I love Apple and their designs, but they tend to put TOO much engineering into one aspect of their computers and not in other areas. The MacBooks get way too hot, het they have a nice and completely useless ambient light detection hardware. Perhaps if this ambient light detection hardware was replaced with, say, another fan, then perhaps the laptops wouldn't become space heaters so quickly.
Lets focus on basic principles first before adding superfluous features like magnetic power cables (which my $20 electric tea kettle had 10 years ago BTW) and ambient light sensors.
Its great that Apple has an API to control the ambient light sensor and keyboard backlighting, too bad Apple can't find the time to make an API to make gaming a focus for Apple computers. They do CLAIM that Mac's are Funner then PC's, I just haven't seen the proof yet. I don't think making my keyboard fade in and out is as fun as, well, doing anything else!
I haven't thought of anything clever to put here, but then again most of you haven't either.
you could just use the built-in camera, which lets you measure not just light levels, but even light levels at hundreds of thousands of pixels!
I suppose the thing is that before Apple did it, there was no way of getting access to the sensor data. I have a laptop with tha hard drive sensor in it, but the sensor is claimed by the "ACPI motion sensor" driver. Instead, the Apple driver outputs a simple value accessible from userspace.
I know you can get accellerometer and other sensors for the PC easily, but they were usually external, and internal built in ones were usually hidden from software view. All it took was Apple to start making it easy to access the information...