Motor shield help

I am a arduino newb. I just got my uno board with the motor shield about a week ago. I am just trying to use the L298 chip on the motor shield as an h bridge driver. All I need to output is two square waves or pwm’s that are out of phase, one being positive and one being negative. Everything I have seen online is using the motor shield as driving a motor. Can anyone help me out or show me where to look? thanks in advanced

Which motor shield ?

H-bridge driver for what?

hello this is the programm in order to command a stepper motor:

const int bp2 = 1;
const int bp1 = 2;
const int coil1 = 3;
const int coil2 = 4;
const int coil3 = 5;
const int coil4 = 6;


const int delayTime = 500;
int buttonState = 0;




void setup() {
  
  pinMode(coil1, OUTPUT);
  pinMode(coil2, OUTPUT);
  pinMode(coil3, OUTPUT);
  pinMode(coil4, OUTPUT);
  pinMode(bp2, INPUT);
  pinMode(bp1, INPUT);
}

void loop() {
    buttonState = digitalRead(bp1);
  if (buttonState == HIGH) {
    
  digitalWrite(coil1, HIGH);
  digitalWrite(coil2, HIGH);
  digitalWrite(coil3, LOW);
  digitalWrite(coil4, LOW);
  delay(delayTime);
  digitalWrite(coil1, LOW);
  digitalWrite(coil2, HIGH);
  digitalWrite(coil3, HIGH);
  digitalWrite(coil4, LOW);
  delay(delayTime);
  digitalWrite(coil1, LOW);
  digitalWrite(coil2, LOW);
  digitalWrite(coil3, HIGH);
  digitalWrite(coil4, HIGH);
  delay(delayTime);
  digitalWrite(coil1, HIGH);
  digitalWrite(coil2, LOW);
  digitalWrite(coil3, LOW);
  digitalWrite(coil4, HIGH);
  delay(delayTime);
  
  }
    buttonState = digitalRead(bp2);
  if (buttonState == HIGH) {
    
  digitalWrite(coil1, HIGH);
  digitalWrite(coil2, LOW);
  digitalWrite(coil3, LOW);
  digitalWrite(coil4, HIGH);
  delay(delayTime);
  digitalWrite(coil1, LOW);
  digitalWrite(coil2, LOW);
  digitalWrite(coil3, HIGH);
  digitalWrite(coil4, HIGH);
  delay(delayTime);
  digitalWrite(coil1, LOW);
  digitalWrite(coil2, HIGH);
  digitalWrite(coil3, HIGH);
  digitalWrite(coil4, LOW);
  delay(delayTime);
  digitalWrite(coil1, HIGH);
  digitalWrite(coil2, HIGH);
  digitalWrite(coil3, LOW);
  digitalWrite(coil4, LOW);
  delay(delayTime);
  
  }
  
  

else{
  digitalWrite(coil1, LOW);
  digitalWrite(coil2, LOW);
  digitalWrite(coil3, LOW);
  digitalWrite(coil4, LOW);

}
}

Moderator edit: CODE TAGS

thanks for the feedback and I will try out that code! I did a little research and found mostly what I needed. I am using the ardumoto motor shield from sparkfun. I am going to be using this to drive a transformer

here is my code

int pwm_A = 3;
int dir_A = 12;
int brake_a = 9;
int sns_a = A0;
void setup ()
{

pinMode(brake_a, OUTPUT);
pinMode(dir_a, OUTPUT);
pinMode(pwm_a, OUTPUT);
digitalWrite(pwm_a, HIGH);

//const int i =100;

//trying to increase the frequency
TCCR2A = _BV(COM2A0) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);  // fast pwm mode with OCR2A top limit
TCCR2B = _BV(WGM22) | _BV(CS22);
OCR2A = 100;

}

void loop()
{

digitalWrite( brake_a, LOW);  // disengage the brake
digitalWrite(dir_a, HIGH);    // spins at full speed forward
analogWrite( pwm_a, 255);

digitalWrite( brake_a, LOW);  // disengage the brake
digitalWrite(dir_a, LOW);    // spins at full speed backward
analogWrite( pwm_a, 255);

}

this successfully gives me a bipolar square wave (which i wanted) but I am trying to increase the frequency of the square wave. right now the frequency of the square wave is about 25kHz. I have been experimenting with timer2 and with the speed of the motor and I can not get the frequency to increase. can you help me figure out how to do this? thanks

I double checked the data sheet for the L298 chip, which is on the ardumoto shield, and its typical frequency is 25kHz with a maximum of 40khz

To increase the output frequency of the motor you need to change DIR_A (pin 12) to an input. Then you can connect one of the PWM signals pins 5, 6, 9, 10 or 11 ( pin 3 is already being used) to control when the DIR_A is high or low (backwards or forwards). Then you can control the frequency of the PWM signal with its respective timer.