Arduino Bluetooth -> Processing


I have done some reading around this topic, and what is suggested is simple, but when I apply it it doesn't work. The Bluetooth module flashes a red LED, and does not turn green.

My aim is to send and receive information with the Arduino using the Processing 2.2.1 IDE. I am using an Arduino Uno with a BlueSMiRF Gold attached as follows: RX -> TX-0 TX -> RX-1 5V -> VCC GND -> GND I am unplugging the TX and RX pins during Arduino code upload.

The code below should print "Hello World" to the Processing IDE console after connecting to the bluetooth module on the arduino uno. My Arduino code is as follows:

void setup ()
  //initialize serial communication at 9600 baud rate
       Serial.begin(9600);        // opens serial port, sets data rate to 9600 bps

void loop()
  //send "Hello World!" over the serial port
  Serial.println ("Hello World");
// wait 100 milliseconds so we don't drive ourselves crazy
  delay (100);

My Processing code is:

import processing.serial.*;

Serial myPort;  // Create object from Serial class
String val;     // Data received from the serial port

void setup() 
  String portName = Serial.list()[1]; //change the 0 to a 1 or 2 etc. to match your port
 myPort = new Serial(this, portName, 9600);
   void draw()
      if ( myPort.available() > 0) 
      {  // If data is available,
      val = myPort.readStringUntil('\n');         // read it and store it in val
    println(val); //print it out in the console

TroubleShooting Done: 1. When connected by USB, the Arduino console shows the "Hello World" is printed. 2. I am able to connect and send/receive information using MATLAB, so the BlueSMiRF is not damaged, and the computer is connecting to it find (no drivers required). 3. The designated COM port "Serial.list()[1]" is correct.

My belief is it is an issue with the Processing IDE code. Please let me know!


I have got the bluetooth module to connect (the green LED comes on) by connecting the CTS-I and RTS-J connections together on the BlueSMirF, however it is still not sending the information...

Please help if you know anything!