UECIDE

|juˈekaɪdiːˈiː| :: Wake Up Your Arduino
Last edit: 2020-10-30 by matt

Builtin Command


UECIDE Scripts can make use of a large number of builtin commands. These are designed to make cross-platform scripting easy without having to rely on certain binaries being available. There are also a number of special commands that interact directly with UECIDE itself. All builtin commands are prefixed with __builtin_.

File operations

append

  • __buitin_append::filename::text

Append a line of text to a file

cp

  • __builtin_cp::from::to

Copy a file

write

  • __builtin_write::line[::line[::line[...]]]

Write multiple lines to a file. If the file exists it will be truncated first.

Messages

bullet

  • __builtin_bullet::text[::text[::text[...]]]

Add a top-level bullet point to the status console. Each item of text is separated by a space.

bullet2

  • __builtin_bullet2::text[::text[::text[...]]]

Add a second-level bullet point to the status console. Each item of text is separated by a space.

bullet3

  • __builtin_bullet3::text[::text[::text[...]]]

Add a third-level bullet point to the status console. Each item of text is separated by a space.

cout

  • __builtin_cout::text[::text[::text[...]]]

Output raw text to the status console. There are no spaces between each text item.

echo

  • __builtin_echo::text[::text[::text[...]]]

Output raw text to the status console. Each item of text is separated by a space.

error

  • __builtin_error::text[::text[::text[...]]]

Output an error message to the status console. Each item of text is separated by a space.

warning

  • __builtin_warning::text[::text[::text[...]]]

Output a warning message to the status console. Each item of text is separated by a space.

Scripting

delay

  • __builtin_delay::ms

Pause for a number of milliseconds

dot

  • __builtin_dot

Display a single dot on the status console. This does not start a new line. Subsequent calls to __builtin_dot will display dots horizontally.

ecma

  • __builtin_ecma::filename[::arg[::arg[...]]]

Execute a Javascript (ECMA) file within the current context. The function run() is called and is passed any arguments provided.

Note: this is deprecated due to the move to native C++ uecide-cli

exec

  • __builtin_exec::key

Execute a key in the current context.

foreach

  • __builtin_foreach::item[,item[,item[...]]]::variable::script

For each item in the comma-separated list, assign the value to variable and call the UECIDE Script script.

getauth

  • __builtin_getauth::prompt::variable

Request a password from the user prompting them with prompt and placing the password in variable.

set

  • __builtin_set::variable::value

Set a variable in the current context. This is the same as the set special directive.

loadjar

  • __builtin_loadjar::jarfile

Load a .jar Java file into the currently running VM.

Note: this is deprecated due to the move to native C++ uecide-cli

spin

  • __builtin_spin

Display a "busy" spinner in the status console. Each subsequent call to __builtin_spin will rotate the spinner.

push

  • __builtin_push::variable::value

Add a value to the existing array variable specified. This has the effect of appending value to the contents of variable separated by ::.

Buffering

stdin

  • __builtin_stdin::file::command[::arg[::arg[...]]]

Execute a command and redirect all the standard output to the specified file.

start_buffer

  • __builtin_start_buffer

Begin buffering mode. All output from subsequent commands will be buffered internally instead of being displayed.

end_buffer

  • __builtin_end_buffer[::variable]

End buffering mode. Any previously captured text can be optionally placed into variable.

Port control

port

  • __builtin_port::open::baud

Open the currently selected communication port at the specified baud rate.

  • __builtin_port::close

Close the communication port.

  • __builtin_port::print::text

Send the specified text to the currently open communication port.

  • __builtin_port::println::text

Send the specified text to the currently open communication port and terminate with a newline.

  • __builtin_port::pulse

Pulse the DTR and RTS signals of the currently selected port

  • __builtin_port::set::signal

Asserts the specified signal. signal must be either dtr or rts.

  • __builtin_port::clear::signal

De-asserts the specified signal. signal must be either dtr or rts.

  • __builtin_port::find::vid::pid

Wait up to 10 seconds for a new USB serial port to appear with the specified VID and PID. If a port is found it is placed in port.found.

lock_port

  • __builtin_lock_port

Attempt to lock the currently selected port.

unlock_port

  • __builtin_unlock_port

Unlock the currently selected port.

Networking

scp

ssh

Hardware

gpio

Programming

merge_hex

stk500v1

stk500v2

Support Us

Running this server costs money. This server not only hosts this website, but is also the main build platform for creating the download files for UECIDE. Just a couple of pounds (or Dollars, Yen, Mongolian tögrög... we're not fussy) can help to offset the costs.

Alternatively, if you want to be more personal, you could buy me something on Amazon. I have a small wish-list of low-cost items that I'd quite like to receive. Make it a surprise.


Latest WiKi Edits