Arduino Code for scale model train

Hello,

we need a code for a scale model train.

It works in 2 steps,
step1: if you push on button1 a servo motor has to turn 90° and then it needs to have a delay of 15seconds before it automatically turns 90° back to its normal position

step2: if you push on button2 a stepper motor has to turn 5 360° and then it needs to have a delay of 25seconds before it automatically turns 5 360° back to its normal position

thanks for helping,

Gilles VNDMM

Have you already got the hardware for this project ?
If so, then please provide details

What is your budget for the project ?

we work with an arduino uno and a breadbord, we have both of the motors but we miss the code, so i made a topic about my project bcs we can't find the code by ourselves

how much would it costs us for a code sir?

I will not be quoting for this work but in order that others can then please give full details of the hardware

all the hardware is in our arduino, the code that we need is specificated in my first topic, what do you mean 'full details' => what is missing in my message?

Which servo, which stepper motor, which stepper driver, how is the project powered ?

servo motor: Tower Pro micro servo 9g
stepper motor: Nema 17 1.8° step connector flat shaft 5.0kg
driver: ULN2003 driver

both motors getting powered by the arduino itself

Don't do this
The Uno cannot supply enough current to drive the motors. You need an external power supply. Presumably power is available from the model train system but it may need a voltage reduction

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.