[Gambas-user] SERIAL PORT : AGAIN ?

Budi Arief Gusandi budi at ...415...
Tue Aug 10 04:17:16 CEST 2004


Dear Sir, Madam. ..hehee LOL

Is there any methode to read from serial port rather than from read event ?
In VB simply we can use :

Private Sub xxx()
Dim sInput as String
MsComm1.Output = "x" 'a command to reset, just a sample
Wait 150 'a procedure to wait for 150 ms, until all the responese for the  
serial come
sInput = MsComm1.Input
'Process result here...
'After that Send again another command
MsComm1.Output = "s" 'a command to select, just a sample
Wait 30 'a procedure to wait for 30 ms, until all the responese for the  
serial come
sInput = MsComm1.Input
..processs
End sub

In that code, i dont want to use read() event. I have workaround to use a  
variabel in read() event, and use it in the sub, but i just want to use  
read() event for triggering only....if there's a char in the buffer, i'll  
go to the procedure, processing manually.

Thank you


Budi     




More information about the User mailing list