9.1 General Functions

9.1.1 arduinosetup

: retval = arduinosetup ()
: retval = arduinosetup (propertyname, propertyvalue)

Open the arduino config / programming tool to program the arduino hardware for usage with the Octave arduino functions.

arduinosetup will create a temporary project using the arduino IDE and allow compiling and programming of the code to an arduino.

Inputs

propertyname, propertyvalue - A sequence of property name/value pairs can be given to set defaults while programming.

Currently the following properties can be set:

libraries

The value should be the name of a library, or string array of libraries to program on the arduino board.

arduinobinary

The value should be the name/path of the arduino IDE binary for programming. If not specified, the function will use getpref preferences of arduino.arduino_binary, and if not found, the function will attempt to find the binary itself.

If provided, the value will be saved to preferences for future calls.

Outputs

retval - return 1 if arduino IDE returned without an error

See also: arduino, __arduino_binary__.

9.1.2 isarduino

: retval = isarduino (obj)

Check if input value is an arduino object

Function is essentially just a call of retval = isa(obj, "arduino");

Inputs

obj - The object to check

Outputs

retval is true, if obj is an arduino object, false otherwise.

See also: arduino.

9.1.3 listArduinoLibraries

: retval = listArduinoLibraries ()
: retval = listArduinoLibraries (libtypes)

Retrieve list of all known arduino library modules that are available.

Inputs

libtypes - optional specifier for type of libraries to list.

Options are:

all

List core and addons

core

List core only libraries

addons

List addons only

When no libtypes is specified, all libraries are shown.

Outputs

retval is an cell array of string library names that are available for programming to the arduino.

See also: arduino, arduinosetup.

9.1.4 scanForArduinos

: retval = scanForArduinos (maxCount)
: retval = scanForArduinos ("debug")
: retval = scanForArduinos (maxCount, type)

Scan system for programmed arduino boards.

scanForArduinos will scan the system for programmed arduino boards and return at most maxCount of them as a cell array in retval.

Inputs

maxCount - max number of arduino boards to detect. if maxCount is not specified, or is a less than 1, the function will return as many arduino boards as it can detect.

type - optional board type to match. If specified, the board type must match for the arduino to be added to the return list.

"debug" - if single input parameter is "debug", the scanForArduinos will display debug information as it scans all available ports for arduinos.

Outputs

retval structure cell array of matching detected arduino boards.

Each cell value of the cell array will contain a structure with values of:

port

the serial port the arduino is connected to

board

the board type of the arduino

See also: arduino.


Next: Arduino Functions, Up: Function Reference   [Contents][Index]