: retval = arduino ()
: retval = arduino (port)
: retval = arduino (port, board)
: retval = arduino (port, board[, [propname, propvalue]*)
: retval = arduino (iaddress)
: retval = arduino (ipaddress, board)

Create a arduino object with a connection to an arduino board.

Inputs

port - full path of serial port to connect to. For Linux, usually /dev/ttySXXX, for windows COMXX.

board - name of board to connect (default is ’uno’).

propname, propvalue - property name and value pair for additional properties to pass to the creation of the arduino object.

Currently properties are ignored.

if the arduino function is called without parameters, it will scan for the first available arduino it can find and connect to it.

Outputs

retval - a successfully connected arduino object.

Properties

The arduino object has the following public properties:

name

name assigned to the arduino object

debug

true / false flag for whether debug in turned on

forcebuildon

true / false flag for whether to force show of the arduino IDE to reprogram the arduino

port (read only)

the communications port the board is connected to.

board (read only)

The name of the board type that the arduino connected to

libraries (read only)

The libraries currently programmed onto the board

availablepins

The pins available for use on the board

analogreference

The analog voltage reference

See also: scanForArduinos, arduinosetup.

Package: arduino