Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I having problem to add this code in the function in myprojectDlg.cpp. what should or how should i do it?

SerialPort arduino = new SerialPort(port);
if (arduino->isConnected())
{
int hasRead = arduino->readSerialPort(incomingData, MAX_DATA_LENGTH);
if (hasRead) printf("%s", incomingData);
else printf("Error occured reading data");
}

What I have tried:

i try added in the void CMPProject:: or CMPProject::CMPProject nothing since to work, please help thank you
Posted
Comments
Richard MacCutchan 30-Nov-18 10:25am    
"nothing since to work"
And we must guess what it is you think should work, and what is actually happening.
Have you used your debugger at all (on both systems) to see what is happening?
Member 14073069 30-Nov-18 10:28am    
yes, but still not wokring
Richard MacCutchan 30-Nov-18 10:34am    
Do you really think that "not working" actually means anything useful in terms of what is happening in your code?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900