Constructor
new ProcessedSensors()
- Source:
Example
import { ProcessedSensors } from 'iml-motion';
const processedSensors = new ProcessedSensors();
processedSensors.addListener(data => console.log(data));
processedSensors
.init()
.then(() => processedSensors.start());
Methods
addListener(callback)
Add a listener to the module.
Parameters:
Name | Type | Description |
---|---|---|
callback |
ProcessedSensorsListener | Listener to register, the callback is executed with an array containing the processed data from the sensors |
- Source:
init()
Initialize the sensors
- Source:
Returns:
Promise
removeListener(callback)
Remove a listener from the module.
Parameters:
Name | Type | Description |
---|---|---|
callback |
ProcessedSensorsListener | Listener to delete |
- Source:
start()
Start listening to the sensors
- Source:
stop()
Stop listening to the sensors
- Source: