school project

hey there, im working on a school project and i had a problem with my arduino code, ill be so happy if someone will help me, i made a code for the buzzer, and the project code, when i power on the project the buzzer need to start “singing” and after it the project code will start to run , so i need to combine between the 2 codes, soory for my bad english <3 thanks :grinning:
buzzer code:

void setup() {
  // put your setup code here, to run once:
pinMode(12,OUTPUT); 
}

void loop() {
  // put your main code here, to run repeatedly:
  {
    
tone(12,944);
delay(80);
noTone(12);
delay(120);
tone(12,1044);
delay(80);
tone(12,844);
delay(100);
tone(12,1044);
delay(80);
tone(12,3500);
delay(80);

noTone(12);
delay(100000);

}
}

project code:

#include <IRremote.h>
#include <Servo.h> 

Servo myservo;
int RECV_PIN = 11;
int buzz=8;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  myservo.attach(9);
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  pinMode(12,OUTPUT);
    pinMode(10,OUTPUT);
     pinMode(buzz,OUTPUT);
}

void loop() {

  if (irrecv.decode(&results)) {
    String s = String(results.value, HEX); 
    if(s != "ffffffff"){
      Serial.println(s);
    }
    {
    if(s == "ffc23d"){
      myservo.write(2370);  // set servo counter clockwise
    digitalWrite(12,LOW);
      digitalWrite(10,HIGH);
       digitalWrite (buzz,HIGH);
      delay (70);
       digitalWrite (buzz,LOW);
        delay (30);
      delay(2500);  
      digitalWrite(10,LOW);
    }
    else if(s == "ff22dd"){
      myservo.write(570);  // set servo clockwise
        if(s == "ff22dd")
         digitalWrite(12,HIGH);
      digitalWrite (buzz,HIGH);
      delay (70);
       digitalWrite (buzz,LOW);
        delay (30);
       digitalWrite (buzz,HIGH);
      delay (70);
       digitalWrite (buzz,LOW);
        delay (30);
     
      digitalWrite(10,LOW);
   delay(2500);  
      digitalWrite(12,LOW);
          
   
     }

    
      else if(s == "ffc23d"){
         digitalWrite (buzz,LOW);
      }
    }
     
    //Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}

thanks!!!

Here are a couple of pages on combining (merging) codes.

http://www.thebox.myzen.co.uk/Tutorial/Merging_Code.html https://arduino-info.wikispaces.com/CombiningArduinoSketches

You, potentially, may have library conflicts that will need to be resolved. I think that 2 of the libraries that you include and the Tone function use timers. There is a chance that more than 1 use the same timer (bad).

solved!! thank you very much!<33333