I am trying to control a led ON/OFF using Arduino UNO and a Bluetooth shield
I have this
which is based on hc-05. The tutorials I found about hc-05 are not working for me. I have the hc-05 embedded in the shield and I did not find any tutorials for this shield.
Here is my code (it is working when I use the USB serial ctrl + shift + m).
void setup () {
pinMode( 13, OUTPUT );
digitalWrite(13,LOW);
Serial.begin( 9600 );
Serial.println( "Ready" );
}
void loop() {
if ( Serial.available() > 0) {
int inByte = Serial.read();
switch ( inByte ) {
case '0':
digitalWrite( 13, LOW );
break;
case '1':
digitalWrite( 13, HIGH );
break;
}
}
}
I connected my android phone to the shield successfully using blurterm2. When I send 1 or 0 nothing happens. What am I missing?