Current sensing and LED-bar - logic failure

    for (int i = 10; i <= 10;)

An odd form of for loop as the loop variable is never incremented
Did you perhaps mean

    for (int i = 10; i <= 10; i++)