# Import necessary libraries
from machine import Pin
import time
# Initialize pins
# Initialize as input and output
led = Pin(26, Pin.OUT)
led2 = Pin(0, Pin.OUT)
led3 = Pin(1, Pin.OUT)
while True:
for i in range (0,8):
#Start sequence with all leds off
led.off()
led2.off()
led3.off()
print(i)
#convert int to bin and then string
b=str(bin(i))
#turn on LED 001
if b[len(b)-1] == '1':
led.on()
#turn on LED 010
if b[len(b)-2] == '1':
led2.on()
#turn on LED 100
if b[len(b)-3] == '1':
led3.on()
time.sleep(1)