Hello
Please i need help, i am doing a program for morse code aplication and i'm stuck for past few days on serial port.
I have morse pad on serial port. When i press it it give some signal(logical 1). My mayor problem is how to measure how much time was the morse pad pressed.
I looked every where, i'm pretty new at vb.
I tried with loop but my program crashed, i tryed everything within my knowledge and nothing works.
I'm trying to do something like this:
if com1 is not null (that means that i have pressed morse pad, like keydown for keyboard)
start timer
when com1 is null (that means that i'm not pressing morse pade anymore, like keyup for keyboard)
stop timer
Can anyone please help me, i really need some guidance and help
best regards
Kosta
Loading
Sam HobbsPosted Dec 26, 2009, 4:03 PM
kannanPosted Dec 26, 2009, 7:23 AM
Try serialport component in 'ToolBox', and implement the 'DataRecived' event. To browse the Events avalible on SerialPort, click 'Events' tab in properties window of SerialPort, and then double click on 'DataRecived'.
Once the data is received, the 'DataRecived' method is automatacally invoked. From there you can start you timer, Or what ever you want to do, By writing the code inside the 'DataRecived' method.
If my post helps you, please check accepted answer.