Visual Basic Serial COM Port Tutorial (Visual Studio 2010) - Part 5

preview_player
Показать описание
download the source code:
Рекомендации по теме
Комментарии
Автор

Absolutely fantastic tutorial, spent the last 8 years locked into embedded programming and forgot how easy vis basic can be, but also how hard it can be too. Thanks for the help very much appreciated.

TheForbinone
Автор

Run your Putty application. On the radio buttons select SERIAL the com port and speed of your device will be display on the Putty Text box, click on OPEN, the command Prompt for Putty will open, you can then intermittently use a wire to link the RX pin 2 of DB9 serial connector to pin 5, the link will not be permanent just by touching RX and Pin5 fast enough you will see a series of text appearing on the Putty command prompt, that means that the data is flowing through the RX Pin.

uchenwoko
Автор

Awesome!! Thanks. This got me over the problems I was having with the receiving. I was running into threading issues and the handler works great!

misperry
Автор

It's necessary to connected an adapter to the computer to use the port.
My program did not show any message at the output textbox, so I tried using one more pc  with hyperterminal and finally it could communicate each other.

It works great!!!
What I did was communicate two pc's, one pc with my VB program and other pc with Hyperterminal (I downloaded a free version from internet)

secremarco
Автор

This was an amazing series....it really helped me in building applications to connect with my Arduino...you sir are a lifesaver!!
Thanks a lot...
- just another noob dev

RupavaBaruah
Автор

thanks Kelvin,
for those who have problem with 
 SerialPort1.PortName = portComboBox.Text
or
 SerialPort1.BaudRate = baudComboBox.Text
just remember to plug in the device (for me it's my galaxy s3 phone) and before clicking "init" choose a port name and a baud rate!   

hadarszostak
Автор

Thanks to the author. Your lesson helped a lot. Continue in the same direction.

andrewhryvachevskyi
Автор

hey, i tried as you describe (connect the Tx andRx ) and it works. Now it displays what i typ. I tested it with putty and your program and it works in both cases. Thanks for all :)

TheMedek
Автор

отличное видео, автору спасибо, все работает.

Simonhmln
Автор

i believe I only used one usb-serial converter in this video.
you can connect the TX to RX using a jumper cable (i had a female to female jumper)
try open the port using Putty only and when you type it should display what you just typed. This will let you know if your com port is good. If you have two converters then you can use VS as the TX and Putty as the RX. Let me know how it goes.

KelvinLeUT
Автор

to debug with Putty: open up two putty serial terminals to com10 with same baud rate. Try typing in one screen and see if you get anything on the other screen. That will tell you if your hardware is OK. Go from there.

KelvinLeUT
Автор

The code for that line is

Me.outputTextBox.Text &= [text]

The & goes before the =

Bovaz
Автор

Hi Kelvin, great tutorial. Do you know if the output textbox can be made auto scrollable? When you send multiple commands a slider bar appears but it doesnt automatically scroll to the latest sent command.

Hartsai
Автор

it's a usb to uart adapter
you can get it on ebay for 3 bucks

KelvinLeUT
Автор

good tutorial, Now that I am getting my data into the computer, how do it parse it out to the proper text boxes ? A video on that would be great, I am new to VB and am struggling.

jamescullins
Автор

GREAT TUTORIAL!!! I LOOOOVE YOU DUDE!  

joelpizarro
Автор

First of all, I'd like to say that these tutorial are pretty good.
I don't wan't to bother you with too many questions, but since you've been so kind answering question before, I guess it is O.K to ask you one more.
Why Visual Basic does not understand the command printf("\f") and keeps showing the message in the next line instead of just flashing it on the screen like Hyper terminal does?

SafeAndEffectiveTheySaid
Автор

What a difference one curly bracket can make !!!

lindsayrobertson
Автор

check your com port settings
use putty to debug since its interface is ready to go

KelvinLeUT
Автор

i can't even open two putty terminals, only one. it says that when i have one opened that i can't open another one with the same com_port_number. Actully i can open putty serial terminal only if l have my converter pluged in. What do is wrong there?? I even try to change the com number but it doesnt work.

TheMedek