mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-27 15:22:29 +03:00
58da27fa91
* Initial JS documentation * Spelling fix Co-authored-by: あく <alleteam@gmail.com>
813 B
813 B
Built-in methods
require
Load a module plugin.
Parameters
- Module name
Examples:
let serial = require("serial"); // Load "serial" module
delay
Parameters
- Delay value in ms
Examples:
delay(500); // Delay for 500ms
Print a message on a screen console.
Parameters
The following argument types are supported:
- String
- Number
- Bool
- undefined
Examples:
print("string1", "string2", 123);
console.log
console.warn
console.error
console.debug
Same as print
, but output to serial console only, with corresponding log level.
to_string
Convert a number to string.
Examples:
to_string(123)
to_hex_string
Convert a number to string(hex format).
Examples:
to_hex_string(0xFF)