Introduction: Blu - LED's
There are so many instructables on the web , but this is the most simplest and easiest to upgrade further !!
Supplies
Step 1: Setting Up Circuit Connections !!
- Set up the led connection as shown in diagram !!
- Skip to step 3 and come back again !
- Connect Bluetooth after uploading the program !!
NOTE : Please connect the Bluetooth module as directed :
RX of Bluetooth module goes to TX of arduino board!
TX of Bluetooth module goes to RX of arduino board!
You are almost done !!
Download the app , to control your project !!
Connect to the app and bingo , you are done !!
Attachments
Step 2: Copy the Program Here !!
/* ©Compiler Bro's */ #defineledPin8// Intially define the state to be zero! int state= 0; voidsetup(){ // put your setup code here, to run once: //Set up a communication between arduino and your system Serial.begin(9600); Serial.println("Connected!!"); pinMode(ledPin,OUTPUT); digitalWrite(ledPin,LOW);}voidloop(){ // put your main code here, to run repeatedly: if(Serial.available()>0) { state=Serial.read(); } if(state=='A') { digitalWrite(ledPin,LOW); Serial.println("LED : OFF"); state=0; } elseif(state=='B') { digitalWrite(ledPin,HIGH); Serial.println(" LED : ON"); state=0; }}