NAME

Device::Firmata::IO::SerialIO - serial port interface to Firmata device

METHODS

open ( serialPort , [opts] )

Establish a serial connection with a Firmata device. The first parameter is the name of the serial device connected with the Firmata device, e.g. '/dev/ttyUSB0' or 'COM9'. The second parameter is an optional hash of parameters for the serial port. The parameter baudrate is supported and defaults to 57600. Returns a Device::Firmata::IO::SerialIO object. Typically called internally by "open ( serialPort , [opts] )" in Device::Firmata.

attach ( serialPort , [opts] )

Assign a Device::SerialPort (or Win32::SerialPort) as IO port and return a Device::Firmata::IO::SerialIO object. Typically used internally by "open ( serialPort , [opts] )" method.

data_write ( buffer )

Send a bunch of data to the Firmata device. Typically used internally by Device::Firmata::Platform.

data_read ( numBytes )

Fetch up to given number of bytes from the serial port. This function is non-blocking. Returns the received data. Typically used internally by Device::Firmata::Platform.

close ( )

Close serial connection to Firmata device.

SEE ALSO

"attach ( ioPort )" in Device::Firmata::Platform