Arduino Uno and Bluesmurf HID Coding Issue

Hi Everyone,
I'm fairly new to working with Arduino's as well as the Bluesmurf HID. I began a new project a few days ago and have been running into a bit of trouble. I'm attempting to use my arduino as a BT HID allowing me to type on my computer or cell phone using it. I was able to piece together the arduino and wire the Bluesmurf unit just fine. When i powered it up I had no problem connecting my iPhone to the bluetooth connection.

I ran into problems when I attempted to send some text. I attemtped to use the following code from HOW TO GET WHAT YOU WANT but kept receiving errors stating that there was an unexpected "" in the program. I eventually gave up with this and tried some new code.

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
}

I then began using the code seen here: Arduino Forum and compiled it without any issues. I ran into trouble when sending it though. Instead of sending the reapeating text it only sent a few random characters (which seemed to vary each time) once and then end the application.

I'm a bit confused as to what's going on here and greately appreciate it if someone could assist me in understanding what may be causing these issues and how to properly send keyboard inputs via bluetooth.

Thanks in advanced for the help!

In the code you posted, which I assume you copied and pasted from the other web site, the quotes for the string are the incorrect characters. It is probably why the compiler was complaining. Replace the "fancy quotes" with the standard quotes available from your keyboard.

Instead of

Serial.println(“hello world”);

it should be:

Serial.println("hello world");

While they might look the same to you, the compiler doesn't know about the unicode characters “ ”.

Ah, great point! I'll give that a shot and let you know how it works.

Thanks for the help!