Slashdot Mirror


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?"

6 of 120 comments (clear)

  1. How does the keyboard backlight work? by Ant+P. · · Score: 4, Insightful

    Is it just one light, or can individual keys be lit up? You could do a lot more with it that way.

  2. Re:Perhaps keyboard backlighting could flash by eko33 · · Score: 2, Insightful

    You didn't know MacHeat(TM) was a feature in and of itself? Just fold your book down and place your Starbuck's ® coffee mug on top of it. Vwa-la! Your coffee is hot for hours.

    Those mac guys are so clever.. and the PCs are so user friendly!

  3. Re:Perhaps keyboard backlighting could flash by iotaborg · · Score: 2, Insightful

    The thermal problem is something with the way the thermal paste is applied on the CPU, not the number of fans it has. Besides, light detection hardware, i.e. a photoresistor, costs pennies and fits on a screwhead.

  4. Re:Perhaps keyboard backlighting could flash by sheddd · · Score: 2, Insightful
    Lets focus on basic principles first before adding superfluous features like magnetic power cables

    That's one of my favorite features... I went thru 3 power supplies on previous laptop from tripping over the power cable...

  5. or... by m874t232 · · Score: 2, Insightful

    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!

  6. Re:The really 'amazing' thing is... by tlhIngan · · Score: 2, Insightful

    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...