ASSIGNMENT-1
TOPIC-
DESIGN
AND
IMEPLENMLENT
AN
EMBEDDED
SYSTEM
USING
A
COMMUNICATION
MODULE
SUBMEPTED
BY,
JOCY
MEREIN
JOHN
(CHN2ZTECVEO2)
AIM
Design and implement an Embedded System that involves a communication
module.
COMPONENTS REQUIRED
Arduino Uno, HC-05 Bluetooth Module, Arduino UNO, SG90 Micro-Servo
motor, Bluetooth Servo App installed on Android Phone, Jumper wires (generic)
and breadboard (generic).
DESIGN
1. FLOWCHART
T Angl of rotation is set ‘0’ in the pro code
A ch the connections and powering the circuit, turn on the Bluetooth
the A P .
O Bluetooth Servo App and check for Bluet . Enter the
’1234’ connecting the Bluetooth module.
R the from 0 to 180 in t app .This value is co t integer and
it Angle variable of co .
S printing th Angle is done and S is rotated 0 to 180 .
2.CIRCUIT DIAGRAM
3.PROGRAM CODE FOR ARDUINO UNO
#include<SoftwareSerial.h>
#include <Servo.h>
Servo myservo;
SoftwareSerial mySerial(10, 11); // RX and TX of SoftwareSerial
int Angle = 0; //Creating a new integer with name of Angle and value of 0
void setup() {
myservo.attach(9); //Servo input is connected to the Digital pin 9 (PWM pin)
mySerial.begin(9600); //Starting softwareSerial with Buad rate of 9600
Serial.begin(9600); //Starting normal Serial with Buad rate of 9600
}
void loop() {
if (mySerial.available()) { //Check any data available from Bluetooth
Angle = (mySerial.readString().toInt()); //Converting the received data to integer and store it in Angle
variable
Serial.println(Angle); //Serial printing the received data
myservo.write(Angle); //Rotating the servo by received angle
}
}
RESULT
The Design and Implementation of an Embedded System involving a
Communication module is done.
1
2
3
4
5
6
7
8