Io Reference







Apple   /   AppleExtras   /   AppleSensors





A singleton which on Apple computers can:
  • get and set display and keyboard brightness
  • read left and right ambient light sensors (laptops only)
  • read accelerometer sensor (laptops only)
Example use;
	
sensors = AppleSensors clone
value := sensors getRightLightSensor
 
 
 



getDisplayBrightness

Returns a number for the display brightness.
getKeyboardBrightness

Returns a number for the keyboard brightness.
getLeftLightSensor

Returns a number for the left ambient light sensor.
getRightLightSensor

Returns a number for the right ambient light sensor.
setDisplayBrightness(aNumber)

Sets the display brightness. Returns self.
setKeyboardBrightness(aNumber)

Sets the keyboard brightness. Returns self.
smsVector(aVector)

Sets aVector to the current x, y and z accelerometer values. Returns true on success and false on failure.