import pyb
from pyb import Pin
#数码管a~g dp对应的开发板引脚
d_Pins=[Pin(i,Pin.OUT_PP) for i in ['X1','X2','X3','X4','X5','X6','X7','X8']]
#数码管位段1 2 3 4对应的引脚
w_Pins=[Pin(i,Pin.OUT_PP) for i in ['Y9','Y10','Y11','Y12']]
number={
'0':
[0,0,0,0,0,0,1,1],#0
'1':
[1,1,1,1,0,0,1,1],#1
'2':
[0,0,1,0,0,1,0,1],#2
'3':
[0,0,0,0,1,1,0,1],#3
'4':
[1,0,0,1,1,0,0,1],#4
'5':
[0,1,0,0,1,0,0,1],#5
'6':
[0,1,0,0,0,0,0,1],#6
'7':
[0,0,0,1,1,1,1,1],#7
'8':
[0,0,0,0,0,0,0,1],#8
'9':
[0,0,0,0,1,0,0,1],#9
}
def display(num,dp):
global n