Thanks alot. This seems to work fine.  I have a small problem which might seems 
stupid but i didnt manage to make this work:

        int res;
        const unsigned char artst[4]={1,2,3,4};

        { Flio_Serial_Port* o = new Flio_Serial_Port(30,440,70,120);
                res = o-> open("COM1", 19200);
                printf ("\n\n\n COM1 = %d",res); //returns 0 so ok
                printf ("\nDisp: %s",dispchar);
                res = o-> write(artst,sizeof(artst));
                printf ("\n\n\n COM1 = %d",res);  //returns -1
        }

I am doing something wrong when i am using the 'write' command. Please help.

> On 02.04.2008, at 22:19, Mike bug wrote:
> > I need to use the RS-232.  Can someone share his code to operate the
> > RS-232 serial port because i have no ide where to start from.
>
> One of my apps, DyneTK, uses the serial port in FLTK. It is public
> domain:
>
> http://code.google.com/p/dynee5/source/browse
>
> Just extract Flio_Serial_Port and Flio_Stream to get your serial
> communication going (there may be other dependencies). DynTK and all
> source code within is licensed LGPL.
>
> Flio_Serial_Port is just a standard widget that can be visible in your
> GUI. You can open and close your connection and wrte to it. Whenever
> Flio_Serial_Widget receives data over the serial port, the widget's
> callback will be called. You can then use available() to find out how
> many bytes can be read without blocking, and then simply read() those.
>
> The code has been tested and used quite a lot. Nevertheless, please
> let me know if you find bugs.
>
> Matthias
>

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to