Monday, 20 April 2020

On off Light Using MObile And Arduino

Steps :

1 . go to http://ai2.appinventor.mit.edu  
    and open Account 
2  Download Android App Source Code from My Drive  https://drive.google.com/open?id=1GS3NbGwm0DaKM89chzyWDuAxkW35xR75

Or  Directly Download APK File from here.. 
3 import this code to http://ai2.appinventor.mit.edu
and Build App Download it Using QR Code Directly Your Android Mobile



Step to run :
 1 . Connect  LED, BT HC-05 To Arduino Upload bellow Program on it  (* IMP NODE : During Upload Arduino Remove Bluetooth HC-05 )
 2.  Using in mobile pair with Bt Devices HC-05 (Default password 1234)
 3. Open App select Device from list connect it
 4. on/ off light  




Write CODE on Arduino AND Config Pin...


CODE:
/* 
 *  
 *  Coder - Kishor M Sonawane




Bluetooth connection:-
Arduino Pins           Bluetooth Pins
RX (Pin 0)     ———->      TX
TX (Pin 1)     ———->      RX
5V             ———->      VCC
GND            ———->      GND


 */
char data = 0;                //Variable for storing received data
void setup() 
{
  Serial.begin(9600);         
  pinMode(13, OUTPUT);        //Sets digital pin 13 as output pin
}
void loop()
{
  if(Serial.available() > 0)  /
  {
    data = Serial.read();      //Read the incoming data and store on variable >> data
    Serial.print(data);       
    Serial.print("\n");        
    if(data == '1')            //Checks whether value of data is equal to 1 
      digitalWrite(13, HIGH);  //If value is 1 then LED turns ON
    else if(data == '0')       
      digitalWrite(13, LOW);   //If value is 0 then LED turns OFF
  }                            
 
}                 




1 comment:

  1. I’m any regarding a lot of the content, My partner and i totally savored, I might actually favor a lot more info relating to this kind of, considering that it really is great., Congrats designed for submitting. Vintage Logo

    ReplyDelete

Thank You!!!

create and activate a Python virtual environment on macOS and Windows

create and activate a Python virtual environment on macOS and Windows: Prerequisites: Python 3: Ensure you have Python 3 installed. You ca...