Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
Here you go.
let's try and figure that out.first, when we get a random class off the internet, we suppose it's a simple, raw, algorithm or API usage. so we don't use any GUI.is your project supposed to be a GUI program?WinMain is the equivalent of main() in a console program.
SFile mySerial
mySerial.open(1,9600)
No, I simply let values scroll in a console terminal.I don't want to be a nuissance, but if you don't know how to adapt a console class to a GUI class, you should definitely learn some C++.I've tested the class in a console environment. There was one instance when I haven't done that, using openGL for drawing samples and I haven't found a single problem.Take steps to meet all the requirments imposed by your GUI framework: having a winmain, or using a macro to implement the graphic env, or whatever it asks for (i'm not familliar with openCV).You can't simply add my file (main.cpp) into your project and expect it to work, since my file has a main function and it prints data to cout. You'll have to use the main function of your graphic env (which will generate winmain, anyway), instantiate a class Code: [Select]SFile mySerial, open it (Code: [Select]mySerial.open(1,9600)) and then graph or show all the data you'll read using a label, button or whatever your GUI permits.
Izua
please post your main() and be sure to use include guards. looks like a idempotence problem to me.
this depends a lot on how are you receiving your data.explain me the format the electronics send data to the port.what library are you using to plot the graph?
char gigi[50]="testing testing..\n"; char *p; p = &gigi[0]; while (*p != 0) { com.WriteByte(*p++); }