Code errors in the sample of Stepper

We found that error while we were having Arduino course.

Error: (These are the comment lines but also the same thing in the codes later. Also see the first attatched picture)
Step C0 C1 C2 C3
1 1 0 1 0 (1010)
2 0 1 1 0 (0110)
3 0 1 0 1 (0101)
4 1 0 0 1 (1001)

  if (this->pin_count == 4) {
    switch (thisStep) {
      case 0:    // 1010
      digitalWrite(motor_pin_1, HIGH);
     digitalWrite(motor_pin_2, LOW);
     digitalWrite(motor_pin_3, HIGH);
      digitalWrite(motor_pin_4, LOW);
      break;
      case 1:    // 0110
      digitalWrite(motor_pin_1, LOW);
      digitalWrite(motor_pin_2, HIGH);
      digitalWrite(motor_pin_3, HIGH);
      digitalWrite(motor_pin_4, LOW);
      break;
      case 2:    //0101
      digitalWrite(motor_pin_1, LOW);
     digitalWrite(motor_pin_2, HIGH);
     digitalWrite(motor_pin_3, LOW);
      digitalWrite(motor_pin_4, HIGH);
      break;
      case 3:    //1001
      digitalWrite(motor_pin_1, HIGH);
      digitalWrite(motor_pin_2, LOW);
      digitalWrite(motor_pin_3, LOW);
      digitalWrite(motor_pin_4, HIGH);
      break;
    } 
  }

It is supposed to be (Double checked with other same function codes from x113647s stepper driver - second attached picture )
Step C0 C1 C2 C3
1 1 1 0 0 (1100)
2 0 1 1 0 (0110)
3 0 0 1 1 (0011)
4 1 0 0 1 (1001)

2.png

Can you post your actual code between code tags, but you should be posting in the programming section as this isn't an installation problem.

ChilliTronix:
Can you post your actual code between code tags, but you should be posting in the programming section as this isn’t an installation problem.

Here is the error part. It caused our steppers can only forward but not reverse.

if (this->pin_count == 4) {
switch (thisStep) {
case 0: // 1010
digitalWrite(motor_pin_1, HIGH);
digitalWrite(motor_pin_2, LOW);
digitalWrite(motor_pin_3, HIGH);
digitalWrite(motor_pin_4, LOW);
break;
case 1: // 0110
digitalWrite(motor_pin_1, LOW);
digitalWrite(motor_pin_2, HIGH);
digitalWrite(motor_pin_3, HIGH);
digitalWrite(motor_pin_4, LOW);
break;
case 2: //0101
digitalWrite(motor_pin_1, LOW);
digitalWrite(motor_pin_2, HIGH);
digitalWrite(motor_pin_3, LOW);
digitalWrite(motor_pin_4, HIGH);
break;
case 3: //1001
digitalWrite(motor_pin_1, HIGH);
digitalWrite(motor_pin_2, LOW);
digitalWrite(motor_pin_3, LOW);
digitalWrite(motor_pin_4, HIGH);
break;
}
}

I am so sorry about that if I am posting in a wrong place because I am newbie here. Is there anybody can help me move the post to a right place?

Can you edit your above post to put the code between code tags? Look at the top item in the programming forum.

I will ask the mods to move it.

ChilliTronix:
Can you edit your above post to put the code between code tags? Look at the top item in the programming forum.

I will ask the mods to move it.

I already put the code into code tag! Thank you for your help!