0

I am trying to send a string from my arduino to the serial monitor. I am using the sparkfun bluesmirf chip with an arduino UNO.

my code is really simple:

void setup() {
    Serial.begin(115200); // begin serial communication at 115200 baud rate
}
void loop() {
    Serial.println("hello world"); // write hello world
    delay(1000); // delay one second
}

When I open the monitor I recieve gibberish. When I connect to the arduino with a usb cable everything works fine.

Can anyone please put me in the right direction?

ZnArK
  • 1,533
  • 1
  • 12
  • 23
Ronny vdb
  • 2,324
  • 5
  • 32
  • 74
  • Make sure the Serial Monitor is set to 115200 Baud. Also, could you elaborate on what you mean when you say that when you connect the arduino with USB cable everything works? – ZnArK Aug 28 '12 at 17:37
  • My serial monitor is set to 115200. When i said that everything works when I connect via usb was that if I connect a usb cable to the arduino board and open the serial monitor I receive the text "hello world", however when I set the serial port to bluetooth and open the serial monitor I receive gibberish. – Ronny vdb Aug 28 '12 at 21:33
  • @Ronnyvdb WHat do you mean by "set the serial to bluetooth"? Which pins are you using for receiving and sending data (RX, TX) to the bluetooth? – pcantin Sep 04 '14 at 22:34

1 Answers1

0

Depending on the version of your bluesmirf, the default baud rate is either 9600 or 115k. Here's another project that mentions how to set the baud rate for different versions.

Alternatively, just test by setting the arudiono code and serial monitor to 9600.

jdh
  • 1,637
  • 14
  • 12