Arduino Uno + Bluetooth Mate

Hey, just got my Arduino and Bluetooth Mate Silver today and I can’t get the BT mate to receive signals.
I have it wired the same way shown here. http://www.sparkfun.com/tutorials/264
BTMate TX → Arduino Digital Port 2
BTMate RX → Arduino Digital Port 3

I got the BT mate to turn on and I can send it into command mode successfully as well as run the commands shown in the tutorial. I ran into problems when I tried following the tutorial here… http://www.arduino.cc/playground/Learning/Tutorial01.

I copied and pasted the code the same way its shown in the tutorial. The code uploaded to the Arduino and the Processing program ran successfully but when I click the boxes to turn on and off the LED, nothing happens. When I run the Processing program once, 3 COM’s are printed, COM1, COM4, COM5. COM4/5 are the ports belonging to my bluetooth module. Like the tutorial says, I changed the line “port = new Serial(this, Serial.list()[1], 9600);” so that port refers to COM4. However, when I run the program again, COM4 disappears from the list of ports. It prints out, COM1 and COM5. Consequently, my program still fails to send commands to the Arduino.

After doing some research I changed the Arduino code a little but the program still fails. This is my edited code:

#include <NewSoftSerial.h>

char val; // variable to receive data from the serial port
int ledpin = 8; // LED connected to pin 48 (on-board LED)
int bluetoothTx = 2;
int bluetoothRx = 3;

NewSoftSerial bluetooth(bluetoothTx, bluetoothRx);
void setup() {
  pinMode(ledpin, OUTPUT);  // pin 48 (on-board LED) as OUTPUT
  Serial.begin(9600);       // start serial communication at 9600bps
  bluetooth.begin(115200);  // The Bluetooth Mate defaults to 115200bps
  bluetooth.print("$$");  // Enter command mode
  delay(100);  // Short delay, wait for the Mate to send back CMD
  bluetooth.println("U,9600,N");  // Temporarily Change the baudrate to 9600, no parity
  // 115200 can be too fast at times for NewSoftSerial to relay the data reliably
  bluetooth.begin(9600);  // Start bluetooth serial at 9600
}
void loop() {
  if( Serial.available() )       // if data is available to read
  {
    val = Serial.read();         // read it and store it in 'val'
  }
  if( val == 'H' )               // if 'H' was received
  {
    digitalWrite(ledpin, HIGH);  // turn ON the LED
  } else { 
    digitalWrite(ledpin, LOW);   // otherwise turn it OFF
  }
  delay(100);                    // wait 100ms for next reading
}

While I kept playing around with it, it would occasionally “connect” so that the green LED on the BT mate turns on. However, according to the tutorial, the red LED should be solid, not off like it is when I run it.
Any help would be greatly appreciated.

I posted this in Networking but a forum search showed me that most bluetooth related posts were made in this sub-forum so I’m reposting…

Hey, just got my Arduino and Bluetooth Mate Silver today and I can’t get the BT mate to receive signals.
I have it wired the same way shown here. http://www.sparkfun.com/tutorials/264
BTMate TX → Arduino Digital Port 2
BTMate RX → Arduino Digital Port 3

I got the BT mate to turn on and I can send it into command mode successfully as well as run the commands shown in the tutorial. I ran into problems when I tried following the tutorial here… http://www.arduino.cc/playground/Learning/Tutorial01.

I copied and pasted the code the same way its shown in the tutorial. The code uploaded to the Arduino and the Processing program ran successfully but when I click the boxes to turn on and off the LED, nothing happens. When I run the Processing program once, 3 COM’s are printed, COM1, COM4, COM5. COM4/5 are the ports belonging to my bluetooth module. Like the tutorial says, I changed the line “port = new Serial(this, Serial.list()[1], 9600);” so that port refers to COM4. However, when I run the program again, COM4 disappears from the list of ports. It prints out, COM1 and COM5. Consequently, my program still fails to send commands to the Arduino.

After doing some research I changed the Arduino code a little but the program still fails. This is my edited code:
Code:
#include <NewSoftSerial.h>

char val; // variable to receive data from the serial port
int ledpin = 8; // LED connected to pin 48 (on-board LED)
int bluetoothTx = 2;
int bluetoothRx = 3;

NewSoftSerial bluetooth(bluetoothTx, bluetoothRx);
void setup() {
pinMode(ledpin, OUTPUT); // pin 48 (on-board LED) as OUTPUT
Serial.begin(9600); // start serial communication at 9600bps
bluetooth.begin(115200); // The Bluetooth Mate defaults to 115200bps
bluetooth.print("$$$"); // Enter command mode
delay(100); // Short delay, wait for the Mate to send back CMD
bluetooth.println(“U,9600,N”); // Temporarily Change the baudrate to 9600, no parity
// 115200 can be too fast at times for NewSoftSerial to relay the data reliably
bluetooth.begin(9600); // Start bluetooth serial at 9600
}
void loop() {
if( Serial.available() ) // if data is available to read
{
val = Serial.read(); // read it and store it in ‘val’
}
if( val == ‘H’ ) // if ‘H’ was received
{
digitalWrite(ledpin, HIGH); // turn ON the LED
} else {
digitalWrite(ledpin, LOW); // otherwise turn it OFF
}
delay(100); // wait 100ms for next reading
}

While I kept playing around with it, it would occasionally “connect” so that the green LED on the BT mate turns on. However, according to the tutorial, the red LED should be solid, not off like it is when I run it.
Any help would be greatly appreciated.

Pleas don't cross post. It wastes time, and makes people cross.