mohanakrishnan
19th November 2009, 08:48
hi all
i am creating an application that received and sends data thru serialport.pls see the below code
if(comport->bytesAvailable())
{
long count =comport->bytesAvailable();
QByteArray comdata=comport->read(count);
comdata=comdata.toHex();
qDebug()<< comdata;
}
It displays the ascii value of sent data and displays the hexadecimal value,but i need them
in array of hexadecimal like below
byte data[];
data[0]=0x01;
data[0]=0xff;
so that i can check the arrays each position easily ??jus im tired by searching
can any one help me??
thanks in advance:crying::crying::confused:
i am creating an application that received and sends data thru serialport.pls see the below code
if(comport->bytesAvailable())
{
long count =comport->bytesAvailable();
QByteArray comdata=comport->read(count);
comdata=comdata.toHex();
qDebug()<< comdata;
}
It displays the ascii value of sent data and displays the hexadecimal value,but i need them
in array of hexadecimal like below
byte data[];
data[0]=0x01;
data[0]=0xff;
so that i can check the arrays each position easily ??jus im tired by searching
can any one help me??
thanks in advance:crying::crying::confused: