Arduino Toolkit - @arduino/arduino
- :
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, with the exception of:
- debug
true / false flag for whether setting debug (default false)
- forcebuildon
true / false flag for whether to force show of the arduino IDE to rebuild the installed code on the arduino (default false)
- baudrate (read only)
the communications baudrate to the board. (default 9600)
- libraries
The libraries to be enabled on the arduino board. (default uses whatever is already installed)
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 is 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.
- baudrate (read only)
the communications baudrate to the board.
- 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.