gui.o.cruz1
Member
Hello, I am trying to configure this Bluetooth device (https://www.sparkfun.com/products/12576) on teensy 3.2. To enter the command mode and set your preferences I just have type $$$ and then CMD on the serial monitor. I don't know why but the bluetooth module is not sending any data back to me.
Below is the sketch I am using, thanks!
Commands references: http://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf
Below is the sketch I am using, thanks!
Commands references: http://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf
Code:
String receivedText = "";
void setup() {
Serial.begin(9600);
Serial1.begin(9600); //rx1 and tx1 = pins 0 and 1 on Teensy
delay(200);
}
void loop() {
if (Serial.available()) Serial1.write(Serial.read());
while(Serial1.available() > 0) { // While there is more to be read, keep reading.
receivedText += (char)Serial1.read();
delay(10);
Serial.println("Working!");
}
if(receivedText != "") Serial.println(receivedText);
receivedText = "";
}
Last edited: