arduino UNO light LEDs right-to-left and then reversed
In the second 'for' loop, i is immediately not &lt;1, so the loop never executes.

for(int i =7; i&lt;1; i--)


should say

for(int i =7; i&gt;=0; i--)