mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-27 03:49:58 -07:00
768 B
768 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.
toString
Convert a number to string with an optional base.
Examples:
toString(123) // "123"
toString(123, 16) // "0x7b"