Skip to main content

Blutooth modual control Arduino LED

Blutooth modual control Arduino Connected Device

 First step you can open Arduino IDE type everything programming to  under the page first of all we will not everything for this programming now start (int) integer led1, led2 this 2 are variable.

Blutooth-modual-control-Arduino -LED
Blutooth-modual-control-Arduino -LED

Let's discuss about hardware 1) blutooth modual 2) Arduino any. Arduino to blutooth modual connection Arduino 5Volt connect to blutooth modual VCC, Arduino GND (Ground) to modual GND (Ground), Arduino TX pin connect to Modual RX pin and Arduino RX pin connect to Modual to TX pin.

Blutooth-modual-control-Arduino -LED

Arduino pin D2 connect LED Anode pin and another pin of LED Chotod connect to Arduino GND pin.
Arduino pin D3 connect LED Anode pin and another pin of LED Chotod connect to Arduino GND pin.

HC-05 modual control Arduino programming

int led1 = 2;//pin number D2

int led2 = 3;//pin number D3

char TTRX;

void setup(){

  Serial.begin(9600);//serial commuction port number defind 9600

  pinMode(led1, OUTPUT);//led1 pin defind output device

  pinMode(led2, OUTPUT);//led2 pin defind output device

}

void loop(){

  if (Serial.available()){

    TTRX = Serial.read();//serial function read data for RX pin

  }

  if (TTRX == '1'){

    digitalWrite(led1, HIGH);

  }

  if (TTRX == '2'){

    digitalWrite(led1, LOW);

  }

  if (TTRX == '3'){

    digitalWrite(led2, HIGH);

  }

  if (TTRX == '4'){

    digitalWrite(led2, LOW);

  }

}

Different void loop programming

(use any of them loop)

void loop(){

  switch (TTRX == '1'){

 case 0:

  digitalWrite(led1, HIGH);

  break;

 case 1;

  digitalWrite(led1, LOW);

  break;

}

delay(1);

  switch(TTRX == '2'){

   case 0:

   digitalWrite(led2, HIGH);

   break;

   case 1;

   digitalWrite(led2, LOW);

    break;

}

delay(1);

}

Divices controlling Application

See Next part Comming Soon

Comments

Popular posts from this blog

Fm transmitter circuit

Fm transmitter circuit Power supply   :-   Using power supply stable DC voltage 2 V to 3.7 V max. You can only use battery because battery is perfect for this circuit battery output doesn't any noise. Components  :- Transistor BC 547 , Resistance 100 ohm , 4.7 K ohm .   Capacitor 1nF, 47pF, 22pF.   Inductor 1uH. Condenser mic any . Resistance  :-   Using resistance 100 ohm +-5% changing 1/3 watt, 4.7 K ohm +-5% changing 1/3 watt. Capacitor  :-   1nF this capacitor number 102 non-polar, 22pF this capacitor number 22 non-polar, 47pF this capacitor number 47 non-polar. Inductor  :-   This part important part for any transmitter circuit, 1uH 5Turn 24SWG. Transistor  :-   BC 547  is an NPN Bipolar junction transistor. It is commonly  used  to amplify current. A small current at its base controls a larger current at collector & emitter terminals.  It has a transition  frequency range  up to 100 MHz . When using the transistor as a switch, the max cur

Automatic home appliances

 Automatic Home Appliances Remote control electrical appliances  Setting up  IR sensor  connection to Atmega 328P is very simple. Beside VCC and GND  pin , the  sensor  has only one output  pin  that should be connected to one of digital  pins  of the Atmega 328P. HC - 05  has red LED which indicates connection status, whether the  Bluetooth  is connected or not. Before connecting to  HC - 05 module  this red LED blinks continuously in a periodic manner. When it gets connected to any other  Bluetooth  device, its blinking slows down to two seconds. This  module works  on 3.3 V - 6V but you can use only 5V DC. this module use any Serial  AMS1117  is a popular SMD package 3-pin voltage regulator that is available in many models for fixed and adjustable voltage requirements. The IC can deliver a maximum current of 1A and the output voltage can vary from 1.5V to 5V. It also has a low drop out voltage of 1.3V when operating at maximum current. pin number 1 GND, pin 2 OUTPUT,

MINI ROBOT

Make a mini robot Use resistance - 10K ohms Use variable resistance -10K ohms Use switch - puss on Arduino nano 2.0