[PD-dev] comport & win2k

André Schmidt andre at vju-tv.net
Sun Jan 19 01:11:00 CET 2003


hi devs,

i made a slider with pocketc on palm which sends position trough serial 
port (com2)
heres the pocketc code:
------------------------
/$ mySlider
string bm = "0affcffc";

slider(int x1, int y1, int x2, int y2){
    int x3,y3,xp,yp;
    x3 = x1+x2; y3 = y1+y2;
    frame(1,x1,y1,x3,y3,1);
    xp=penx(); yp=peny();
    if (xp>x1){ if (xp<x3){
     if (yp>y1){ if (yp<y3){
    do{
       xp=penx(); yp=peny();
        if (yp>y1){ if (yp<y3){
         yp=yp-1;
         rect(0,x1,y1,x3,y3,0);
         bitmap(x1, yp, bm);
         sersend(yp);
       }}
} while (event(1)==4);
}
}}}}


//slider3
include "mySlider"
int x,y;

main() {
    int e; graph_on();
    seropen(9600,"8N1C",10);
    while (true) {
       e = event(1);
       if (e==2) slider(60,60,10,64);
    }
serclose();
}
---------------------------------------
and using tera term pro 2.3 
(http://hp.vector.co.jp/authors/VA002416/teraterm.html) i get the bytes 
trough com2 to computer...

but

when i try pd with comport i get:
--------------------------
Opened serial line device  COM2
RXERRORS on serial line
--------------------------
and i don't get any bytes, or should i ? is comport output only?

...

put my point is, as theres the source (c/c++) of tera term pro, that would 
be a good reference to get serial port to work with pd on win2k...

yes, if my c skills would be better, i would try it my self...

cheers
-andre
ps. has any1 got serial port communication to work with pd on win2k?





More information about the Pd-dev mailing list