PomBot- Joy Shi

20191107_150250-e1573160982342-219x450

This week in class, we learned to make a simple bot using a servo motor. This was relatively simple since we already had a code ready for us to use. I decided to make a mouse with its tail moving.

For my assignment, I originally had no idea of what to make. So I started with making and coding the 2 servo motors  to make it move. To get so ideas, I researched on ways to make two motors move. After making sure that the motors moved, I started to brainstorm on what my bot should be.

Sketch of pombot

With the supplies given in the FabLab, I decided to make an airplane using a toilet paper roll and some popsicle sticks. To make it prettier, I placed some pipe cleaners and pompoms. After designing the airplane, I placed the two motors on the bottom-front of the plane. While testing it out, I realized that I made the front of the plane too heavy, while the back of the airplane had nothing to hold it down. When I tested the motors, the head of the airplane basically tipped forward. To resolve this issue, I placed two pennies on the tail end of the airplane to balance out the weight. This helped, as the plane did not tip forward again.

After solving this first problem, my second problem quickly became apparent. Since I placed the plane on top of the two motors, it became a bit heavy for the two legs of the motor to make the bot move. I quickly realized that I could just place rubber on the leg of the motor to help it grip the surface of the table.

Sadly, the plane does not move far and if I were to improve on this project, I would try to figure out how to make it move farther.

Final Product!

Code Used: 

#include <Servo.h>

Servo servoLeft;
Servo servoRight;

void setup() {
servoLeft.attach(10);
servoRight.attach(9);
}

void loop() {
forward();
delay(900);
reverse();
delay(900);
move1();
delay(900);
move2();
delay(900);
stopRobot();
delay(900);
}

void forward() {
servoLeft.write(0);
servoRight.write(180);
}

void reverse() {
servoLeft.write(180);
servoRight.write(0);
}

void move1() {
servoLeft.write(90);
servoRight.write(0);
}
void move2() {
servoLeft.write(90);
servoRight.write(90);
}

void stopRobot() {
servoLeft.write(90);
servoRight.write(180);
}

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest