from microbit import *
import neopixel

i = 0
np = neopixel.NeoPixel(pin0, 30)

while True:
    for k in range(0, 29, 1):
        np[i] = (255, 0, 0)
        np.show()
        sleep(500)
        i = i + 1
    for n in range(29, 0, -1):
        np[i] = (255, 130, 70)
        np.show()
        sleep(500)
        i = i - 1
    np.clear()