I have an HC06 bluetooth module and first when I got it, I connected it directly to my computer through a TTL to USB converter and it worked fine. I even could pair it with my phone and do some stuff using a bluetooth terminal app.
Then, I wrote this piece of code on an arduino uno :
#include <SoftwareSerial.h>
int rxPin = 8;
int txPin = 9;
int ledPin = 13;
SoftwareSerial BTSerial(rxPin, txPin);
void setup() {
// put your setup code here, to run once:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
BTSerial.begin(9600);
Serial.println("Hello\n------");
}
void loop() {
// put your main code here, to run repeatedly:
if(BTSerial.available()){
}
}
And then I uploaded the code to my board. Now I have a huge problem. The damn thing doesn't even blink! But when I connect it directly to my computer, it blinks like crazy. What's the problem?
My connections are identical to this and I haven't changed anything.