
Originally Posted by
Lesiok
So just use method putChar(char c). QExtSerialPort is a descendant of
QIODevice class.
iget the following error in this code part
char vf="0x00";
putchar(vf);
ports->write(putchar(0x00));
char vf="0x00";
putchar(vf);
QByteArray commands;
ports->write(putchar(0x00));
To copy to clipboard, switch view to plain text mode
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:120: error: invalid conversion from 'const char*' to 'char'
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:123: error: invalid conversion from 'int' to 'const char*'
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:123: error: initializing argument 1 of 'QByteArray::QByteArray(const char*)'
Added after 15 minutes:

Originally Posted by
hezbon
iget the following error in this code part
char vf="0x00";
putchar(vf);
ports->write(putchar(0x00));
char vf="0x00";
putchar(vf);
QByteArray commands;
ports->write(putchar(0x00));
To copy to clipboard, switch view to plain text mode
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:120: error: invalid conversion from 'const char*' to 'char'
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:123: error: invalid conversion from 'int' to 'const char*'
D:\Qt\embedded-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\..\embedded\mainwindow.c pp:123: error: initializing argument 1 of 'QByteArray::QByteArray(const char*)'
please dont look at the error i have done this and no error has been realized sorry i gotten rid of the errors here is my new code.
ports->putChar(0x00);
ports->putChar(0x00);
To copy to clipboard, switch view to plain text mode
now my problem is the lcd display is 8x6 matrix and is connected via serial and by default it displays a,b,c,d,..i and now i want to display my data using my laptop from my programm and am using serial to usb converter, when i send the above, i should see something because there is that command for the gadget, i want to do a heads up display of the number of people in a department, but after sending the command nothing clearly happens.
Added after 21 minutes:
please dont look at the error i have done this and no error has been realized sorry i gotten rid of the errors here is my new code.
ports->putChar(0x00);
ports->putChar(0x00);
To copy to clipboard, switch view to plain text mode
now my problem is the lcd display is 8x6 matrix and is connected via serial and by default it displays a,b,c,d,..i and now i want to display my data using my laptop from my programm and am using serial to usb converter, when i send the above, i should see something because there is that command for the gadget, i want to do a heads up display of the number of people in a department, but after sending the command nothing clearly happens.
Bookmarks