On the Amarino site is written: IMPORTANT!!! Please set your Bluetooth module to 57600 baud (using Putty or other Terminal programs) otherwise you will get corrupted data. Only the Arduino BT board works with 115200 baud without flaws.
This should tell you how to set the baud rate, although it may depend on your module. 57600 would be ideal, but if you can't change it try using the default baud rate and see if that works
Nikka93, the default baud rate (9600 baud) worked fine for me. I've added this to the tutorial so other people don't get confused! I will also add a note linking to the guide Nubula suggests, just in case.
I 'm using that through SoftwareSerial; in this way it's possible to use the serial for debugging purpose
#include <NewSoftSerial.h>
#define rxPin 2
#define txPin 3
NewSoftSerial myBluetooth(rxPin,txPin);
void setup()
{
Serial.begin(9600);
Serial.println("Let's Start with pitusso!");
// set the data rate for the NewSoftSerial port, idem as Serial for DEBUG purpose
myBluetooth.begin(9600);
}
and so on...
Instead of Amarino, i've used AppInventor, to build my app.
I'm having trouble with the bluetooth communication. I'm using the bluetooth mate gold from sparkfun and the arduino MEGA ADK. my code is below. Any help would be greatly appreciated. Thanks!
#include <SoftwareSerial.h>
//RX AND TX PIN ASSIGNMENTS FOR THE ARDUINO MEGA ADK
int bluetoothTx = 2;
int bluetoothRx = 3;
void setup()
{
//Setup usb serial connection to computer
Serial.begin(9600);
//Setup Bluetooth serial connection to android
bluetooth.begin(115200);
bluetooth.print("$$$");
delay(100);
bluetooth.println("U,9600,N");
bluetooth.begin(9600);
}
void loop()
{
//Read from bluetooth and write to usb serial
if(bluetooth.available())
{
Serial.print((char)bluetooth.read());
}
//Read from usb serial to bluetooth
if(Serial.available())
{
bluetooth.print((char)Serial.read());
}
}
I have been playing around with the jy mcu bluetooth module and have had some success. I used this instructable
I had to install the sla4 android and python for android but it works pretty well. As of now I can only receive sensor data from one pin but I havent played around with the code too much to see how I can get data from more pins and send data back to the arduino which is my ultimate goal
as for the amarino project I havent had as much luck with it. I have changed my baud rate and the test event is sending data but I get nothing from my serial monitor. I really want to get this up and running.