16x2 LCD animation wont run into for loop

Trying to make simple animations with a 16x2 lcd screen. code blocks will run properly when on there own but will not run when i try putting them into a for loop what am I doing wrong?

#include <LiquidCrystal.h>
int i =0;
LiquidCrystal lcd(10,9,5,4,3,2);

byte W1[8] = {
B00000,
B11000,
B11000,
B11100,
B11100,
B11100,
B10010,
B10001
};

byte W2[8] = {
B00000,
B01100,
B01100,
B01110,
B01110,
B01110,
B01010,
B10010
};
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.createChar(0, W1);
lcd.createChar(1,W2);
lcd.write(byte(1));
Serial.println(i);
}

void loop() {

for(i = 0; i > 15; i++){

Serial.println(i);
lcd.setCursor(i,0);
lcd.write(byte(0));
delay(500);
lcd.clear();
++i ;
lcd.setCursor(i,0);
lcd.write(byte(1));
delay(500);
lcd.clear();

}
i=15;
for(i = 0; i > 15; i--){
lcd.setCursor(i,1);
lcd.write(byte(0));
delay(500);
lcd.clear();
--i;
lcd.setCursor(i,1);
lcd.write(byte(1));
delay(500);
lcd.clear();
--i;
}

}

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

for(i = 0; i > 15; i--){

i is initially set to 0, then the code within the if statement is only executed if the condition (i > 15) is true.

ok that makes sense I reversed the conditional and it started working right away thank you very much