You are on page 1of 3

I.

Objectives

At the end of the lesson, the students are expected to:

1. Identify “How BLUETOOTH CONTROLLED ROBOT” move


2. Understand the Mechanical and technical work using Motor’s

II. Subject Matter


Topic: BLUETOOTH CONTROLLED ROBOT
a. Materials
Hand-outs, Whiteboard marker
Laptop, Projector and System Unit, Dc Motor, Batteries, L298N DRIVER
Arduino Uno, Breadboard, male and female wires, Mobile phone

III.Procedure

A. Preparation
Greet the students and then ask them to seat properly.

B. Motivation
Make the students Imagine that they are living in techy world, ask them how they feel.

BLOCK DIAGRAM
Arduino CODE:

//speed of motors betwen 0 } break;


and 255, if you like you can   case 'R':
change it right();
int pwm_speedA = 255; break;
void loop() {
int pwm_speedB = 240;
 
char command;
if(Serial.available() > 0){ }
 
command = Serial.read(); }
void setup() {
motors_stop();  
Serial.begin(9600);
switch(command){ }
//pins for motor controller
case 'F':  
pinMode(11, OUTPUT);
forward(); // function for driving straight
pinMode(10, OUTPUT);
break; void forward(){
pinMode(9, OUTPUT);
case 'B': digitalWrite(10, HIGH);
pinMode(6, OUTPUT);
backward(); digitalWrite(11, LOW);
pinMode(5, OUTPUT);
break;  
pinMode(3, OUTPUT);
case 'L': digitalWrite(9, HIGH);
 
left(); digitalWrite(6, LOW);
  digitalWrite(11, LOW);  
analogWrite(5, digitalWrite(10, LOW); }
pwm_speedA);    
analogWrite(3, pwm_speedB); digitalWrite(9, HIGH); //function for stopping
} digitalWrite(6, LOW);
motors
   
void motors_stop(){
//function for reversing analogWrite(3, 0);
 
void backward(){ analogWrite(5,
digitalWrite(11, LOW);
  pwm_speedA);
digitalWrite(10, LOW);
digitalWrite(10, LOW); }
 
digitalWrite(11, HIGH);  
digitalWrite(9,LOW);
  //function for turning right
digitalWrite(6, LOW);
digitalWrite(9, LOW); void right(){
 
digitalWrite(6, HIGH); digitalWrite(10, HIGH);
analogWrite(5, 0);
  digitalWrite(11, LOW);
analogWrite(3, 0);
analogWrite(5,  
}
pwm_speedA);  
analogWrite(3, pwm_speedB); digitalWrite(9, LOW);
} digitalWrite(6, LOW);
   
//function for turning left analogWrite(3, pwm_speedB);
void left(){ analogWrite(5, 0);

C. Activity/Application:

Watching Videos thru internet (You Tube)


Assembling the Bluetooth Car Module

D. Evaluation
The Students will divided into two group, each group must have their own
Dc motor, and try to create any devices or electronics device that can manipulated by
mechanical work
E. Assignment

1. What is mechatronic?

You might also like