Group 1 Robotics Activity
Group 1 Robotics Activity
I. Summary/Description/Overview:
The objective of the project is to build or assembling a car robot that could passes through a
specific course with corresponding turns.
II. Learning Objectives:
The students should be able to:
1. Understand the description and functions of each part.
2. Assemble the parts needed for this project.
3. Familiarize the Arduino board and its component.
III. Materials:
IV. Instruction:
1. Clip both red and black wire.
2. Connect the wire to the motor driver.
3. Solder the wire into the motor driver.
4. Put the motor brackets in the gear motors.
5. Loose the screw of the green part of the motor driver.
6. Put the wire to the green part of the motor driver
7. Tighten the screw of the green part of the motor driver.
8. Put the motor driver to the designated place in the pepito board and screw it.
9. Put the gear motors on the pepito board and screw it.
10. Insert the wire to the motor driver.
11. Insert the caster wheel under the pepito board and screw it.
12. Insert the wheel to the bracket of the gear motors.
I. Summary/Description/Overview:
The objective of the project is to code a car robot that could do forward, reverse, turn left, turn
right and stop.
II. Learning Objectives:
The students should be able to:
1. Understand how it supposed to do.
2. Write a code for the car movements
3. Do trials in the written program to the car robot.
III. Materials:
*No materials needed for this activity*
IV. Instruction:
1. Analyze how the car is supposed to moved.
2. Write some codes in the program for the forward.
3. Try if the program works properly.
• If the program works properly, then you can proceed to the other car movements.
• If the program doesn’t work properly, then try to modify it until it succeeds.
4. Write and code the program until everything works properly.
5. Save your program into your device.
int LeftA = 5;
int LeftB = 9;
int RightA = 6;
int RightB = 10;
int SPK = 3;
byte LED = A1;
void loop() {
//digitalWrite(LED, HIGH);
//digitalWrite(LED, LOW);
forward();
delay(2000);
Stop();
delay(1000);
reverse();
delay(2000);
Stop();
delay(1000);
TurnLeft();
delay(450);
Stop();
delay(1000);
TurnRight();
delay(450);
Stop();
delay(1000);
//delay(1000);
//TurnLeft();
//Stop();
//TurnRight();
//delay(500);
//reverse();
//delay(500);
}
//HIGH = 1
void forward() {
digitalWrite(LeftA, 1);
digitalWrite(LeftB, LOW);
digitalWrite(RightA, LOW);
void reverse() {
digitalWrite(LeftA, LOW);
digitalWrite(LeftB, 2);
digitalWrite(RightA, 2);
digitalWrite(RightB, LOW);
}
//LOW IN TURN IS
void TurnLeft () {
digitalWrite(LeftA, LOW);
digitalWrite(LeftB, LOW);
digitalWrite(RightA, LOW);
digitalWrite(RightB, 1);
}
void TurnRight () {
digitalWrite(LeftA, 1);
digitalWrite(LeftB, LOW);
digitalWrite(RightA, LOW);
digitalWrite(RightB, LOW);
}
void Stop () {
digitalWrite(LeftA, LOW);
digitalWrite(LeftB, LOW);
digitalWrite(RightA, LOW);
digitalWrite(RightB, LOW);
}
VI. Documentation:
I. Summary/Description/Overview:
The objective of the project is to code a car robot that could do follow black line in a track.
II. Learning Objectives:
The students should be able to:
1. Understand how it supposed to do.
2. Write a code for the car movements
3. Do trials in the written program to the car robot.
III. Materials:
*No materials needed for this activity*
IV. Instruction:
1. Analyze how the car is supposed to moved.
2. Write some codes in the program for line tracing.
3. Try if the program works properly. If the program doesn’t work, try to modify it.
4. Write and code the program until everything works properly.
5. Save your program into your device.
int LeftA = 5;
int LeftB = 9;
int RightA = 6;
int RightB = 10;
//int SPK = 3;
byte LED = A1;
int LSens = A3;
int RSens = A2;
void setup() {
void loop(){
if ((analogRead(RSens)<600)&&(analogRead(LSens)<600)){
forward();
delay(1000);
}
else if ((analogRead(RSens)>600)&&(analogRead(LSens)<600)){
TurnRight();
delay(1000);
}
else if ((analogRead(RSens)<600)&&(analogRead(LSens)>600)){
TurnLeft();
delay(1000);
}
else {
Stop();
delay(1000);
};
void Stop() {
analogWrite(LeftA, 0);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
analogWrite(RightB, 0);
}
void forward() {
analogWrite(LeftA, 1200);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
//LOW IN TURN IS
void TurnRight() {
analogWrite(LeftA, 0);
analogWrite(LeftB, 80);
analogWrite(RightA, 0);
analogWrite(RightB, 105);
}
void TurnLeft() {
analogWrite(LeftA, 150);
analogWrite(LeftB, 0);
analogWrite(RightA, 100);
analogWrite(RightB, 0);
}
VI. Documentation:
https://www.youtube.com/watch?v=t7k9D1jDEtk
https://www.youtube.com/watch?v=5jh-5HGvC-I
https://www.youtube.com/watch?v=OgYb53HWPAo&list=PLHvJ4bw0xno7Cjq3eRMIZo5YBNrL6NKgw&i
ndex=23
https://github.com/sunfounder/3in1-kit/blob/main/car_project/4.follow_the_line/4.follow_the_line.ino
Activity #: 4
Title: Line-tracing Robot Race
I. Summary/Description/Overview:
The objective of the project is to test and measure the points and time take for the robot to
finish the racing track.
II. Learning Objectives:
The students should be able to:
1. Test if the robot car follows the black line path.
2. Do trials in the written program to the car robot.
3. Check if the robot car finishes the whole track.
III. Materials:
*No materials needed for this activity*
IV. Instruction:
1. Train the robot car in the black line track.
2. Configure the program of the robot if still need to fix.
3. Record the result of the race.
int LeftA = 5;
int LeftB = 9;
int RightA = 6;
int RightB = 10;
//int SPK = 3;
byte LED = A1;
int LSens = A3;
int RSens = A2;
void setup() {
pinMode(LeftA, OUTPUT);
void loop(){
if ((analogRead(RSens)<600)&&(analogRead(LSens)<600)){
forward();
delay(340);
}
else if ((analogRead(RSens)>600)&&(analogRead(LSens)<600)){
TurnRight();
delay(340);
}
else if ((analogRead(RSens)<600)&&(analogRead(LSens)>600)){
TurnLeft();
delay(340);
}
else {
Stop();
delay(340);
};
void Stop() {
analogWrite(LeftA, 0);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
analogWrite(RightB, 0);
}
void forward() {
analogWrite(LeftA, 135);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
analogWrite(RightB, 100);
//LOW IN TURN IS
void TurnRight() {
analogWrite(LeftA, 0);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
analogWrite(RightB, 100);
}
void TurnLeft() {
analogWrite(LeftA, 135);
analogWrite(LeftB, 0);
analogWrite(RightA, 0);
analogWrite(RightB, 0);
}
VI. Documentation: