L298 Motor Driver spinning motor only one way :/
It looks like you have chosen to use arduino pin numbers that are very similar to the necessary pin numbers on the L298. Nothing wrong with that, you can use whichever arduino pins are convenient. But it seems like it would be an easy mistake (with the given code) just to wire pin N from the arduino to pin N of the L298 under such circumstances. 

With the L298, you want the analog PWM going into pin 6, and your arduino is producing that at pin 5. So you'd want 5 from the arduino going to 6 on the L298, and 6 on the arduino going to 5 on the L298. Arduino pin 7 would still go to L298 pin 7.

OR

if want to go with the 5-5, 6-6, 7-7 wiring, you could fix it in software, just by changing

int mot1ana=5;
int mot1a=6;
int mot1b=7;


to

int mot1ana=6;
int mot1a=5;
int mot1b=7;