making blinking eyes for costume

hey. i need help for a code for a dc motor that when the power turns on, the eyes stay open and then close and then open again and wait with the eyes open, then close and open, basically like blinks, with pauses in between them and it loops over and over. and I want it to be like each time it is turned on, the eyes will return to the starting position, which is the eyelids open. I am making several costumes and I want the eyes to blink to give then a bit of realism to the characters. anyone that reads this, please give me the code now because I want the whole thing done before Halloween. that includes the eye blinking working properly. thanx!

SO what have you tried so far ?

Have you looked at the Blink and BlinkWithoutDelay examples in the IDE ?

What type of motors and power supply do you have ?

well, basically, when the board is turned on, (it will have an on off switch) the motor will go to the starting position, which is up, and the eyelids are open, then the motor goes down quickly, then up, and pauses for a few seconds, and loops over and over. basically the motor goes forwards then backwards and stops and goes again to simulate blinking.

well, why do I have to have somebody write the code for me? I thought someone makes the code and posts it on that thread so other people can copy and paste it into the coding window on the Arduino app on their computers and then save it so it writes to the Arduino and then they can immediately finish their project since it is already done.

I think it should wait five seconds. do I have to pay someone else to do it or can you tell me how to do it?

bopitlover12:
well, why do I have to have somebody write the code for me? I thought someone makes the code and posts it on that thread so other people can copy and paste it into the coding window

What exactly do you think is the difference between somebody writing the code that YOU want and someone making the code that YOU want?

Steve

It's kinda like ordering a pizza.

ok, if I put a piece of paper on the servo motor, and the servo motor is in the 0 position, will the piece of paper be facing up, or down?

do I put void loop to loop the movements or not?

bopitlover12:
do I put void loop to loop the movements or not?

The name is a hint. Things contained in the loop() function are looped i.e. run repeatedly.

Steve

Hi bopitlover12,

As a few others have explained, you don't get ready made code here. This is a forum that encourages and helps people learn to program Arduinos. Folks here have a lot of experience doing that, but can become a bit impatient with people who don't want to participate in the learning, expecting someone else to do all the coding.

The idea is, that anyone can learn to program Arduino!

So if you are serious about making this project, and you want to get help from here, you will need to slow down, and start at the beginning. It's doesn't take too long to get up to speed, but if you miss the basics, it will quickly become frustrating.

If you do want a ready made project, I suggest searching sites such as Instructables, or google the project in general (say with the search terms "animatronic eyes arduino").

Which ever way you want to go with it, good luck!

nevermind, I found a code on an instructable that blinks when someone walks by that I can modify it to where it just blinks until the batteries die or the power switch is turned off!