moved loop counter to be global, fixing another loop bug. Still not working. Enabled LEDs, the logic still needs to be added.