working sketch

connect digit pin to ground!
controlling the digit position
Swaping the position!