Visual Studio 2010 C++ Serial Port Tutorial Part 1

preview_player
Показать описание
I finally got a chance to do a complete vs c++ tutorial series for serial com port. You can
download the example code at source forge

download the test 3.7z file for the C++ code

If you want the example from this video:

Let me know if you have any questions. BTW, I think C# is much easier to use than C++ inside the VS IDE.
Рекомендации по теме
Комментарии
Автор

Check out our new podcast on work, life, money, and everything in between for the working professionals!

KelvinLeUT
Автор

Hi,
Thanks for this Tutorial.
I tried this Tutorial (along with its part2 and part3) with Visual Studio 2012 professional running on Windows 8. 
The drop down box of COM Ports is not working. I mean even after doing all setting mentioned in this tutorial for findPorts(), etc. there is no option to choose COM12, COM13, COM7. 
Apart from this others (even from part2 and part3) seem to be working.

As further process(button) depends on this, there is no success.

What could be the possible solution?

fakhruddin_shekh
Автор

modify this two sentence
and then comobox1 will display the serialPort name

//get port name
array<Object^>^ objectArray =
//put port name in combox1

evrtvwx
Автор

If your card has the 9 pin sub-d then you need to get a USB to Serial (RS-232) Adapter. The USB can be connected to your computer USB port and the RS-232 to your electronic card. VS VB will also work similar to how VS C++. See my other video (C# serial hardware setup) where I discuss the various adapters available on the market.

Good Luck

KelvinLeUT
Автор

you will need to open up two ports and use threading to send the messages simultaneously. The easiest way is to send the messages consecutively if timing is not critical.

KelvinLeUT
Автор

Excellent, just what I needed.

But please, move your speaker away from your microphone. ;)

DemonDNF
Автор

Sorry for the confusion. Try clicking on the browse all files and you will see "test 3.7z"
Download that. That should be the C++ solution.

KelvinLeUT
Автор

Thanks for your teaching, it really works with your method!

deanyang
Автор

When I click the COM pots button there is no com ports listed?

tnhkzmfreedom
Автор

Thanks Kevin this is what I was looking for.

SRIRAMVAMSI
Автор

That was really helpful. but I got this error, Ports is not a member of System::IO
do you have any idea how to solve this one
PLEASE

ababah
Автор

Is there a way to visualize the data incoming thru the port? I'm my case I've connected a receiver antenna and would like to see data.

juanbautista
Автор

Dude you r grt...u made a fan rite nw....thanx a lot..

SunilRaya
Автор

This is a great tutorial! 
How to create a Send button, when you type text into a text box immediately to appear in the second text box when you click send, all in connection with the serial port?

DreamInterpretation
Автор

Hi sir . Are you VietNamese? If it was right, i feel so great . Your videoclip is so useful for me .Thank you very much .Hope you always succeed in your career

nguyentruongan
Автор

i've got a problem: visual found port for example COM5i not COM5... why? when i choose COM5i, visual gave me a message "COM5i doesnt exist" what should I do to resolve this problem?

ukcioo
Автор

hmm
i used to be able to read off a gps with VS
again first read the output with putty to see if the mcu is output
data at the right baud rate

KelvinLeUT
Автор

Very nice. Congratulations on your vídeo.

fernando
Автор

Sorry for my silly question, I´m new on programming, but on the string array<Object^>^, what does " ^ " means?
Thanks in advance to all that will help me to understand. 🙂

TheRavasios
Автор

i think this easy>>
foreach (String s in
{
comboBox1.Items.Add(s);

}

manochDiy