Access the ambient light sensor on macOS
npm install ambient-light-sensorAccess the ambient light sensor on macOS in node.js.
npm install --save ambient-light-sensor
``javascript``
const als = require('ambient-light-sensor');
als(function(err, data) {
console.log(data.computedValue, data.rawValue);
});
ambient-light-sensor is released under the MIT license. See LICENSE for details.