Connected the middle pins both at the up and bottom to ground, a,b,c,d,e,f,g are connected to outputs as well. (didn't use any resistor for a,b,c... but GND)
The code is quite straightforward but didn't work don't know why ? At where am I wrong ?
int a = 8;
int b = 9;
int c = 10;
int d = 11;
int e = 12;
int f = 13;
int g = 7;