Code doesn't do it's job when I recycle power

I can't see why it doesn't start up when USB is plugged in but this statement doesn't look quite right:

    for(int pinled=6; pinled>=2; pinled --)

I think the initialization should be "int pinled=7;"

Pete