Hi all,
Once again, the old 'I'm new' thing...
I'm connecting a Bluetooth Mate Silver Module to the Arduino Uno, sending that to my Android device, and using the 'software serial' library...
When data is being written to the Arduino, tx flashes, appears in the serial monitor
When writing in the serial monitor, rx flashes, no data appears on the Android (Android code checked and double checked, all ok)
Here is the code I'm using;
#include <SoftwareSerial.h>
SoftwareSerial mySerial(8, 9);
void setup() {
Serial.begin(57600);
Serial.println("Hello, Serial Monitor");
// The data rate for the SoftwareSerial port needs to
// match the data rate for your bluetooth board.
mySerial.begin(115200);
mySerial.println("Hello, Bluetooth");
}
void loop() {
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
My second problem; my Uno only receives data when connected to the computer..?
Hence,
- how can I actively send data to my Android (the bluetooth is paired, I've reset it, paired it again, and I'm starting to think it must be something to do with either the software serial code or hardware issue??
- Why won't my device receive data without being connected to the computer (I'm using a 9V battery as replacement)?
Any help on this would be brilliant,
Many thanks.