Go Down

Topic: c++ visual studio form application serially reading data from arduino (Read 1 time) previous topic - next topic



iv made a c++ form application using visual studio. i want to read a string, serially printed/transmitted from my arduino mega and show the string on a text box in my form application. i have tried ReadLine() and a few other functions but I am unable to do so.

this is the arduino code:
Code: [Select]

String str;

void setup()

void loop()

i have inserted a text box and a button on my form application. i want the hello to be saved in a string and want it to appear on the text box.
(or if therez a way to serially read characters, that can do my job too)

need help with the c++ code for the form application for this :/ any kind of help will be appreciated!


I've not experimented with this class, but see if this might help:



need help with the c++ code for the form application for this

But you have not shown any code for the PC side.

Frankly, C++ is a crappy way to build forms applications that deal with the serial port (or that don't, for that matter).

C# makes developing forms apps so much simpler, and reading and writing from the serial port is trivial. Check out the attached application, if you want to go the easy route.
The art of getting good answers lies in asking good questions.


Thankyou econjack and PaulS for your help! i will surely try these methods

Go Up