Hello
I've just got the bluetooth module hc-05, and it works perfectly when the arduino is connected to the computer with usb. But... When i power the arduino with a 12v power supply, the bluetooth module won't even turn on... Everything else than the module works perfectly... HELP
Here is the code i used to turn on a lamp
///////////CODE////////////////
int lampe = 2;
int Received=0;
int lampe_state =0;
void setup(){
Serial.begin(9600);
pinMode(lampe,OUTPUT);
}
void loop(){
if(Serial.available()>0)
{
Received = Serial.read();
}
//lampe
if (lampe_state == 0 && Received == '1')
{
digitalWrite(lampe,HIGH);
lampe_state=1;
Received=0;
}
if (lampe_state ==1 && Received == '1')
{
digitalWrite(lampe,LOW);
lampe_state=0;
Received=0;
}
}