AmbientLightSensor

A library by Martin Raedlinger for the programming environment processing. Last update, 12/03/2008.

The AmbientLightSensor Library is based on Amit Singhs experiments with the »Ambient Light Sensor« and provides an interface to the sensor which is built-in in every MacBookPro. Originally the sensor is intended for adjusting the keyboards and displays brightness depending on the ambient lighting conditions.

As Apple has changed the API for kernel calls sligthly and the old method is deprecated, this release of the library probably won't work with a prior OSX Version than 10.5 (Leopard). If this is the case you can always replace the libLmuTracker.jnilib (in the library folder) with the JNI file provided in the old library release available at http://blog.formatlos.de.

Download

Download AmbientLightSensor version 1.0 in .zip format.

Installation

Unzip and put the extracted AmbientLightSensor folder into the libraries folder of your processing sketches. Reference and examples are included in the AmbientLightSensor folder.

Keywords Apple, MacBookPro, Ambient Light Sensor, Processing, JNI

Reference. Have a look at the javadoc reference here. a copy of the reference is included in the .zip as well.

Source. The source code of AmbientLightSensor is available at google code, and its repository can be browsed here.

Examples

Find a list of examples in the current distribution of AmbientLightSensor, or have a look at them by following the links below.

Tested

Platform Mac OSX 10.5
Processing 1.0.1
Dependencies libLmuTracker.jnilib