# 9. SSD for 0-9
'''
To display All decimal digits from 0 to 9 repeatly in common Anode.
'''
# Common Anode
from machine import Pin
from time import sleep
pins=[Pin(32, Pin.OUT),Pin(33, Pin.OUT),Pin(25, Pin.OUT),Pin(26, Pin.OUT),
Pin(27, Pin.OUT),Pin(14, Pin.OUT),Pin(12, Pin.OUT)]
digits=[[0,0,0,0,0,0,1],
[1,0,0,1,1,1,1],
[0,0,1,0,0,1,0],
[0,0,0,0,1,1,0],
[1,0,0,1,1,0,0],
[0,1,0,0,1,0,0],
[0,1,0,0,0,0,0],
[0,0,0,1,1,1,1],
[0,0,0,0,0,0,0],
[0,0,0,0,1,0,0]
]
while True:
for i in range(10):
for j in range(7):
pins[j].value(digits[i][j]) # for common anode
# pins[j].value(not digits[i][j]) # for common cathode
sleep(1)
'''
1. To display All decimal digits from 0 to 9 repeatly in common Cathode
2. to display hexa decimal on common Anode 0 to F
'''