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?"
MacBooks, computers for the disco generation.
Now we can finally communicate with the aliens!
(end of post)
Is it just one light, or can individual keys be lit up? You could do a lot more with it that way.
(mumbles to self...) Let's see... motion sensors, ambient light sensors, lots of indicator LEDS, backlit keyboard. Yep, we've got everything we need!(/mumbles)
Coming soon, from a black-hat hacker near you:
Siezure-O-Rama 1.0 !! Now, with 38% more unconsciousness!
It would be pretty cool if someone wrote a program that makes your keyboard randomly blink a la The Original Star Trek (or many other 60's sci-fi shows). Am I the only one that's still impressed by random flashing lights on a computer? I know... I'm easily ammused...
The WiiMac?
You joke, but I've had more than one friend who seized or stroked out due to to flashing/strobe lights. it's a serious situation, one that I'm happy to collect volunteers to test the viability of.
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.
With this, assuming that each key has a light associated with it, one could do the same thing with a whole keyboard.
And for those who don't have any issues with being violent towards their computers, you could reset it a la Etch-a-Sketch with the motion sensor.
Take it to the limit, everybody to the limit, come on, everybody fhqwhgads.
.... I don't think this article is here as another "Oooh.... the Macbook and Steve Jobs are awesome!" story. The intriguing part is how its users are "thinking different" to an extent Apple themselves didn't seem to. Already, people have taken the relatively boring "sudden motion sensor" that Apple only thought of implementing to help prevent hard drive crashes, and used it for a motion-sensing laptop security system, to roll marbles around in maze games by tilting the laptop, and even to switch virtual desktops by lightly tapping the left or right-hand sides of the machine to "bump" the desktop over one direction or the other.
Now, they're tackling the ambient light sensors, which again, serve a relatively "boring" (if still useful) purpose. I'm intrigued to see what imaginative people will end up doing with this one too. For starters, I could envision some usefulness in things like making the backlit keyboard blink in a repeating pattern to indicate completion of recording in certain audio programs. (Many recording studio environments are kept dark so you can easily see all the readouts on the displays of the equipment while working. Macbook Pros are going to be popular in these environments, and it might be nice to get a subtle indication it finished transcoding or recording some audio - even if the display went blank due to a screen saver?)
>> But cannibalism is illegal in North Korea, so cannibals are summarily dragged into the street and shot in broad daylight in plain sight of everyone to serve as a lesson. And we're sitting here happily slapping our sausages over some blinky lights.
Torrent?
As soon as the light dims, iTunes will automatically start the Barry White playlist and some soft porn starts to play via Front Row. All that is left for you to do is to hug yourself and cry yourself to sleep, feeling oh so lonely, lonely, lonely.
I saw a video of the sudden motion sensor being used to switch desktops and it looked really great. Good luck to anyone who thinks they can do something useful. Someday we could all benefit.
I also find it interesting that sudden motion sensors were available on Thinkpads before Powerbooks but I never heard of people using them in different ways. That's a pretty good advert for Apple. Sums up the image that Apple put out much better than those TV ads.
the more they over-think the plumbing the easier it is to stop up the pipe
Fantastic, I wanted to know how to do this so i could write a new mail indicator. Lots of itme i dont like my macbook to speak, so now i can write a script to pulse the keyboard backlights when i get mail. Brilliant, they are bright enough to blind bats so should be quite effective.
The backlighting isn't something that was invented for the new Macbooks. It's been on the PPC-based powerbooks (that had no heat problem) for at least 2-3 years. Transferring it to the MacBookPros was pretty much a zero-engineering proposition.
Honestly, shut up until you know what you're talking about.
This space for rent.
...that this shit has been around as components for PCs (the 'IBM' kind, I know a Mac is a PC) for a long time now. Yet nobody's been running out to buy these as extras to have this sort of fun with. The only thing 'Apple' should be credited with is adding them out of the box indeed... it's the users who are finally having fun with it, because it's there without having to pay extra and attach devices.
That said.. those new SONY VAIOs (OMG ROOTKIT PONIES!) have a fingerprint reader built-in... c'mon VAIO users, hop to it, 'Think Different', and make Slashdot's front page.
I should hope not. I don't think many non-Apple-zealots will be impressed with blinky lights.
I love that phrasing! Translation - you're trying really really hard to make this out as not being a completely pointless thing to be working on. You almost succeded too - props.
With a little effort, we can swap out these weak lights with high-intensity lasers! I've always wanted a lappy with a "Real Genius" death ray. Plus, I could use it to make popcorn.
Slashdot Burying Stories About Slashdot Media Owned
Comment removed based on user account deletion
Just an observation, as nobody has mentioned it, this is not restricted to just Macs. Some, if not all, of the new Sony Vaio laptops incorporate this to minimize damage to the hard drives if a light physicsl shock to the system occurs.
:)
If you shake it like an etch-a-scetch you get a window that pops up and tells you the heads are being moved to a safer place or something similiar. The one I saw doing it had an Intel core duo chip in it. A fine piece of machinery. Until something simple broke in the mouse touchpad that made the laptop unusable. But that hard drive wsa safe
auto screen lock - if laptop is not moved for X seconds, lock the screen - analagous to someone using on their lap putting it down on a table
burglar alarm - if laptop is moved, send a distress call
intruder detector - if a beam of light shone onto light detector flickers, then intruder detected
Erling Ellingsen has also been playing with the sudden motion and ambient light sensors. He hacked a Virtual Desktop tool, where you have to hit the laptop, or put your hand over a sensitive area, in order to change desktops.
l
http://blog.medallia.com/2006/05/smacbook_pro.htm
We all knew that Apple users were already "way cool" and this will put them over the top. There's no way we can compete now.
I don't read your sig. Why are you reading mine?
Obviously the solution is for the law-abiding citizens to eat the dead cannibals!
Oh wait...
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
My PPC PowerBook was getting hot. Hot enough to fry eggs. Eventually I got fed up. Something had to be wrong. I mean, it was nice in the winter when I kept the heat down to save $ but I had a cold -- just hug the laptop. Come Spring, I was afraid the fan would melt.
;)
:) If you're running Neverwinter's Nights on a laptop, it's going to get hot. My fans get spinning if I have a lot of apps (over 15 or 20) open, or I'm running the Adobe suite and editing large photos. It heats up during huge (30GB) disk transfers, etc. That's to be expected. Make sure your dashboard apps are up-to-date also! They're supposed to sleep when the dashboard is shut.
;) When you start up iDVD/iMovie, it's gonna crank up the heat. I know it's rather tempting to replace a desktop with one of these, but you can't squeeze as many fans in the case, and you only have about 1" height on the case for fan openings -- and it would be sucking in as much dust as it's letting hot air out.
Turned out I had a plug-in in my Mail.app (a junk mail filter program I wasn't using anyway, but I installed and left there like a busy doofus) that was running the CPU AND making it take forever to mark email as junk, or to quit the program. Solved two problems by uninstalling the bugger... now my fans aren't running constantly, the CPU/disk temperatures are normal, and it takes at least 1/4 the time to deal with my email. I can put my laptop on my lap again without burning my thighs. I'll reinstall the plug-in in the winter
I didn't have problems with heat on my old iBook 600mhz, and I no longer have problems with the PowerBook. Check your 'top' and what's running your cpu constantly, and keep in mind that laptops aren't gaming machines!
Apple mainly makes laptops to be laptops.
---- I'm out of your mind!
I have the game. It's called Lights Out. Here is the manufacturer's page (it's made by Tiger), and here is an interesting page about it.
ttuttle is a rankmaniac
The MacBooks don't have a lit keyboard or an ambient light sensor, only the MacBook Pros do.
where's all that Karma?
Macbook inferno
http://www.CelloFourteGroupie.net
Well the obvious solution is to start hunting and eating the police for food.
At least it would make things interesting. Certainly from an enforcement aspect.
How about hooking up two computers with spotlights (or lasers?), then have them use the spotlight to send a messages that the other computer detects with the light sensor. You could set up a network, possibly over quite long distances. It might be a little slow and limited to line of sight, but how cool would this be!?!
Didn't George Romero already make a movie about this?
is already there. And they can take a picture of the theft too.
There is a spark in every single flame bait point.
cause last time I checked the percentage of power book owners in the laptop sector was less than 7%, and on top of it the people interested in making their PowerBook do flipflops and 'interesting' things with motion sectors and light sensors has to be about 1-2% (at best, maybe).
I smell updates for all popular Mac GBA emulators coming :-)
Finally, a properly emulated version of Boktai for Macs! Or maybe even an official Mac version? One can dream, can't one? :-)
"Lets focus on basic principles first before adding superfluous features"
I agree. Not having Windows on your computer, that's a good start.
* Game Over * High Score: 264,846,927 -- Your Score: 14
So, instead of bashing one camp or the other, how about some ideas of how to use this technology.....
With the ambient light sensors, you could display an image on the screen and adjust the lighting acording to the ambient light (there were left and right sensors). You could even turn your computer into a sundial (ever post needs a link to the Wiki, so here's mine: http://en.wikipedia.org/wiki/Sun_dial). Point your notebook due north and check the time. Too bad the motion sensor didn't include an electronic compass like in my car.....
Layne
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!
We already have lightsabers, wouldn't it be nice if we had mind tricks too? You'd just wave your hand over the sensor and the mac would do anything you asked.
So now that we have all these motion and light sensors under control, is there a MacBook discotheque in the works?"
Consider, for a moment, the traditional Mac user. These are often very smart, very intellectual people. They enjoy culture, fine achievements and the arts. They enjoy long philosophical discussions that, whilst boring to many others, are deeply important to them. They prefer an environment that isn't necessarily the most competetive but has a reassuring sense of doing everything right rather than rushing through the modern world and all the kludginess that seems to bring with it. They enjoy sitting in coffee houses, where their apple logo is even more of a lifestyle symbol than a starbucks cup, and working on worthy novels.
In short, they are society's university lecturers.
Do we really need to give them a faculty disco?
Duh! Both!
whereby by? if you are not going to use this word correctly, why use it at all? maybe 'in which' would be easier for you.
First developer to make a MacBook do this will receive 1,000 points, and quite possibly the Coolest Mac App of the Year award. :-)
-Rob
Biblical fiscal responsibility
Oh, yeah, forgot all about that. I'll go ahead and fix North Korea on my way home from work. Thanks for reminding me...I need to pick up some butter, too.
Jackass.
Why yes, I AM a rocket scientist!
Shocking!
Bonsai Kitten: TNG
I'd pay for a sensor that would accurately, automatically adjust my diplay's gamma correction to the lighting of the room.
What do they do with the bodies? Because that'd be a lot of meat going to waste...