namespace public static
evothings. iotsensor
Source: evothings-libraries/
Top-level object that holds generic functions and sub-modules.
Namespaces
Methods
Namespaces
ble
instance
instance_ble
instance_settings
settings
Properties
public static
RAW
Constant identifying the IoT Sensor RAW project.
public static
SFL
Constant identifying the IoT Sensor SFL project.
Methods
public static
createInstance(type)
Public. Create an IoT Sensor instance.
Example
// Create a new IoT Sensor SFL instance
var iotsensor = evothings.iotsensor.createInstance(evothings.iotsensor.SFL);
Parameter
Name | Type | Optional | Description |
---|---|---|---|
type |
string |
|
String with type of sensor.
|
- Returns
-
evothings.iotsensor.instance or null if an object of the requested type cannot be created.
public static
currentTime() → string
Returns current time using new Date() in a readable string
Example
var time = evothings.iotsensor.currentTime();
console.log('Current time: ' + time);
- Returns
-
string
- Current time in hh:MM:SS.sss format