[Gambas-user] define a startup class?
Dimitri Bellini
dimitribellini at ...69...
Wed May 21 13:20:10 CEST 2003
On Tuesday 20 May 2003 15:45, Nikolaos Dionysopoulos wrote:
> Tough luck. That's exactly what I tried to build a couple of weeks ago,
> but there isn't an - obvious - way for opening the modem device for
> read/write. I thought about opening for write, send command, closing,
> opening for read and reading response, but the response was never
> captured by my program. Opening two devices didn't help me either :(
Hi all
some week ago i have post this simple serial read example.
But is not simple for send a command to COM (ttySx) and receive the data if is
possible i thinks is great idea to create a Object (like MSComm) with some
events
- On Receive
- Data Out
- Data int
thanks in advance
-------------------------------------------------------------------------------------------
i have to read a serial data from a ttySx and i use stty command to set the
9600bps 8N1 no hardware control on Serial Port but nothing to do i write this
very simple Project but nothing... There is a End Of Line Type?
Thanks in advace.
----------------------------------------------------------------------------
STATIC PUBLIC SUB Main()
hForm AS Fmain
hForm = NEW Fmain
hForm.show
END
PUBLIC SUB Button1_Click()
myLine AS String
myFile AS File
OPEN "/dev/ttyS0" FOR READ DIRECT AS myFile
WHILE NOT Eof (myFile)
'Eof = end of file
LINE INPUT #myFile, myLine
'# is a kind of pointer 'which is incremented by LINE INPUT
TextArea1.Text= TextArea1.Text & "<br>" & myLine
WEND
CLOSE myFile
'do not forget to close the door ;-)
END
-------------------------------------------------------------------------------------
Dimitri Bellini
More information about the User
mailing list