serproxy woes - EOF from sio


i've got couple of "working" examples of arduino talking flash , flash ardunio, serproxy keeps dying after flash connects.

i'm on intel mac (os x 10.4.10). way i've been able serproxy running through terminal (is correct?) first start sketch , open serial output window. start serproxy, start swf file.

soon after flash connects, terminal shows following:
code: [select]

robbie:~/arduino robbie$ /users/robbie/arduino/serproxy-0.1.3-3/serproxy
serproxy - (c)1999 stefano busti, (c)2005 david a. mellis - waiting clients
server thread launched
server(1) - thread started (serproxy works anywhere between 10 , 60 seconds or so, then...)
server(1) - eof sio (this dies)
server(1) exiting


my arduino sketch looks like:
code: [select]
int ldrpin = 3;
int val = 0;
int oldval = 0;
void setup(){
serial.begin(9600);
pinmode(ldrpin, input);
}

void loop(){
 val = analogread(ldrpin);
 if(val != oldval){
   oldval = val;
   sendnumtoflash(val);
 }
 delay(500);
}

void sendnumtoflash (int n) {
 serial.print(n);
printbyte(0);
}


my serproxy config file looks like:
code: [select]
# config file serproxy
# see serproxy's readme file documentation

# transform newlines coming serial port nils
# true (e.g. if using flash) or false
newlines_to_nils=true

# comm ports used
comm_ports=1
serial_device1=/dev/cu.usbserial-a4001mmq
# default settings
comm_baud=9600
comm_databits=8
comm_stopbits=1
comm_parity=none

# idle time out in seconds
timeout=300

# port 1 settings (ttys0)
net_port1=5331

...rest of comm port settings...


and actionscript:
code: [select]

var sock:xmlsocket = new xmlsocket();
var sockdata:number = 0;
sock.onconnect = function(success){
     if(success){
           trace('connected!');
     }else{
           trace('not connected');
     }
}
sock.onclose = function () {
   trace("connection server lost.");
}
sock.ondata = function(src){
     mc._y = 354 - (src*3);
}

sock.connect('127.0.0.1', 5331);


this driving me insane, google tells me nothing, , same error in serproxy in every sketch/flash app run. it's got stupid , obvious nobody ever mentions it!

are there alternatives serproxy out there use instead?

unbelievable. you'd think someone, somewhere, amongst these arduino flash tutes have said "close arduino ide before running program".

that's has appeared problem anyway. close ide, start serproxy, run flash code, , serproxy seems behave now.


Arduino Forum > Forum 2005-2010 (read only) > Software > Interfacing > serproxy woes - EOF from sio


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums