<< cmd_servo_move | Arduino toolbox |

Arduino toolbox >> Arduino toolbox > open_serial

# open_serial

Command to initialize the serial port which is connected to Arduino

### Calling Sequence

    res=open_serial(nHandle, nPort,baudrate)

### Parameters

nHandle :

  Board number, reserved for future use. For this version, any number would do

nPort :

  Com port in which the Arduino is connected to

baudrate :

  baudrate for the serial comminication

res :

  0 if the connection is successful, else the connection fail

### Description

To connect to the Arduino board. To check the port number, do to the device manager or check it from the Arduino software

### Examples

    ok = open_serial(1,9,115200)
    close_serial(1)

### See also

- close_serial

### Authors

- Bruno JOFRET

Report an issue
<< cmd_servo_move | Arduino toolbox |