Load a module plugin.
Parameters
Examples
Parameters
Examples
Print a message on a screen console.
Parameters The following argument types are supported:
Examples
Same as print
, but output to serial console only, with corresponding log level.
Runs a JS file and returns value from it.
Parameters
Examples
Convert an ASCII character number to string.
Examples
Exit JavaScript with given message.
Examples
Convert a string to number with an optional base.
Examples
Convert a number to string with an optional base.
Examples
Fields
Creates an ArrayBuffer
that contains a sub-part of the buffer.
Parameters
Examples
Wrappers around ArrayBuffer
objects, with dedicated types such as:
Uint8Array
Int8Array
Uint16Array
Int16Array
Uint32Array
Int32Array
Fields
ArrayBuffer
Fields
Removes elements from the array and returns them in a new array.
Parameters
Examples
Adds a value to the end of the array.
Examples
Fields
Returns the character code at an index in the string.
Examples
Same as String.charCodeAt()
.
Return index of first occurrence of substr within the string or -1
if not found.
Parameters
Examples
Return a substring between two indices.
Parameters
Examples
Transforms the string to upper case.
Examples
Transforms the string to lower case.
Examples
Path to the directory containing the current script.
Examples
Path to the current script file.
Examples
Checks compatibility between the script and the JS SDK that the firmware provides.
Returns
"compatible"
if the script and the JS SDK are compatible"firmwareTooOld"
if the expected major version is larger than the version of the firmware, or if the expected minor version is larger than the version of the firmware"firmwareTooNew"
if the expected major version is lower than the version of the firmwareExamples
Checks compatibility between the script and the JS SDK that the firmware provides in a boolean fashion.
Examples
Asks the user whether to continue executing the script if the versions are not compatible. Does nothing if they are.
Examples
Checks whether all of the specified extra features are supported by the interpreter.
Examples
Checks whether all of the specified extra features are supported by the interpreter, asking the user if they want to continue running the script if they're not.
Examples