how do i code for motor movement?

Hi, I am trying to figure out how to get my 2-wire motor to move after a certain period of time (based on user input).

I have coded for the beep part, but I have no idea where to start with stimulating the motor movement right after the period of time is over. (i'm relatively new to arduino, circuitry, and coding xD)

The motor itself works; it is mounted to this linear motion rail and when I plug its wires into my breadboard, it receives the voltage of the battery I connected to the breadboard.

All I need is to figure out how to write the code for making the motor move after, let's say, 10 seconds pass since the startup of the program. Any help is appreciated. Thanks!

So, you have some code that you haven't shared and a circuit that you haven't shared, but you want us to help you soft things out.

Does that really seem likely?

void loop() {
  if(beepsReceived()) {
    motorMovement(START);
  } 
  if(motorHasMovedFarEnough()) {
    motorMovement(STOP);
  }
}

Now you just need to write those 3 functions and #define START and STOP.

@PaulS well the code i have written isn't really relevant to the motor part of the code, let's just say i coded for 3 beeps to sound and the after those 3 beeps i want the motor to move. also, the circuitry is not my problem, its the code. what i want to do is connect the motor to the arduino board. right now, i am only using the breadboard and i used a battery clip to connect a 9v battery to the positive and negative terminals, then used the 2 wires from the motor and connected it to the positive and negative terminals, and it moves. (right now, i'm not worrying about reversing the movement or anything either)

edit: instead of how many beeps are played, the motor relies on time. so if user inputs 20000 ms, then the motor will not move until that period of time is up. i just don't know how to prevent the motor from moving before that 20000 ms is up

frustrasians: @PaulS well the code i have written isn't really relevant to the motor part of the code, let's just say i coded for 3 beeps to sound and the after those 3 beeps i want the motor to move. also, the circuitry is not my problem, its the code.

I don't mean to sound unkind but all that is nonsense.

How can we help you without seeing the code you have written and how it is intended to interact with the motor code?

How can you create the motor code without a detailed knowledge of the circuit that you have to work with?

...R

frustrasians: @PaulS well the code i have written isn't really relevant to the motor part of the code, let's just say i coded for 3 beeps to sound and the after those 3 beeps i want the motor to move. also, the circuitry is not my problem, its the code. what i want to do is connect the motor to the arduino board. right now, i am only using the breadboard and i used a battery clip to connect a 9v battery to the positive and negative terminals, then used the 2 wires from the motor and connected it to the positive and negative terminals, and it moves. (right now, i'm not worrying about reversing the movement or anything either)

It seems like you are going to have to read up on Arduino motor drivers. The Arduino on its own can't switch the high-power motor. It needs an additional chip or chips to do that. There's lots available. Adafruit sells a good one that can be used for many types of motors. Sparkfun sells one that handles high power motors up to 30Amps.