We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › problems with serial in OSX
Page Index Toggle Pages: 1
problems with serial in OSX (Read 1422 times)
problems with serial in OSX
Aug 5th, 2005, 1:56pm
 
hello,
i have a problem with the serial port in osx with processing...
I am developing a hardware system similar to wiring.
I use the FTDI usb controller wih a PIC microcontroler and OSX for testing and debugging.
The hardware works very well because i'm testing it with the terminal aplication sending and receiving serial data and i can see it into the lcd display of the device.
But, when i used processing i have this error.
The version of osx is 10.3.9
i cant install tiger for some reasons...

-----------------------------------------------------
gnu.io.PortInUseException: Unknown Application
-----------------------------------------------------

there are the ports:

Available serial ports:
Devel Library
=========================================
Native lib Version = RXTX-2.1-7pre17
Java lib Version   = RXTX-2.1-7pre17
/dev/tty.modem
/dev/cu.modem
/dev/tty.usbserial-191
/dev/cu.usbserial-191

and this is my code:

----------------------------------------------------

import processing.serial.*;

Serial port;

void setup()
{
 size(200, 200);

 println("Available serial ports:");
 println(Serial.list());

 port = new Serial(this, "/dev/tty.usbserial-191", 19200);

 //port.write(128);  // le mando 0xF0
 //port.write(0);    // le mando 0x00
}

void draw() {
 while (port.available() > 0) {
   int inByte = port.read();
   println(inByte);
 }
}

-------------------------------------------------------

the problem is the same with the tty and the cu, which is the difference??
whats happend??
is it a bug of processing?? or is a programing problem??

thanks

Alex
Re: problems with serial in OSX
Reply #1 - Aug 5th, 2005, 2:20pm
 
have you read the faq?
http://processing.org/faq/bugs.html#serial

and please don't cross post.
Re: problems with serial in OSX
Reply #2 - Aug 5th, 2005, 4:32pm
 
ok,
now it works!!!!!!

it was the "macosx_setup.command"

thanks
Page Index Toggle Pages: 1