I am using an AL5A Robotic arm. I would like to open the serial port using the C++ programming.

My group partner and I have tried to look for a command to open the serial port. But in vain. We can do it in Matlab where we define and use the command serial to open the serial port as:

S= serial('COM1', 'BaudRate', 115200);
A=[35 48 80 49 49 53 55 84 48 48 48 13];
fprintf(S, A);

Those are the ASCII codes we need to send to the Servo motors of the robotic arm.

I was wondering if there's a similar way of doing it in C++? If so, how? and what header files do we need? Please let me know.