code for stepper motor using L298 driver


I am working on a project that uses two sensors, one stepper motor(200 steps) using L298N driver chip and the ATMEGA8 controller. sensor 1 gets high and triggers forward rotation of the stepper, sensor 2 gets high and trigger reverse rotation of the stepper motor. I intend to use 100 pulses in 125ms as motor control speed. i will appreciate any help in writing this program am not very good at programming, i have done the hardware part(PCB layout).

Thank you.