Hello!
I have tried using io.serial in Windows today. Normally, serial IO is pretty
straightforward in Windows: you open a file named "COM1", possibly set the baud
rate, and off you go reading and writing.
Not so much in Factor.
I have imported the io.serial vocab and perused its empty documentation.
Well, do I really need any documentation, I thought to myself. How hard can it
be, really?
So I did the first thing that came to mind:
9600 "COM3" <serial-port>
The error was:
Generic word default-serial-flags does not define a method for the word class.
Dispatching on object: windows
Well, o-kay... What does it do on other platforms, then?
M: unix default-serial-flags
flags{ IGNPAR ICRNL } >>iflag
flags{ } >>oflag
flags{ CS8 CLOCAL CREAD } >>cflag
flags{ ICANON } >>lflag ;
Those flag names could not be more unhelpful if they tried. That's dead end
number one.
But wait, maybe there's something useful in io.serial.windows? A-ha!
<serial-stream>! Let's check it out:
"COM3" ascii <serial-stream>
It worked! I have an object that seems to be a stream of some sort. Let's try
reading from it:
5 over stream-read
Generic word stream-read1 does not define a method for the win32-file class.
Dispatching on object: T{ win32-file f f f ALIEN: 134 f }
That's dead end number two.
Does anyone know how to get past either of these?
---=====---
Александр
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk