Moving Eye Painting (I Didn’t Copy It Is the Other Guy Just in Another Account)

by luisfgonzalezcortes in Circuits > Arduino

744 Views, 3 Favorites, 0 Comments

Moving Eye Painting (I Didn’t Copy It Is the Other Guy Just in Another Account)

038E9956-9D05-4201-8F78-739047A96591.jpeg

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

F019185A-6A3E-4748-A830-E855EF4AE2C8.jpeg

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

374B6374-C988-4070-9638-A2B871C31978.jpeg

Place the cardboard in place and cut the eyes and place the paper on top with 2 big dots

Final Step

DC7F2097-5A01-48A4-A544-4A4CAE3F2348.jpeg

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

F0B1BBE9-BFC0-4EA6-B530-171F9DF420BA.jpeg

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);                        

 }


}