Thanks cbenson for directing me down an interesting path.
Tried but can’t get serial path-through to work.
Leveraging your link got me here, but no success.
#include <SoftwareSerial.h>
SoftwareSerial Serial1(0, 1); // RX, TX
void setup() {
Serial.begin(9600);
delay(2000);
Serial1.begin(9600);
delay(2000);
}
void loop() {
if (Serial.available()) { // If anything comes in Serial (USB),
Serial1.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
Serial.println("This will test the functionality of Serial");
}
if (Serial1.available()) { // If anything comes in Serial1 (pins 0 & 1)
Serial.write(Serial1.read()); // read it and send it out Serial (USB)
Serial.println("Serial1 response");
}
}
Not sure at this point. I’ll transfer to another tech for a last opinion.
@bschmidt9 Have you seen this tutorial?
https://community.robotshop.com/blog/show/dfrobotshop-rover-tutorial-control-with-android-app-bluetooth
If you’re trying to configure the Bluetooth using AT commands, be sure it’s in AT mode:
In your code, you don’t actually need the two serial.println() lines, though not certain that will have any effect.
Thanks cbenson,
That datasheet was the main sheet I have been trying to use the past week or so to communicate through AT mode and try to “save the module”.
Very helpful document. Unfortunately no success communicating with the Bluetooth module in AT mode after much effort. Was getting back “garbage” from the module, which is why i had the two serial print lines. Just to get confirmation where in the loop I was.
So I gave up and ordered another BT module.
Received it mid week and it worked immediately like you said it should.
So obviously it was a faulty module. Wish i had tried it years ago and returned it on RMA.
To answer the original question and any question that someone may have on this topic in the future, plug the BT module in, and you should be able to recognize it immediately. No coding, nothing required. Just plug it in (the right direction of course), turn on the rover.
Now, my iphone 6s, and iphone 8 wont recognize it, but all the androids recognize it. So if you are having issues try a few android phones or tablets. If that doesn’t work, you probably have a faulty BT module like I did.
I think many beginners like me will then try and get the rover to move through bluetooth.
That’s probably the first goal of a project like this. A good “success point” so to speak.
I got this to work pretty quickly (now that the BT module actually works) by adapting some of the basic code in the manual. I will post that in the next day to round out this thread and help bring beginners like me to a success point.
@bschmidt9 That’s great news! Really sorry it caused frustration.