Hey There, I am new in robotics stuff, I have my dobot magician, I downloaded the source code “Dobot_for_Developers-master”, and started debugging on QT.
I removed all the error during debug, I run Dobot server, and after that Dobot Client, and it showing message that connected (connection between dobot server and dobot client), and when press on any button like J+, J-, X+, X- etc. the dobot arm is not moving a bit, I am not getting any error message at all.
one more thing that, In Code when the serial port open, the onDobotReadyRead() is not executing.
qDebug()<<"Port Name: "<<portName;
const int baudRate = COptions::instance()->getBaudrate().toInt();
//baudRate = 115200;
qDebug()<<"Baud Rate: "<<baudRate;
dobot = new QSerialPort(portName, this);
dobot->setBaudRate(baudRate);
dobot->setDataBits(QSerialPort::Data8);
dobot->setParity(QSerialPort::NoParity);
dobot->setFlowControl(QSerialPort::NoFlowControl);
dobot->setStopBits(QSerialPort::OneStop);
if(dobot->open(QIODevice::ReadWrite))
{
qDebug()<<“Port ready to read write”;
** connect(dobot, SIGNAL(readyRead()), this, SLOT(onDobotReadyRead()));**
return true;
}
else
{
qDebug()<<“read write == false”;
dobot->deleteLater();
dobot = 0;
return false;
}
void DobotServer::onDobotReadyRead(void)
{
qDebug()<<“dobot Connected now ready to read”;
QByteArray data = dobot->readAll();
// Currently we only support one tcp client
if (tcpClient) {
tcpClient->write(data);
}
}