device that flashes an LED and runs stepper motor every 10 minutes

Hey, I'm a student that is very new to learning how to use an Arduino. I am currently working on a project where I need to create a device that shows the passing of time.

My idea is to create an object that flashes an LED and runs a stepper motor every 10mins for 5 seconds consistently. The LED to be flashing, and the stepper motor to be running for the whole 5 seconds (both the LED and stepper motor to be running at the same time).

What is the best way to go about writing the code for this? (i have very little knowledge when it comes to writing code)

thanks :slight_smile:

Why a stepper motor?

A servo motor going back and forth may be easier to get working for this demonstration.

Have you gone through any of the sketches that are in the IDE examples?

Have 'you' written any sketches?

What Arduino do you have?

.

No particular reason why I'm using a stepper motor. We were instructed to incorporate either a stepper motor, servo motor, DC motor or solenoid into the project. A servo motor may actually be better.

No i haven't looked at any IDW examples of sketches.

Yes i have written basic sketches myself, but only basic ones. I am struggling with the more complex assignments like this one. I have an Arduino UNO.

caitlinlh:
No i haven't looked at any IDW [sic] examples of sketches.

You should: the blink without delay sketch (in the IDE @ File > Example > 2. Digital) will show you how to do things based on time, in a way known as non-blocking so that those things don't interfere with other things' operation.

I'd suggest you digest the blink without delay approach.

A servo motor may actually be better.

Definitely: waaaaay simpler. If you use one of those tiny 9g ones and don't load it mechanically, you'll probably get away with powering it from the Uno.

(Presumably it's up to you how you show the passage of time?)

ok ill have a look at the blink without delay sketch, thank you for the suggestions.

yea its all up to us how we show the passing of time.

caitlinlh:
yea its all up to us how we show the passing of time.

Seeming on this planet, unless you are circling it in a 747 most days of the year and don't need microsecond accuracy, then this makes about 0 sense.

Spacetime, relativity speaking, is essentially equal for all human observers....

Either way. One of the simple steppers with a driver board such as Simple Stepper with ULN2003A Darlington Pair Driver
may suffice for your demo.

Johnny010:
then this makes about 0 sense.

Presumably all it means is that their sketch has to do something "now" and then do something (perhaps the same thing, perhaps a different thing) "later".

So I guess turning an led on would not count since that's only "now" with no action "later", but blinking it would be ok.

@OP when you get a servo working you could arrange its horn (the plastic arm thingy) and a sloping trough with marbles in it, so it releases a marble every hour as a very primitive clock.