I'm not sure what you are referring to about the authentication. The link provided is viewable without logging in, you can see my code there. However, it's not problem for me to post it here;
#include <SoftwareSerial.h>
SoftwareSerial softwareSerial(8, 9);
void setup() {
softwareSerial.begin(115200);
softwareSerial.println("Bluetooth Ready.");
softwareSerial.println("Waiting...");
delay(1000);
}
void loop() {
int readByte;
int bytes[10];
int i = 0;
boolean readSomething = false;
softwareSerial.listen();
long l = millis();
while (millis() - l < 1000) {
while (softwareSerial.available() > 0) {
readByte = softwareSerial.read();
bytes[i] = readByte;
i++;
readSomething = true;
}
}
if (readSomething == true) {
delay(20);
readSomething = false;
for (int c = 0; c < i; c++) {
softwareSerial.print(bytes[c]);
softwareSerial.println(" ");
bytes[c] = 0;
}
i = 0;
}
}
Now I'll connect through bluetooth via a terminal and send a string to Arduino, which will be written back.
If I send a string of '11111' for example, I would like something consistent back - the problem is that I get something that is not consistent!