You are on page 1of 18

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING (UIE)

ARDUINO BASED SYSTEM


DESIGN
UNIT-3 Embedded system Applications using
Arduino
Embedded system
Applications using
Arduino
Course Outcomes
CO Title Level
Number

CO1 Students in this class will develop fluency with the Understand
physics of small robots, an understanding of
physical inputs and outputs, and programming
tools that enable autonomous behavior.
CO2 Specific topics will include digital I/O, serial I/O Analyzing
protocols, and analog-to-digital conversion and
interrupt mechanisms. course will be employed to
provide hands-on experience and active learning
techniques.
CO3 Students will be able to develop applications like Analyzing
having sensing and decision making capabilities 2
Bluetooth
Interfacing

Arduino with
Bluetooth to Control
an LED

3
Ever thought of controlling any electronic devices
with your smart phone? Today I will show how to
do it.

4
LET’S START
BUILDING
Components and supplies

•HC-05 Bluetooth Module


•Male/Male Jumper Wires
•5 mm LED: Red
•Arduino UNO
•Resistor 1k ohm
•Mobile-Android

Apps and platforms


•Arduino IDE
•MIT App Inventor

5
LET’S START
BUILDING
 The circuit is so simple and small,
there are only a few connections to
be made
 Arduino Pins Bluetooth Pins
 RX (Pin 0) ———-> TX
 TX (Pin 1) ———-> RX
 5V ———-> VCC
 GND ———-> GND
 Connect a LED negative to GND of
Arduino and positive to pin 13 with a
resistance valued between 220Ω –
1KΩ. And you're done with the circuit
6
Android APP

 You can access MIT app inventor from this link:

 https://appinventor.mit.edu/

 Here is the blocks you need on the MIT app inventor.

 You need a list picker, two buttons and a Bluetooth client,


which can be picked easily from the 'Design' section.

7
Arduino Code
 /*

 * Bluetooh Basic: LED ON OFF

 * Website to Android App - http://bit.do/Avishkar

 * Download the App :

 * This program lets you to control a LED on pin 13 of arduino using a bluetooth module

 */

8
Arduino Code
 char Incoming_value = 0; //Variable for storing Incoming_value

 void setup()

 {

 Serial.begin(9600); //Sets the data rate in bits per second (baud) for serial
data transmission

 pinMode(13, OUTPUT); //Sets digital pin 13 as output pin

 }

11
Arduino Code
 void loop()

 {

 if(Serial.available() > 0)

 {

 Incoming_value = Serial.read(); //Read the incoming data and store it into variable
Incoming_value

 Serial.print(Incoming_value); //Print Value of Incoming_value in Serial monitor

 Serial.print("\n"); //New line

12
Arduino Code
 if(Incoming_value == '1') //Checks whether value of Incoming_value is equal to 1

 digitalWrite(13, HIGH); //If value is 1 then LED turns ON

 else if(Incoming_value == '0') //Checks whether value of Incoming_value is equal to 0

 digitalWrite(13, LOW); //If value is 0 then LED turns OFF

 }

 }

13
How Does it Work

14
How to use the App
 Download the Application
 Pair your device with HC 05/06 Bluetooth module
 Turn ON HC 05/06 Bluetooth module
 Scan for available device
 Pair to HC 05/06 by entering default password 1234 OR
0000
 Install LED application on your android device
 Open the Application
 Press paired devices
 Select your Bluetooth module from the List (HC 05)

15
Arduino Code
• Rather than just turning LEDs on and off rapidly using digitalWrite(), we can define the level
of brightness of an LED by adjusting the amount of time between each LED’s on and off
states using pulse width modulation (PWM).

• The greater the duty cycle (the longer the pin is on compared to off in each cycle), the
greater the perceived brightness of the LED connected to the digital output pin.

16
REFERENCES
https://projecthub.arduino.cc/mukeshkp2005/arduino-with-bluetooth-to-control-an-led-a7ad0a

17
THANK YOU

You might also like