Professional Documents
Culture Documents
(1)
(2)
(3)
(4)
(5)
2 OBJECTIVE
3 THEORY
4 EQUIPMENT / TOOLS
i. Personal Computer
ii. Arduino IDE Software/ MPLAB X
iii. PIC/Arduino Micro controller
iv. Android Phone
v. Mobile robot kit/ wheel robot kit/differential drive kit
5 PROCEDURE
TASK
A) Using Bluetooth
a) Construct the circuit above.
b) Design a code that can make the robot move Forward, Reverse, Left, and Right.
c) The robot must being control by Mobile Phone trough Bluetooth module.
TASK
void setup() {
pinMode(4,OUTPUT); //left motors forward
pinMode(5,OUTPUT); //left motors reverse
pinMode(6,OUTPUT); //right motors forward
pinMode(7,OUTPUT); //right motors reverse
pinMode(13,OUTPUT); //Led
Serial.begin(9600);
void loop() {
if(Serial.available()){
t = Serial.read();
Serial.println(t);
}
else if(t == 'B'){ //move reverse (all motors rotate in reverse direction)
digitalWrite(5,HIGH);
digitalWrite(7,HIGH);
}
else if(t == 'L'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(6,HIGH);
}
else if(t == 'R'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(4,HIGH);
}
6 RESULT
7 DISCUSSION
8 CONCLUSION