Pooling 2 sketches Stepper and Iremote

Hello dear friends!
stepper part

#include <CustomStepper.h>
CustomStepper stepper(2, 3, 4, 5, (byte[]){8, B1000, B1100, B0100, B0110, B0010, B0011, B0001, B1001}, 4075.7728395, 12, CW);
boolean rotate1 = false;
boolean rotatedeg = false;
boolean crotate = false;

void setup()
{
  //sets the RPM
  stepper.setRPM(2);
  stepper.setSPR(4075.7728395);
}

void loop()
{
  
  if (stepper.isDone() &&  rotate1 == false)
  {
    stepper.setDirection(CCW);
    stepper.rotate(2);
    rotate1 = true;
  }
  stepper.run();
}

Remote part

#include <IRremote.h>
 
int RECV_PIN = 11;
 
IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
 
pinMode(3, OUTPUT);
}
 
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value);
 
if (results.value==0x88877) {//поменяйте на свой код
digitalWrite(13,HIGH);
}
if (results.value==0xFFFFFFFF) {//поменяйте на свой код
digitalWrite(13,LOW);
}
irrecv.resume(); // Receive the next value
}
}

So,I need help with connecting them to each other,but program works incorrectly.Thanks!

Please post your attempt to combine the 2 sketches along with a description of what the combined code actually does and what you want the code to do.

program works incorrectly.

Conveys no useful information.

#include <CustomStepper.h>
#include <IRremote.h>
CustomStepper stepper(8, 9, 10, 11, (byte[]){8, B1000, B1100, B0100, B0110, B0010, B0011, B0001, B1001}, 4075.7728395, 12, CW);
boolean rotate1 = false;
boolean rotatedeg = false;
boolean crotate = false;
int RECV_PIN = 6;

IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
stepper.setRPM(2);
stepper.setSPR(4075.7728395);
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value);
if (stepper.isDone() &&  rotate1 == false)
  {
    stepper.setDirection(CW);
    stepper.rotate(2);
    rotate1 = true;
  }
if (results.value==0x20DF00FF) {
  stepper.run();
}
if (results.value==0xFFFFFFFF) {//поменяйте на свой код
if (stepper.isDone() &&  rotate1 == false)
  {
    stepper.setDirection(CW);
    stepper.rotate(2);
    rotate1 = true;
  }
  stepper.run();
}
irrecv.resume(); // Receive the next value
}
}

If I press button stepper motor should rotate until degrees or count of rotation ends.

Before you post your code, use Ctrl-T in the IDE. It will reformat your code and make it easier to read.

#include <CustomStepper.h>
#include <IRremote.h>
CustomStepper stepper(8, 9, 10, 11, (byte[]) {
  8, B1000, B1100, B0100, B0110, B0010, B0011, B0001, B1001
}, 4075.7728395, 12, CW);
boolean rotate1 = false;
boolean rotatedeg = false;
boolean crotate = false;
int RECV_PIN = 6;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
  stepper.setRPM(2);
  stepper.setSPR(4075.7728395);
}
void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value);
    if (stepper.isDone() &&  rotate1 == false)
    {
      stepper.setDirection(CW);
      stepper.rotate(2);
      rotate1 = true;
    }
    if (results.value == 0x20DF00FF) {
      stepper.run();
    }
    if (results.value == 0xFFFFFFFF) {
      if (stepper.isDone() &&  rotate1 == false)
      {
        stepper.setDirection(CW);
        stepper.rotate(2);
        rotate1 = true;
      }
      stepper.run();
    }
    irrecv.resume(); // Receive the next value
  }
}

This is my attempt,no errors of copmiling,but program does not work.

"Does not work" isn't very helpful. Does the program do anything? Does your Serial.println() consistently show the values you expect?

It looks like it will only ever move the stepper once. You are checking that rotate1 is false but you only ever set it to true. Is that what it is supposed to do? If not what exactly do you want it to do and when?

Steve