Using step motor for full and half step

Hi, I'm a beginner. I've been studying online about arduino and currently want to work on a step motor without using the integrate library for full step drive and half step. I tried multiple way to combine void stepmotor and void clockwise, but it didn't work out for me, so I want to ask for help or a guide how to control the step motor to do a fullstep/half step drive in clockwise and counterclockwise direction. can I adjust the angleto 1/2, 1/4, 1/3 etc. Thank you so much for your help
This is what I got so far

int IN1 = 11;
int IN2 = 10;
int IN3 = 9;
int IN4 = 8;
int stepPerRev_fullstep = 32 * 64;
double rev=1/3;
int dly_btw_step = 50;
int drive=0;
void setup() 
{
  Serial.begin(9600);
  int step_angle_fullstep = 360 / stepPerRev_fullstep; //step angle for fullstep
  int step_angle_halfstep = step_angle_fullstep / 2; //step angle for half step
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
}
void stepMotor(int pin1, int pin2, int pin3, int pin4, int thisStep);
{
  if (drive = 0) { //wave drive
    switch (thisStep)
    {
      case 0:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, LOW);
        break;
      case 1:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, HIGH);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, LOW);
        break;
      case 2:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, LOW);
        break;
      case 3:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, HIGH);
        break;
    }
  }
  else if (drive = 1) { //fullstep drive
    switch (thisStep)
    {
      case 0:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, HIGH);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, LOW);
        break;
      case 1:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, HIGH);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, LOW);
        break;
      case 2:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, HIGH);
        break;
      case 3:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, HIGH);
        break;
    }
  }
  else if (drive = 2) {  //halfstep drive
    switch (thisStep)
    {
      case 0:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, LOW);
        break;
      case 1:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, HIGH);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, LOW);
        break;
      case 2:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, LOW);
        break;
      case 3:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, HIGH);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, LOW);
        break;
      case 4:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, LOW);
        break;
      case 5:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, HIGH);
        digitalWrite(pin4, HIGH);
        break;
      case 6:
        digitalWrite(pin1, LOW);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, HIGH);
        break;
      case 7:
        digitalWrite(pin1, HIGH);
        digitalWrite(pin2, LOW);
        digitalWrite(pin3, LOW);
        digitalWrite(pin4, HIGH);
        break;
    }
  }
}
  void clockwise (double rev, int dly)
  {
    for (int i = 0; i <= (rev* stepPerRev_fullstep); i++)
    {
      stepMotor(IN1, IN2, IN3, IN4, i % 4);
      delay(dly);
    }
  }
  void ccw (double rev, int dly)
  {
    for (int i = (rev* stepPerRev_fullstep); i >= 0; i--)
    {
      stepMotor(IN1, IN2, IN3, IN4, i % 4);
      delay(dly);
    }
  }

  void loop() {
    // put your main code here, to run repeatedly:
    clockwise(rev, dly_btw_step);
    delay(1000);
    ccw(rev, dly_btw_step);
    delay(1000);
  }
``

Oops

Hi @ytee ,

you have not informed which driver you are using to control your step motor.
Please read :

If you use 4988, you can change stepping selecting MS1, MS2 and MS3.

See if this link helps you:

RV mineirin