Moving Eye Painting (I Didn’t Copy It Is the Other Guy Just in Another Account)
by luisfgonzalezcortes in Circuits > Arduino
759 Views, 3 Favorites, 0 Comments
Moving Eye Painting (I Didn’t Copy It Is the Other Guy Just in Another Account)
Behold a painting with moving eyes! This is a very simple project specially for beginners you don’t need any fancy stu (The videos taken are before I added a new code and the new code moves the eyes more. It is the other guy it didn’t let me enter to a contest
Supplies
Yo need a servo motor a small one works fine ( I am using a 5 volts mini servo motor )
hot glue.
a black red and yellow wire all male to male.
some cardboard and scissors.
an arduino uno.
a rubber band
a painting
paper
and some string
Downloads
The Cardboard and the Paper
Place the cardboard in place and cut the eyes and place the paper on top with 2 big dots
Final Step
Add the servo motor and a bunch of hot glue under it.
add the rubber band and the string and paste them with hot glue
The Cables Placement
The yellow cable goes into 9
the black cable goes into ground
the red cable goes into 5 volts
The Code
#include <Servo.h>
Servo myservo;
int pos = 9;
void setup() {
myservo.attach(9);
}
void loop() {
for (pos = 10; pos <= 60; pos+= 1) {
myservo.write(pos);
delay(30);
}
for (pos = 10; pos >= 60; pos -= 1) {
myservo.write(pos);
delay(30);
}
}