C++ (Qt)QString str=QString::number(1)+QString::number(ui->horizontalSlider_servo1->value())+char(13);QByteArray data2; port->write(data2.append(str));