// Bluetooth module used - HC-06 #include SoftwareSerial BlueTooth(10, 11); // (TXD, RXD) of HC-06 // Connect the HC-06 TX to the Arduino RX. // Connect the HC-06 RX to the Arduino TX through a voltage divider. char BT_input; // to store input character received via BT. void setup() { pinMode(13, OUTPUT); // Arduino Board LED Pin BlueTooth.begin(9600); // The default baud rate for the HC-06s I have is 9600. Other modules may have a different speed. 38400 is common. } void loop() { if (BlueTooth.available()) { BT_input=(BlueTooth.read()); if (BT_input=='1') { digitalWrite(13, HIGH); BlueTooth.println("Now LED is ON"); } else if (BT_input=='2') { digitalWrite(13, LOW); BlueTooth.println("Now LED is OFF"); } else if (BT_input=='?') { BlueTooth.println("Send '1' to turn LED ON"); BlueTooth.println("Send '2' to turn LED OFF"); } // You may add other if else condition here. } }