Stepper motor and solenoid valve connected to a push button switch

Hi All,

I'm working on a project in which I'm trying to connect a stepper motor and solenoid valve in parallel to a single push button switch. The goal would be to push the push button once, triggering the solenoid valve to open for a specified period of time while the stepper motor simultaneously makes one full rotation.

I am a mechanical engineer by schooling, so I'm confident I can figure this out, but my electrical engineering skills are lacking and I just have no clue where to start. Does anyone know what kinds of circuitry and parts would be needed to construct the system described above? I was going to buy the Arduino Starter Kit and do some self-guided learning, but I'm trying to save some time.

Any tips or suggestions would be greatly appreciated!

Shane

You need to have a variable (perhaps called buttonPressed) and when the physical button is pressed the variable is set to true

buttonPressed = true;

and in your stepper function and your solenoid function you will need code like

if (buttonPressed == true) {
   // code to do stuff

}

You may get some ideas from Planning and Implementing a Program

...R
Stepper Motor Basics
Simple Stepper Code