motorshield v2

I managed to get a motorized horn working on motorshield, but i cannot understand how i can program a timer in the code. What I want is ~10 seconds on, than 10 minutes offf and than again 10 seconds on. Any help would be Appriciated.

my code:

/* 
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2
It won't work with v1.x motor shields! Only for the v2's with built in PWM
control

For use with the Adafruit Motor Shield v2 
---->	http://www.adafruit.com/products/1438

This sketch creates a fun motor party on your desk *whiirrr*
Connect a unipolar/bipolar stepper to M3/M4
Connect a DC motor to M1
Connect a hobby servo to SERVO1
*/

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
#include <Servo.h> 

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); 

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myStepper = AFMS.getStepper(200, 2);
// And connect a DC motor to port M1
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);

// We'll also test out the built in Arduino Servo library
Servo servo1;


void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("MMMMotor party!");

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  
  // Attach a servo to pin #10
  servo1.attach(10);
   
  // turn on motor M1
  myMotor->setSpeed(200);
  myMotor->run(RELEASE);
  
  // setup the stepper
  myStepper->setSpeed(10);  // 10 rpm   
}

int i;
void loop() {
  myMotor->run(FORWARD);
  for (i=0; i<255; i++) {
    servo1.write(map(i, 0, 255, 0, 0));
    myMotor->setSpeed(i);  
    myStepper->step(1, FORWARD, INTERLEAVE);
    delay(600
    
    );
 }
 
 for (i=255; i!=0; i--) {
    servo1.write(map(i, 0, 255, 0, 0));
    myMotor->setSpeed(i);  
    myStepper->step(1, BACKWARD, INTERLEAVE);
    delay(15);
 }
 
  myMotor->run(BACKWARD);
  for (i=0; i<255; i++) {
    servo1.write(map(i, 0, 255, 0, 0));
    myMotor->setSpeed(i);  
    myStepper->step(1, FORWARD, DOUBLE);
    delay(3);
 }
 
  for (i=255; i!=0; i--) {
    servo1.write(map(i, 0, 255, 0, 0));
    myMotor->setSpeed(i);  
    delay(600);
 }
}

What hardware do you have, exactly? Why do you have an instance of Adafruit_DCMotor AND Servo, if you only have one motor?

    delay(600
   
    );

Get

your

runaway

enter

key

fixed!

i have a v2 adafruit https://www.google.nl/search?q=adafruit+v2&source=lnms&tbm=isch&sa=X&ved=0ahUKEwi6xuaAuJXMAhXJBywKHe4bBcEQ_AUIBygB&biw=1366&bih=667#imgrc=mIpvjSfIKjH7_M%3A

i have a v2 adafruit

With what connected to it? Answer ALL of the questions if you expect help.