I have a Bluetooth Module "Firefly AAA" connected to my Arduino Duemilonova (Bluetooth RX -> Arduino RX, Bluetooth TX -> Arduino TX).
for a project in which I need to send ultrasonic values to my computer.
First, I am encountering a problem with wires connections rattling making shaky connections with the module (randomly turning the module off :-P). does anyone have this problem or a non-soldering solution?
Second, more importantly, there is a problem with the Bluetooth connection when I can establish it. I add the Firefly to my devices on my computer and upload the Arduino code and run the Processing code on my computer shown below. The green light, indicating connection with the module, turns on but the LED I have turn on when it receives Serial input does not (i've checked any problem with the LED/port a million times). Any suggestions?:
import processing.serial.*;
Serial port;
void setup() {
println(Serial.list());
port = new Serial(this, Serial.list()[1], 9600);
}
void draw() {
port.write('H');
delay(50);
print("17");
}
char val; // variable to receive data from the serial port
int ledpin = 13; // LED connected to pin 48 (on-board LED)
void setup() {
Serial.begin(9600); // start serial communication at 9600bps
}
void loop() {
// if data is available to read
if( Serial.available()){
// read it and store it in 'val'
val = Serial.read();
digitalWrite(ledpin, HIGH);
}
delay(100);
}
I'm running into the same problem where my Bluetooth Smirf turns on a green LED on the module to show that a connection is being made from my computer, but when I send a H, the LED that I put in my circuit doesn't turn on.
Run your favorite terminal emulator, HyperTerminal or other program. Type “$$$” on your screen. You should see “CMD” returned to you. This will verify that your cable and comm. settings are correct. Valid commands will return an “AOK”, response, and invalid ones will return “ERR “. Commands that are not recognized will return a “?”.
So I enter "$$$" into the hyper terminal and was able to get CMD back from my bluetooth device. When I type SU,96 to get the baudrate to 9600 I receive nothing. I also tried typing "D" or "B" to show the parameters, such as the Bluetooth Name, Class of Device and Serial Port settings.
I am not receiving AOK nor ERR or ?. Sometimes I get a ! though, when I input H enough times.
When you power on the bluesmirf, the red light blinks rapidly. Then it slows down after a short time. If I connect using putty while the light is blinking faster and type $$$, then I can enter command mode. Once the light is blinking a little more slowly, I can no longer enter command mode. Hope that helps!
This actually worked. I am in putty and can now get AOK ERR and ? and display all my settings.
From this I was able to set my Baud rating inside the BT module. I thought that it was already set to 9600. I was able to get the LED light working after switching the TX and RX.