node-atbrightness
Node.js Integration for Advantech IIoT brightness function.
Notice that an Advantech IIoT Platform SDK have to be installed to make this node works correctly. Advantech IIoT Platform SDK download link is shown below: Windows: https://github.com/Advantech-IIoT/Platform-SDK/tree/master/windows/bin Linux: https://github.com/Advantech-IIoT/Platform-SDK/tree/master/linux/bin
Install
Use npm command to install this package locally in the Node-RED modules directory
npm install node-atbrightness
or install it globally with the command
npm install node-atbrightness -g
Usage
Brightness provide four functions in this module.
- Get Brightness Values (Maximum, Minimum, and Current Values)
- Set Brightness Values (Maximum, Minimum, and Current Values)
- Check Auto Brightness Status
- Set Auto Brightness
Example
Please refer demo.js
.
All these examples are started with:
var brightness = ;
Get Brightness Values
This sample prints the all of the brightness status.
// Get the Minimum Brightness Valueconsole;// Get the Maximum Brightness Valueconsole;// Get the Current Brightness Valueconsole;
Set Brightness Values
If the value you input is not between brightness.getbrightnessmin()
and brightness.getbrightnessmax()
, it will output a number--50
.
console;
Check Auto Brightness Status
Output value:
- 0: Set Brightness Manually
- 1: Set Brightness Automatically
- 50: Not Support
console;
Set Auto Brightness
Return value:
- 0: Set Brightness Manually
- 1: Set Brightness Automatically
- 50: Not Support
// Auto Brightnessconsole;// Manually Brightnessconsole;
Test Platform
- Windows 10 Enterprise LTSB with node.js 10.15.3
History
- 1.0.0 - November 2019 : update for NODE_MODULE_VERSION=64
- 0.1.7 - October 2017 : Initial Release
License
Copyright 2019 ADVANTECH Corp. under the Apache 2.0 license.