# pins = [2, 4, 16, 17, 5, 18, 19]
# pin32-a,pin33-b,pin25-c,pin26-d,pin27-e,pin14-f,pin12-g,pin13-dp
# seven Segment display print:-
from machine import Pin
from time import sleep, sleep_ms
pins=[Pin(2,Pin.OUT),Pin(4,Pin.OUT),Pin(16,Pin.OUT),Pin(17,Pin.OUT),Pin(5,Pin.OUT),Pin(18,Pin.OUT),Pin(19,Pin.OUT)]
digits=[[0,0,0,0,0,0,1], # 0
[1,0,0,1,1,1,1], # 1
[0,0,1,0,0,1,0], # 2
[0,0,0,0,1,1,0], # 3
[1,0,0,1,1,0,0], # 4
[0,1,0,0,1,0,0], # 5
[0,1,0,0,0,0,0], # 6
[0,0,0,1,1,1,1], # 7
[0,0,0,0,0,0,0], # 8
[0,0,0,0,1,0,0] # 9
]
while True:
for i in range(10):
for j in range (7):
pins[j].value(digits[i][j])
sleep(1)