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

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

    1. Re:How does the keyboard backlight work? by Anonymous Coward · · Score: 1, Insightful

      Everyone: I can take sentence fragments out of context to make a lame joke.

      Dumbass...

  2. Perhaps keyboard backlighting could flash by TheSkepticalOptimist · · Score: 1, Insightful

    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.
    1. Re:Perhaps keyboard backlighting could flash by Anonymous Coward · · Score: 0, Insightful

      ...too bad Apple can't find the time to make an API to make gaming a focus for Apple computers.

      Yeah, god forbid someone try to do some actual work on their laptop! Y'know, some people do have to work on darkened movie/tv sets, or dark classrooms, or any number of other dark places. Except you're too busy to notice that people are actually getting things done out there. All you want to do is pway your widdle games...

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

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

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