Hi,
I'm new to Arduino. I just acquired a Arduino BT for a project that requires wireless operation.
I'm working my way through the examples, and I've successfully run the "Dimmer" and "Physical Pixel" examples with both Max/MSP and Processing. These examples have to do with sending messages from Max or Processing to Arduino.
I'm having trouble, though, with the examples that send messages in the other direction - "Graph" and "VirtualColorMixer." I can't seem to get both the sender and receiver to use the same serial port.
I'm running all this on a Mac on OS 10.4.11, and connecting to the bluetooth via the /dev/cu.ARDUINOBT-BluetoothSeri-1 port.
This is what happens when I try these programs: I change the baud rate in the sketch to 115200 and upload it to the Arduino BT. Then I copy the Max code (to start with Max for this description), open Max and select "New from Clipboard," change the baud rate in the patch to 115200 and click on print to see what the port letter should be to connect to the ARDUINOBT-BluetoothSeri-1. Then I change the port of the serial object to the correct letter, and get an error reading "serial:error opening serial port (/dev/cu.ARDUINOBT-BluetoothSeri-1).
Incidentally, I can verify that the analog input I am trying to read is working by resetting and immediately switching to Serial Monitor (it seems that the only way I can get the Serial Monitor on and have it work is to hit reset before clicking on the the Serial Monitor button). Then I can see the values being read on the analog input.
If I try to communicate with Processing, I go through the same steps to upload the program to the Arduino BT, and then copy the Processing code and paste it into Processing. I change the baud rate again, and the number after Serial.list() to match what I see in the serial port list in Arduino. When I run the sketch, I get just a blank window in the processing.core.PApplet. In the print area, I get a list of the serial ports, and this message in red:
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354).
It seems that neither Max nor Processing wants to use the same serial port that Arduino is using. However, as I mentioned, I can get the "Dimmer" and "Physical Pixel" examples working.
But even in these examples that work, something strange happens: after I connect Max with the serial Port Arduino is using, when I go back to Arduino and look at the serial port list again, I see that the order in which the ports are listed has shifted. But Max and Arduino are still connected and I'm able to send messages to the Arduino board.
Thanks for any help or suggestions!
best,
Phil